diff options
author | aclement <aclement> | 2007-12-02 09:24:51 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-12-02 09:24:51 +0000 |
commit | 9de03b75977599b12208c93c20cfc50fa85d7e22 (patch) | |
tree | 4a7d95b316ef8c277454810f7d33f332d9decf5a /tests | |
parent | 26873928c3b1e3739c5376ad35075f5477cc452e (diff) | |
download | aspectj-9de03b75977599b12208c93c20cfc50fa85d7e22.tar.gz aspectj-9de03b75977599b12208c93c20cfc50fa85d7e22.zip |
tests for 211674
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs154/pr211674/Test.java | 29 | ||||
-rw-r--r-- | tests/bugs154/pr211674/Test2.java | 27 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java | 3 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc154/ajc154.xml | 10 |
4 files changed, 69 insertions, 0 deletions
diff --git a/tests/bugs154/pr211674/Test.java b/tests/bugs154/pr211674/Test.java new file mode 100644 index 000000000..0cb1ed514 --- /dev/null +++ b/tests/bugs154/pr211674/Test.java @@ -0,0 +1,29 @@ +import java.lang.annotation.*; +import org.aspectj.lang.annotation.*; +import org.aspectj.lang.*; + +@Aspect class A { + + @Pointcut("execution(@Tracing * *(..)) && @annotation(tracing)") + void annotatedMethods(Tracing tracing) { } + + @AfterThrowing(pointcut = "annotatedMethods(tracing)", throwing = "t") + public void logException(JoinPoint thisJoinPoint, Tracing tracing,Throwable t) { + } + +} + +@Retention(RetentionPolicy.RUNTIME) +@interface Tracing { } + +public class Test { + + @Tracing + public void m() {} + + + public static void main(String []argv) {} + + +} + diff --git a/tests/bugs154/pr211674/Test2.java b/tests/bugs154/pr211674/Test2.java new file mode 100644 index 000000000..791eabfa3 --- /dev/null +++ b/tests/bugs154/pr211674/Test2.java @@ -0,0 +1,27 @@ +import java.lang.annotation.*; +import org.aspectj.lang.annotation.*; +import org.aspectj.lang.*; + +@Aspect class A { + + @Pointcut("execution(@Tracing * *(..)) && @annotation(tracing)") + void annotatedMethods(Tracing tracing) { } + + @AfterThrowing(pointcut = "annotatedMethods(tracing)", throwing = "t") + public void logException(JoinPoint thisJoinPoint, Throwable t,Tracing tracing) { + } + +} + +@Retention(RetentionPolicy.RUNTIME) +@interface Tracing { } + +public class Test2 { + + @Tracing + public void m() {} + + public static void main(String []argv) {} + +} + diff --git a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java index 6560b56bf..76c2eb154 100644 --- a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java @@ -44,6 +44,9 @@ public class Ajc154Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // //parser.registerPointcutDesignatorHandler(beanHandler); // runTest("new pointcut designators in a reference pointcut"); // } + //public void testAfterThrowingAnnotationStyle_pr211674_1() { runTest("after throwing annotation style problem - 1");} + //public void testAfterThrowingAnnotationStyle_pr211674_2() { runTest("after throwing annotation style problem - 2");} + public void testNPEWithMissingAtAspectAnnotationInPointcutLibrary_pr162539_1() { runTest("NPE with missing @aspect annotation in pointcut library - 1"); } public void testNPEWithMissingAtAspectAnnotationInPointcutLibrary_pr162539_2() { runTest("NPE with missing @aspect annotation in pointcut library - 2"); } diff --git a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml index 371985a8e..2b333d0b6 100644 --- a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml +++ b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml @@ -2,6 +2,16 @@ <!-- AspectJ v1.6.0 Tests --> <suite> + <ajc-test dir="bugs154/pr211674" title="after throwing annotation style problem - 1"> + <compile options="-1.5" files="Test.java"/> + <run class="Test"/> + </ajc-test> + + <ajc-test dir="bugs154/pr211674" title="after throwing annotation style problem - 2"> + <compile options="-1.5" files="Test2.java"/> + <run class="Test2"/> + </ajc-test> + <ajc-test dir="bugs154/pr194314" title="broken lvt for woven at aspectj around advice"> <compile options="-1.5" files="test/IService.java,test/Main.java,test/Service.java,test/ServiceInterceptor.java"/> </ajc-test> |