diff options
author | aclement <aclement> | 2004-08-17 14:04:29 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-08-17 14:04:29 +0000 |
commit | 84e4e53608871ab3ad0381d19abd8fa2e1bc4533 (patch) | |
tree | 1c22d44c9207d48ebba4539bd74bb03db9018e8e /tests/src | |
parent | 0e52e76e3ea893f5f553419924cba8aebad29be4 (diff) | |
download | aspectj-84e4e53608871ab3ad0381d19abd8fa2e1bc4533.tar.gz aspectj-84e4e53608871ab3ad0381d19abd8fa2e1bc4533.zip |
Test and fix for Bugzilla Bug 62642
proper handling of ExceptionInIntializer inside <clinit> in presence of after throwing advice
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java | 10 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml | 8 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java b/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java index 391d5f89f..ec5513053 100644 --- a/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java @@ -225,6 +225,14 @@ public class Ajc121Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void test042_ITDaccessingPrivateMethod_pr67578_2() { runTest("Privileged Aspect Access Problem Across Packages (2)"); } - + + public void test043_pr62642_ExceptionInInitializerError() { + runTest("proper handling of ExceptionInIntializer inside clinit in presence of after throwing advice"); + String s = getLastRunResult().getStdErr(); + assertTrue("Output should contain java.lang.ExceptionInInitializerError but is '"+s+"'", + s.indexOf("java.lang.ExceptionInInitializerError")!=-1); + assertTrue("Output should contain 'CAUSE=org.aspectj.lang.NoAspectBoundException' but is '"+s+"'", + s.indexOf("CAUSE=org.aspectj.lang.NoAspectBoundException")!=-1); + } } diff --git a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml index 4b60da7ac..b687ae762 100644 --- a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml @@ -329,3 +329,11 @@ <message kind="error" line="7" text="The method returnNothing(Object) from the type ITD is not visible"/> </compile> </ajc-test> + + <ajc-test dir="bugs" pr="62642" + title="proper handling of ExceptionInIntializer inside clinit in presence of after throwing advice"> + <compile files="pr62642.java"/> + <run class="pr62642"> + <message kind="error"/> + </run> + </ajc-test> |