diff options
Diffstat (limited to 'tests/bugs161/pr102733/Invoker3.java')
-rw-r--r-- | tests/bugs161/pr102733/Invoker3.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs161/pr102733/Invoker3.java b/tests/bugs161/pr102733/Invoker3.java new file mode 100644 index 000000000..e7a0d461e --- /dev/null +++ b/tests/bugs161/pr102733/Invoker3.java @@ -0,0 +1,24 @@ +public class Invoker3 { + public static void main(String[] args) throws Throwable { + try { + C3.main(null); + } + catch (Throwable t) { + boolean failedCorrectly = t.toString().indexOf("Unresolved compilation") != -1; + if (failedCorrectly) + return; + throw new RuntimeException("Call to main should have failed!", t); + } + try { + new C3(); + } + catch (Throwable t) { + boolean failedCorrectly = + t.toString().contains("Unresolved compilation problem") && + t.toString().contains("blahblahpackage cannot be resolved to a type"); + if (failedCorrectly) + return; + throw new RuntimeException("Constructor call should have failed!", t); + } + } +} |