summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2007-11-08 09:00:23 +0000
committeraclement <aclement>2007-11-08 09:00:23 +0000
commit15b4d76c67285fb37205e44d728e482fa13e5062 (patch)
treed77d496eded69dc57d5e5e356557c8cd0eead77f /tests
parent4becbd27f0dcf9bf8ebeb7aa3788362dc62a09cb (diff)
downloadaspectj-15b4d76c67285fb37205e44d728e482fa13e5062.tar.gz
aspectj-15b4d76c67285fb37205e44d728e482fa13e5062.zip
testcode for 169432 and 209051
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java5
-rw-r--r--tests/src/org/aspectj/systemtest/ajc154/ajc154.xml32
2 files changed, 32 insertions, 5 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java
index bb2691711..731c8777a 100644
--- a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java
@@ -45,7 +45,10 @@ public class Ajc154Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// runTest("new pointcut designators in a reference pointcut");
// }
- //public void testDecpProblemWhenTargetAlreadyImplements_pr169432() { runTest("declare parents problem when target already implements interface");}
+ //public void testAsteriskInAtPointcut_pr209051() { runTest("asterisk in at aj pointcut");}
+ public void testDecpProblemWhenTargetAlreadyImplements_pr169432_1() { runTest("declare parents problem when target already implements interface - 1");}
+ public void testDecpProblemWhenTargetAlreadyImplements_pr169432_2() { runTest("declare parents problem when target already implements interface - 2");}
+ public void testDecpProblemWhenTargetAlreadyImplements_pr169432_3() { runTest("declare parents problem when target already implements interface - 3");}
public void testVariousLtwAroundProblems_pr209019_1() { runTest("various issues with ltw and around advice - 1"); }
public void testVariousLtwAroundProblems_pr209019_2() { runTest("various issues with ltw and around advice - 2"); }
diff --git a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml
index b929a8200..73ae01839 100644
--- a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml
+++ b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml
@@ -3,6 +3,15 @@
<!-- AspectJ v1.6.0 Tests -->
<suite>
+ <ajc-test dir="bugs154/pr209051" title="asterisk in at aj pointcut">
+ <compile options="-1.5" files="Bug.java"/>
+ <run class="Bug">
+ <stdout>
+ <line text="x"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
<!-- very basic with all code style, should be fine -->
<ajc-test dir="bugs154/pr209019/case1" title="various issues with ltw and around advice - 1">
<compile options="-1.5" files="A.java,DurationMethod.java,AbstractDurationMethod.java,Runner.java"/>
@@ -53,14 +62,29 @@
</run>
</ajc-test>
-
-
-
- <ajc-test dir="bugs154/pr169432" title="declare parents problem when target already implements interface">
+ <!-- just checking the new syntax compiles OK -->
+ <ajc-test dir="bugs154/pr169432/case1" title="declare parents problem when target already implements interface - 1">
<compile options="-1.5" files="NonMarkerInterface.java,ClassThatAlreadyIncludesRequiredMethods.java,DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java"/>
</ajc-test>
+ <!-- now violate the rules, the types matching the pattern do not implement the interface -->
+ <ajc-test dir="bugs154/pr169432/case2" title="declare parents problem when target already implements interface - 2">
+ <compile options="-1.5" files="A.java">
+ <message kind="error" line="20" text="@DeclareParents: No defaultImpl was specified but the type 'C1' does not implement the method 'int m()' defined on the interface 'NonMarkerInterface'"/>
+ <message kind="error" line="24" text="@DeclareParents: No defaultImpl was specified but the type 'C2' does not implement the method 'int m()' defined on the interface 'NonMarkerInterface'"/>
+ </compile>
+ </ajc-test>
+ <!-- now they do, lets check they behave as expected -->
+ <ajc-test dir="bugs154/pr169432/case3" title="declare parents problem when target already implements interface - 3">
+ <compile options="-1.5" files="A.java"/>
+ <run class="A">
+ <stdout>
+ <line text="C1.m() returns 1"/>
+ <line text="C2.m() returns 2"/>
+ </stdout>
+ </run>
+ </ajc-test>
<ajc-test dir="bugs154/pr202088" title="abstract annotation style pointcut with context">
<compile options="-1.5" files="Bug.java"/>