summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2011-06-07 18:31:54 +0000
committeraclement <aclement>2011-06-07 18:31:54 +0000
commitff7bd9e0fd0a4c78d9b9d85b411a3ee92b0fab70 (patch)
tree7c430374cda5bd73ba92c8df09c695bb9cea20db
parent95e70d2a23b64e7773d8edf909b1365c19752aa3 (diff)
downloadaspectj-ff7bd9e0fd0a4c78d9b9d85b411a3ee92b0fab70.tar.gz
aspectj-ff7bd9e0fd0a4c78d9b9d85b411a3ee92b0fab70.zip
347185
-rw-r--r--tests/bugs160/various/S.java16
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java194
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/ajc160.xml6
3 files changed, 151 insertions, 65 deletions
diff --git a/tests/bugs160/various/S.java b/tests/bugs160/various/S.java
new file mode 100644
index 000000000..bf152b168
--- /dev/null
+++ b/tests/bugs160/various/S.java
@@ -0,0 +1,16 @@
+// HasMethod with anno value matching
+
+@interface I {
+ String s();
+}
+aspect A {
+ declare parents: hasmethod(@I(s="abc") * *(..)) implements java.io.Serializable;
+}
+
+class B {
+@I(s="abc") public void m() {}
+}
+class C {
+@I(s="def") public void m() {}
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
index 29eaf0c13..6a93f3a53 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
@@ -20,71 +20,135 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
* These are tests for AspectJ1.6.0
*/
public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
-
+
// AspectJ1.6.0rc1
- // public void testPipelineCompilationGenericReturnType_pr226567() {
- // runTest("pipeline compilation and generic return type");
- //}
- public void testPipelineCompilationAnonymous_pr225916() {
- runTest("pipeline compilation and anonymous type");
- }
- public void testGenericITDs_pr214994() {
- runTest("generic itd");
- }
- public void testGenericDecpLtw_pr223605() {
- runTest("generic decp ltw");
- }
- public void testDuplicateITDsNPE_pr173602() {
- runTest("duplicate itd npe");
- }
- public void testLTWITDs_pr223094() {
- runTest("ltw inherited itds");
- }
- // public void testBrokenIfArgsCflowAtAj_pr145018() {
- // runTest("ataj crashing with cflow, if and args");
- // }
- public void testClassCastOnArrayType_pr180264() {
- runTest("classcastexception on array type");
- }
- //public void testITDWithArray_pr201748() { runTest("itd with array");}
- public void testBadMessage() { runTest("incorrect itd error with generics");}
- public void testBadMessage2() { runTest("incorrect itd error with generics - 2");}
- public void testHasMethodAnnoValueInt_various() { runTest("hasmethod anno value - I");}
- public void testHasMethodAnnoValueBoolean_various() { runTest("hasmethod anno value - Z");}
- public void testGenericTypeParameterizedWithArrayType_pr167197() { runTest("generic type parameterized with array type");}
- public void testGenericTypeParameterizedWithArrayType_pr167197_2() { runTest("generic type parameterized with array type - 2");}
-
-
+ // public void testPipelineCompilationGenericReturnType_pr226567() {
+ // runTest("pipeline compilation and generic return type");
+ // }
+ public void testPipelineCompilationAnonymous_pr225916() {
+ runTest("pipeline compilation and anonymous type");
+ }
+
+ public void testGenericITDs_pr214994() {
+ runTest("generic itd");
+ }
+
+ public void testGenericDecpLtw_pr223605() {
+ runTest("generic decp ltw");
+ }
+
+ public void testDuplicateITDsNPE_pr173602() {
+ runTest("duplicate itd npe");
+ }
+
+ public void testLTWITDs_pr223094() {
+ runTest("ltw inherited itds");
+ }
+
+ // public void testBrokenIfArgsCflowAtAj_pr145018() {
+ // runTest("ataj crashing with cflow, if and args");
+ // }
+ public void testClassCastOnArrayType_pr180264() {
+ runTest("classcastexception on array type");
+ }
+
+ // public void testITDWithArray_pr201748() { runTest("itd with array");}
+ public void testBadMessage() {
+ runTest("incorrect itd error with generics");
+ }
+
+ public void testBadMessage2() {
+ runTest("incorrect itd error with generics - 2");
+ }
+
+ public void testHasMethodAnnoValueInt_various() {
+ runTest("hasmethod anno value - I");
+ }
+
+ public void testHasMethodAnnoValueBoolean_various() {
+ runTest("hasmethod anno value - Z");
+ }
+
+ public void testHasMethodAnnoValueString_various() {
+ runTest("hasmethod anno value - S");
+ }
+
+ public void testGenericTypeParameterizedWithArrayType_pr167197() {
+ runTest("generic type parameterized with array type");
+ }
+
+ public void testGenericTypeParameterizedWithArrayType_pr167197_2() {
+ runTest("generic type parameterized with array type - 2");
+ }
+
// AspectJ1.6.0m2 and earlier
- public void testBoundsCheckShouldFail_pr219298() { runTest("bounds check failure");}
- public void testBoundsCheckShouldFail_pr219298_2() { runTest("bounds check failure - 2");}
- public void testGenericMethodMatching_pr204505_1() { runTest("generics method matching - 1");}
- public void testGenericMethodMatching_pr204505_2() { runTest("generics method matching - 2");}
- public void testDecFieldProblem_pr218167() { runTest("dec field problem");}
- public void testGenericsSuperITD_pr206911() { runTest("generics super itd"); }
- public void testGenericsSuperITD_pr206911_2() { runTest("generics super itd - 2"); }
- public void testSerializationAnnotationStyle_pr216311() { runTest("serialization and annotation style");}
- public void testDecpRepetition_pr214559() { runTest("decp repetition problem");} // all code in one file
- public void testDecpRepetition_pr214559_2() { runTest("decp repetition problem - 2");} // all code in one file, default package
- public void testDecpRepetition_pr214559_3() { runTest("decp repetition problem - 3");} // across multiple files
- public void testISEAnnotations_pr209831() { runTest("illegal state exception with annotations");}
- public void testISEAnnotations_pr209831_2() { runTest("illegal state exception with annotations - 2");}
-
-// See HasMemberTypePattern.hasMethod()
-// public void testHasMethodSemantics() { runTest("hasmethod semantics"); }
-
-// See BcelTypeMunger line 786 relating to these
-//String sig = interMethodDispatcher.getSignature();BROKE - should get the generic signature here and use that.
-// public void testITDLostGenerics_pr211146() { runTest("itd lost generic signature");}
-// public void testITDLostGenerics_pr211146_2() { runTest("itd lost generic signature - field");}
-
- /////////////////////////////////////////
- public static Test suite() {
- return XMLBasedAjcTestCase.loadSuite(Ajc160Tests.class);
- }
-
- protected File getSpecFile() {
- return new File("../tests/src/org/aspectj/systemtest/ajc160/ajc160.xml");
- }
-
+ public void testBoundsCheckShouldFail_pr219298() {
+ runTest("bounds check failure");
+ }
+
+ public void testBoundsCheckShouldFail_pr219298_2() {
+ runTest("bounds check failure - 2");
+ }
+
+ public void testGenericMethodMatching_pr204505_1() {
+ runTest("generics method matching - 1");
+ }
+
+ public void testGenericMethodMatching_pr204505_2() {
+ runTest("generics method matching - 2");
+ }
+
+ public void testDecFieldProblem_pr218167() {
+ runTest("dec field problem");
+ }
+
+ public void testGenericsSuperITD_pr206911() {
+ runTest("generics super itd");
+ }
+
+ public void testGenericsSuperITD_pr206911_2() {
+ runTest("generics super itd - 2");
+ }
+
+ public void testSerializationAnnotationStyle_pr216311() {
+ runTest("serialization and annotation style");
+ }
+
+ public void testDecpRepetition_pr214559() {
+ runTest("decp repetition problem");
+ } // all code in one file
+
+ public void testDecpRepetition_pr214559_2() {
+ runTest("decp repetition problem - 2");
+ } // all code in one file, default package
+
+ public void testDecpRepetition_pr214559_3() {
+ runTest("decp repetition problem - 3");
+ } // across multiple files
+
+ public void testISEAnnotations_pr209831() {
+ runTest("illegal state exception with annotations");
+ }
+
+ public void testISEAnnotations_pr209831_2() {
+ runTest("illegal state exception with annotations - 2");
+ }
+
+ // See HasMemberTypePattern.hasMethod()
+ // public void testHasMethodSemantics() { runTest("hasmethod semantics"); }
+
+ // See BcelTypeMunger line 786 relating to these
+ // String sig = interMethodDispatcher.getSignature();BROKE - should get the generic signature here and use that.
+ // public void testITDLostGenerics_pr211146() { runTest("itd lost generic signature");}
+ // public void testITDLostGenerics_pr211146_2() { runTest("itd lost generic signature - field");}
+
+ // ///////////////////////////////////////
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Ajc160Tests.class);
+ }
+
+ protected File getSpecFile() {
+ return new File("../tests/src/org/aspectj/systemtest/ajc160/ajc160.xml");
+ }
+
} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
index 809d307d0..6e02e8903 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
+++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
@@ -93,6 +93,12 @@
<message kind="weave" text="Extending interface set for type 'B' (Z.java) to include 'java.io.Serializable' (Z.java)"/>
</compile>
</ajc-test>
+
+ <ajc-test dir="bugs160/various" title="hasmethod anno value - S">
+ <compile options="-1.5 -XhasMember -showWeaveInfo" files="S.java">
+ <message kind="weave" text="Extending interface set for type 'B' (S.java) to include 'java.io.Serializable' (S.java)"/>
+ </compile>
+ </ajc-test>
<ajc-test dir="bugs160/various" title="hasmethod semantics">
<compile options="-1.5 -XhasMember -Xlint:ignore" files="HasMethodSemantics.java"/>