diff options
author | acolyer <acolyer> | 2005-09-12 20:17:18 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-09-12 20:17:18 +0000 |
commit | 056db42f1697ed27a47e04759bfb8162acd92590 (patch) | |
tree | 3dc54476bd1499898f669af72162f03df065e90b /weaver/testsrc | |
parent | 776613eebf410baacd178bf73f3de0783f5df98f (diff) | |
download | aspectj-056db42f1697ed27a47e04759bfb8162acd92590.tar.gz aspectj-056db42f1697ed27a47e04759bfb8162acd92590.zip |
tests and a fix for the bug with no name, in which Pooh gets carried away and tries to create raw types all the time, but Christopher Robin kindly explains that raw types should only be created in -1.5 mode.
Diffstat (limited to 'weaver/testsrc')
-rw-r--r-- | weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java | 4 | ||||
-rw-r--r-- | weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java b/weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java index 1e0e435c7..0d84c135a 100644 --- a/weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java @@ -21,6 +21,7 @@ public class ReferenceTypeTestCase extends TestCase { public void testIsRawTrue() { BcelWorld world = new BcelWorld(); + world.setBehaveInJava5Way(true); UnresolvedType javaLangClass = UnresolvedType.forName("java.lang.Class"); ResolvedType rtx = world.resolve(javaLangClass); assertTrue("Resolves to reference type",(rtx instanceof ReferenceType)); @@ -30,6 +31,7 @@ public class ReferenceTypeTestCase extends TestCase { public void testIsRawFalse() { BcelWorld world = new BcelWorld(); + world.setBehaveInJava5Way(true); UnresolvedType javaLangObject = UnresolvedType.forName("java.lang.Object"); ResolvedType rtx = world.resolve(javaLangObject); assertTrue("Resolves to reference type",(rtx instanceof ReferenceType)); @@ -39,6 +41,7 @@ public class ReferenceTypeTestCase extends TestCase { public void testIsGenericTrue() { BcelWorld world = new BcelWorld(); + world.setBehaveInJava5Way(true); UnresolvedType javaLangClass = UnresolvedType.forName("java.lang.Class"); ResolvedType rtx = world.resolve(javaLangClass); assertTrue("java.lang.Class has underpinning generic type",rtx.getGenericType().isGenericType()); @@ -46,6 +49,7 @@ public class ReferenceTypeTestCase extends TestCase { public void testIsGenericFalse() { BcelWorld world = new BcelWorld(); + world.setBehaveInJava5Way(true); UnresolvedType javaLangObject = UnresolvedType.forName("java.lang.Object"); ResolvedType rtx = world.resolve(javaLangObject); assertFalse(rtx.isGenericType()); diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java index 59fdb7d63..e9db3caa8 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java @@ -450,6 +450,7 @@ import org.aspectj.weaver.bcel.BcelWorld; protected void setUp() throws Exception { super.setUp(); this.world = new BcelWorld(); + this.world.setBehaveInJava5Way(true); this.bindings = new Bindings(0); this.scope = new SimpleScope(world , new FormalBinding[] {}); this.scope.setImportedPrefixes(new String[] {"java.io.","java.util.","java.lang."}); |