diff options
author | aclement <aclement> | 2005-07-27 13:43:29 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-07-27 13:43:29 +0000 |
commit | 878cb1939b40b060387d58044646a953ebc9920b (patch) | |
tree | 5466f00b1a74f8abe8eb6ac425ed1bc3db6fd0cf /tests/src | |
parent | 3ab5051f534fc054fe622e57a4684090faf98e3b (diff) | |
download | aspectj-878cb1939b40b060387d58044646a953ebc9920b.tar.gz aspectj-878cb1939b40b060387d58044646a953ebc9920b.zip |
generic decp: now polices you supply the right number of parameters and they have the right bounds on your decp statement.
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java | 16 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 18 |
2 files changed, 21 insertions, 13 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java index 32a77320c..589e0cf84 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java @@ -163,6 +163,10 @@ public class GenericsTests extends XMLBasedAjcTestCase { public void testGenericITDComplex() { runTest("more complex static member itd"); } + +// public void testGenericITFSharingTypeVariable() { +// runTest("generic intertype field declaration, sharing type variable"); +// } // public void testItdOnGenericType() { // runTest("ITDs on generic type"); @@ -229,17 +233,17 @@ public class GenericsTests extends XMLBasedAjcTestCase { verifyClassSignature("Basic6","<J:Ljava/lang/Object;>Ljava/lang/Object;LI<TJ;>;LK<Ljava/lang/Integer;>;"); } -// public void testGenericDecpIncorrectNumberOfTypeParams() { -// runTest("generic decp - incorrect number of type parameters"); -// } + public void testGenericDecpIncorrectNumberOfTypeParams() { + runTest("generic decp - incorrect number of type parameters"); + } public void testGenericDecpSpecifyingBounds() { runTest("generic decp - specifying bounds"); } -// public void testGenericDecpViolatingBounds() { -// runTest("generic decp - specifying bounds but breaking them"); -// } + public void testGenericDecpViolatingBounds() { + runTest("generic decp - specifying bounds but breaking them"); + } // need separate compilation test to verify signatures are ok // diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 6b3e4d27f..5e0101ec1 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -2386,6 +2386,15 @@ </run> </ajc-test> + <ajc-test dir="java5/generics/itds" title="generic intertype field declaration, sharing type variable"> + <compile files="FieldITDOnGeneric.aj" options="-1.5"/> + <run class="FieldITDOnGeneric"> + <stderr> + <line text="foo"/> + </stderr> + </run> + </ajc-test> + <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 1"> <compile files="Parse1.java" options="-1.5"/> </ajc-test> @@ -2456,13 +2465,8 @@ </ajc-test> <ajc-test dir="java5/generics/decp" title="generic decp - incorrect number of type parameters"> - <compile files="Basic3.aj" options="-1.5"/> - <run class="Basic3"/> - </ajc-test> - - <ajc-test dir="java5/generics/decp" title="generic decp - incorrect number of type parameters"> <compile files="Basic3.aj" options="-1.5"> - <message kind="error" line="10" text="Wrong number of type arguments; Type I requires 1"/> + <message kind="error" line="10" text="Type pattern does not match because the wrong number of type parameters are specified: Type I requires 1 parameter(s)"/> </compile> </ajc-test> @@ -2473,7 +2477,7 @@ <ajc-test dir="java5/generics/decp" title="generic decp - specifying bounds but breaking them"> <compile files="Basic5.aj" options="-1.5"> - <message kind="error" line="7" text="Type String does not meet the specification for type parameter 1 in generic type I<T extends Number>"/> + <message kind="error" line="7" text="Type java.lang.String does not meet the specification for type parameter 1 (T extends java.lang.Number) in generic type I"/> </compile> </ajc-test> |