aboutsummaryrefslogtreecommitdiffstats
path: root/weaver/testsrc/org
diff options
context:
space:
mode:
Diffstat (limited to 'weaver/testsrc/org')
-rw-r--r--weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
index 3219b2f15..1ba812845 100644
--- a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
@@ -61,6 +61,21 @@ public class TypeXTestCase extends TestCase {
assertEquals(t.getOutermostType(), TypeX.forName("java.util.Map"));
assertEquals(TypeX.forName("java.util.Map").getOutermostType(), TypeX.forName("java.util.Map"));
}
+
+ public void testNameAndSigWithParameters() {
+ TypeX t = TypeX.forName("java.util.List<java.lang.String>");
+ assertEquals(t.getName(),"java.util.List<java.lang.String>");
+ assertEquals(t.getSignature(),"Ljava/util/List<Ljava/lang/String;>;");
+ t = new TypeX("Ljava/util/List<Ljava/lang/String;>;");
+ assertEquals(t.getName(),"java.util.List<java.lang.String>");
+ assertEquals(t.getSignature(),"Ljava/util/List<Ljava/lang/String;>;");
+ t = TypeX.forName("java.util.Map<java.util.String,java.util.List<java.lang.Integer>>");
+ assertEquals(t.getName(),"java.util.Map<java.util.String,java.util.List<java.lang.Integer>>");
+ assertEquals(t.getSignature(),"Ljava/util/Map<Ljava/util/String;Ljava/util/List<Ljava/lang/Integer;>;>;");
+ t = new TypeX("Ljava/util/Map<Ljava/util/String;Ljava/util/List<Ljava/lang/Integer;>;>;");
+ assertEquals(t.getName(),"java.util.Map<java.util.String,java.util.List<java.lang.Integer>>");
+ assertEquals(t.getSignature(),"Ljava/util/Map<Ljava/util/String;Ljava/util/List<Ljava/lang/Integer;>;>;");
+ }
private void isPrimitiveTest(TypeX[] types, boolean[] isPrimitives) {
for (int i = 0, len = types.length; i < len; i++) {