Skip to content

Commit

Permalink
8288989: Make tests not depend on the source code
Browse files Browse the repository at this point in the history
Reviewed-by: mcimadamore
  • Loading branch information
asotona authored and pull[bot] committed May 21, 2024
1 parent 531fd87 commit 8340176
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@

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

SnippetUtils snippets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
*/
public class TestJavaxToolsSnippets extends TestRunner {
public static void main(String... args) throws Exception {
new TestJavaxToolsSnippets().runTests(m -> new Object[] { Path.of(m.getName()) });
try {
new TestJavaxToolsSnippets().runTests(m -> new Object[] { Path.of(m.getName()) });
} catch (SnippetUtils.ConfigurationException e) {
System.err.println("NOTE: " + e.getMessage() + "; test skipped");
}
}

SnippetUtils snippets = new SnippetUtils("java.compiler");
Expand Down

0 comments on commit 8340176

Please sign in to comment.