summaryrefslogtreecommitdiffstats
path: root/weaver5/java5-testsrc
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2012-04-16 15:03:37 -0700
committerAndy Clement <andrew.clement@gmail.com>2012-04-16 15:03:37 -0700
commit503bc62a4441ca925873b92a6d27170673461ebf (patch)
treec5fea6d54a102449e925f9f84783aff9bff8c107 /weaver5/java5-testsrc
parent463c5f1d3eab245424929395fc7239fdc04e1eaa (diff)
downloadaspectj-503bc62a4441ca925873b92a6d27170673461ebf.tar.gz
aspectj-503bc62a4441ca925873b92a6d27170673461ebf.zip
376918
Diffstat (limited to 'weaver5/java5-testsrc')
-rw-r--r--weaver5/java5-testsrc/org/aspectj/weaver/CommonReferenceTypeTests.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/weaver5/java5-testsrc/org/aspectj/weaver/CommonReferenceTypeTests.java b/weaver5/java5-testsrc/org/aspectj/weaver/CommonReferenceTypeTests.java
index c84369758..8d683e8af 100644
--- a/weaver5/java5-testsrc/org/aspectj/weaver/CommonReferenceTypeTests.java
+++ b/weaver5/java5-testsrc/org/aspectj/weaver/CommonReferenceTypeTests.java
@@ -33,6 +33,28 @@ public abstract class CommonReferenceTypeTests extends TestCase {
assertEquals("Signatures not equal ", "[Pjava/util/List<Pjava/util/List<Ljava/lang/String;>;>;", ut.getSignature());
assertEquals("Names not equal ", "java.util.List<java.util.List<java.lang.String>>[]", ut.getName());
}
+
+ public void testArrays() {
+ world.setBehaveInJava5Way(true);
+ UnresolvedType ut = null;
+ ut = UnresolvedType.forName("[Ljava.lang.String;");
+ assertEquals("[Ljava/lang/String;",ut.getSignature());
+ UnresolvedType reified = UnresolvedType.forSignature(ut.getSignature());
+ ResolvedType rt = world.resolve(reified);
+ assertEquals("[Ljava/lang/String;",rt.getSignature());
+ assertEquals("java.lang.String[]",rt.getName());
+ assertFalse(rt.isMissing());
+
+ ut = UnresolvedType.forName("[[[[Ljava.lang.String;");
+ assertEquals("[[[[Ljava/lang/String;",ut.getSignature());
+ reified = UnresolvedType.forSignature(ut.getSignature());
+ rt = world.resolve(reified);
+ assertEquals("[[[[Ljava/lang/String;",rt.getSignature());
+ assertEquals("java.lang.String[][][][]",rt.getName());
+ assertTrue(rt.isArray());
+ assertTrue(rt.getComponentType().isArray());
+ assertFalse(rt.isMissing());
+ }
public void testIsRawTrue() {
world.setBehaveInJava5Way(true);