Skip to content

Commit 8278897

Browse files
asotonapull[bot]
authored andcommitted
8288989: Make tests not depend on the source code
Reviewed-by: mcimadamore
1 parent db7684e commit 8278897

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

test/langtools/jdk/javadoc/doclet/testDocletExample/TestDocletExample.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@
5050

5151
public class TestDocletExample extends TestRunner {
5252
public static void main(String... args) throws Exception {
53-
var t = new TestDocletExample();
54-
t.runTests(m -> new Object[] { Path.of(m.getName()) });
53+
try {
54+
var t = new TestDocletExample();
55+
t.runTests(m -> new Object[] { Path.of(m.getName()) });
56+
} catch (SnippetUtils.ConfigurationException e) {
57+
System.err.println("NOTE: " + e.getMessage() + "; test skipped");
58+
}
5559
}
5660

5761
SnippetUtils snippets;

test/langtools/tools/javac/api/snippets/TestJavaxToolsSnippets.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@
5858
*/
5959
public class TestJavaxToolsSnippets extends TestRunner {
6060
public static void main(String... args) throws Exception {
61-
new TestJavaxToolsSnippets().runTests(m -> new Object[] { Path.of(m.getName()) });
61+
try {
62+
new TestJavaxToolsSnippets().runTests(m -> new Object[] { Path.of(m.getName()) });
63+
} catch (SnippetUtils.ConfigurationException e) {
64+
System.err.println("NOTE: " + e.getMessage() + "; test skipped");
65+
}
6266
}
6367

6468
SnippetUtils snippets = new SnippetUtils("java.compiler");

0 commit comments

Comments
 (0)