equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
36 } |
36 } |
37 |
37 |
38 public void run() throws Exception { |
38 public void run() throws Exception { |
39 javadoc("Error.java", "1 error"); |
39 javadoc("Error.java", "1 error"); |
40 javadoc("JavacWarning.java", "1 warning"); |
40 javadoc("JavacWarning.java", "1 warning"); |
41 javadoc("JavadocWarning.java", "1 warning"); |
|
42 if (errors > 0) |
41 if (errors > 0) |
43 throw new Exception(errors + " errors found"); |
42 throw new Exception(errors + " errors found"); |
44 } |
43 } |
45 |
44 |
46 void javadoc(String path, String expect) { |
45 void javadoc(String path, String expect) { |
47 File testSrc = new File(System.getProperty("test.src")); |
46 File testSrc = new File(System.getProperty("test.src")); |
48 String[] args = { |
47 String[] args = { |
49 "-Xdoclint:none", |
|
50 "-source", "8", |
48 "-source", "8", |
51 "-classpath", ".", |
49 "-classpath", ".", |
52 "-package", |
50 "-package", |
53 new File(testSrc, path).getPath() |
51 new File(testSrc, path).getPath() |
54 }; |
52 }; |