diff options
author | aclement <aclement> | 2008-08-20 20:47:14 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-08-20 20:47:14 +0000 |
commit | fe2f8cdae5328a768922bebe387492d583901cad (patch) | |
tree | 4c37df4f1a0c5d7cf494171c2f848b3005bdbdd7 | |
parent | 42c0676d7fd909b5efc1cce7f7bcbc9e3c99f4c8 (diff) | |
download | aspectj-fe2f8cdae5328a768922bebe387492d583901cad.tar.gz aspectj-fe2f8cdae5328a768922bebe387492d583901cad.zip |
145391: moved tests 152>162 and fixed them
-rw-r--r-- | tests/bugs162/pr145391/B.class | bin | 0 -> 433 bytes | |||
-rw-r--r-- | tests/bugs162/pr145391/GenericType.java (renamed from tests/bugs152/pr145391/GenericType.java) | 0 | ||||
-rw-r--r-- | tests/bugs162/pr145391/GenericType2.java (renamed from tests/bugs152/pr145391/GenericType2.java) | 14 | ||||
-rw-r--r-- | tests/bugs162/pr145391/x/GenericType2.java | 25 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc152/ajc152.xml | 9 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/ajc162.xml | 11 |
8 files changed, 39 insertions, 24 deletions
diff --git a/tests/bugs162/pr145391/B.class b/tests/bugs162/pr145391/B.class Binary files differnew file mode 100644 index 000000000..e91f70136 --- /dev/null +++ b/tests/bugs162/pr145391/B.class diff --git a/tests/bugs152/pr145391/GenericType.java b/tests/bugs162/pr145391/GenericType.java index 897e1b729..897e1b729 100644 --- a/tests/bugs152/pr145391/GenericType.java +++ b/tests/bugs162/pr145391/GenericType.java diff --git a/tests/bugs152/pr145391/GenericType2.java b/tests/bugs162/pr145391/GenericType2.java index c5c6ab386..c99919e88 100644 --- a/tests/bugs152/pr145391/GenericType2.java +++ b/tests/bugs162/pr145391/GenericType2.java @@ -3,8 +3,6 @@ public class GenericType2<V extends Integer> { public GenericType2(V value) {} public void foo() {} -// -// public void bar() {} protected void getValue(V aV) { } @@ -17,21 +15,11 @@ public class GenericType2<V extends Integer> { aspect SomeAspect { before(GenericType2 t): call(* GenericType2.foo()) && target(t) { - // Direct call to non-generic method works -// t.bar(); - // Indirect call to non-generic method works -// t.callNormalMethod(); - // Direct call to generic method works -// t.getValue(); // Indirect call to generic method produces a NoSuchMethodError t.callGenericMethod(); } -// private void GenericType.callNormalMethod() { -// bar(); -// } - private void GenericType2.callGenericMethod() { getValue(new Integer(45)); } -}
\ No newline at end of file +} diff --git a/tests/bugs162/pr145391/x/GenericType2.java b/tests/bugs162/pr145391/x/GenericType2.java new file mode 100644 index 000000000..8d5fb565c --- /dev/null +++ b/tests/bugs162/pr145391/x/GenericType2.java @@ -0,0 +1,25 @@ +interface Bar {} + +class B implements Bar {} + +public class GenericType2<V extends Bar> { + + public GenericType2(V value) {} + + protected void getValue(V aV) { + } + public void m() { + getValue(new B()); +} +} + +aspect SomeAspect { + before(GenericType2 t): call(* GenericType2.foo()) && target(t) { + // Indirect call to generic method produces a NoSuchMethodError + t.callGenericMethod(); + } + + private void GenericType2.callGenericMethod() { +// getValue(new Integer(45)); + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java index dc7d2aede..570a51343 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java @@ -27,8 +27,6 @@ public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testSuperITDExplosion_pr134425() { runTest("super ITDs");} // public void testMisbehavingDeclareAnnotation_pr135865() { runTest("misbehaving declare annotation");} // public void testMisbehavingDeclareAnnotation_pr135865_2() { runTest("misbehaving declare annotation - 2");} -// public void testItdCallingGenericMethod_pr145391() { runTest("itd calling generic method");} -// public void testItdCallingGenericMethod_pr145391_2() { runTest("itd calling generic method - 2");} // public void testClassCastForInvalidAnnotationValue_pr148537() { runTest("classcast annotation value");} diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml index 3e7b08082..ecd73f106 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml +++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml @@ -78,10 +78,6 @@ </run> </ajc-test> - <ajc-test dir="bugs152/pr145391" title="itd calling generic method"> - <compile files="GenericType.java" options="-1.5"/> - <run class="GenericType"/> - </ajc-test> <ajc-test dir="bugs152/pr148536" title="NPE for unknown annotation"> <compile files="Bug.java" options="-1.5"> @@ -105,11 +101,6 @@ <run class="MyClass"/> </ajc-test> - <ajc-test dir="bugs152/pr145391" title="itd calling generic method - 2"> - <compile files="GenericType2.java" options="-1.5"/> - <run class="GenericType2"/> - </ajc-test> - <ajc-test dir="bugs152/pr126355" title="bizarre generic error with itds"> <compile files="Pair.java" options="-1.5"/> <compile files="Test.java" options="-1.5"/> diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java index 71cadc222..3f970fb2f 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java @@ -19,6 +19,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.2 + public void testItdCallingGenericMethod_pr145391() { runTest("itd calling generic method");} + public void testItdCallingGenericMethod_pr145391_2() { runTest("itd calling generic method - 2");} public void testPublicPointcut_pr239539() { runTest("public pointcut"); } public void testGenericDecp_pr241047() { runTest("generic decp"); } public void testGenericDecp_pr241047_2() { runTest("generic decp - 2"); } diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml index 5685bc9e5..7699dcc38 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml +++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml @@ -3,6 +3,17 @@ <!-- AspectJ v1.6.2 Tests --> <suite> + <ajc-test dir="bugs162/pr145391" title="itd calling generic method"> + <compile files="GenericType.java" options="-1.5"/> + <run class="GenericType"/> + </ajc-test> + + <ajc-test dir="bugs162/pr145391" title="itd calling generic method - 2"> + <compile files="GenericType2.java" options="-1.5"> + <message kind="error" text="The method getValue(V) in the type GenericType2<V> is not applicable for the arguments"/> + </compile> + </ajc-test> + <ajc-test dir="bugs162/pr241047" title="generic decp"> <compile files="SomeAspect.java SomeBaseClass.java SomeSubClass.java SomeSubClass2.java SomeSubClass3.java SomeInterface.java SomeBaseClass2.java SomeBaseClass3.java" options=" -Xlint:ignore -1.5"> </compile> |