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
Backport-of: 2838a916ab98cb0152f8b1e3f96eccca198af5e9
  • Loading branch information
GoeLin committed Mar 19, 2024
1 parent 81f621d commit 6632caa
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

1 comment on commit 6632caa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.