aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2011-09-16 00:58:27 +0000
committeraclement <aclement>2011-09-16 00:58:27 +0000
commitfdca1771f01be020b9f8e1daec5726447d170d5e (patch)
tree7d30501bbd7f093490bfedb1cf693ace185f99a3
parent88235739345c01e4c173950488b7b92fedb8646a (diff)
downloadaspectj-fdca1771f01be020b9f8e1daec5726447d170d5e.tar.gz
aspectj-fdca1771f01be020b9f8e1daec5726447d170d5e.zip
351085
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
index 43c638702..2e6ed3ecc 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
@@ -16,6 +16,7 @@ import junit.framework.Test;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Method;
+import org.aspectj.asm.internal.ProgramElement;
import org.aspectj.testing.XMLBasedAjcTestCase;
/**
@@ -35,6 +36,37 @@ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// runTest("itd split compilation");
// }
+ public void testCorrespondingType_357582() {
+ for (int i = 0; i < 100000; i++) {
+ assertEquals("AAA", convert("AAA"));
+ assertEquals("AAA", convert("a.b.c.AAA"));
+ assertEquals("A", convert("aa.ba.ca.A"));
+ assertEquals("AAA<>", convert("a.b.c.AAA<>"));
+ assertEquals("AAA<A>", convert("a.b.c.AAA<A>"));
+ assertEquals("AAA<A>", convert("a.b.c.AAA<aa.A>"));
+ assertEquals("AAA<A,B>", convert("a.b.c.AAA<aa.A,bb.B>"));
+ assertEquals("AAA<A<B>>", convert("a.b.c.AAA<aa.A<bb.B>>"));
+ assertEquals("AAA<A<B>,AA<GG<KK>>>", convert("a.b.c.AAA<aa.A<bb.B>,a.b.c.AA<GG<KK>>>"));
+ }
+ long time = System.currentTimeMillis();
+ for (int i = 0; i < 1000000; i++) {
+ assertEquals("AAA", convert("AAA"));
+ assertEquals("AAA", convert("a.b.c.AAA"));
+ assertEquals("A", convert("aa.ba.ca.A"));
+ assertEquals("AAA<>", convert("a.b.c.AAA<>"));
+ assertEquals("AAA<A>", convert("a.b.c.AAA<A>"));
+ assertEquals("AAA<A>", convert("a.b.c.AAA<aa.A>"));
+ assertEquals("AAA<A,B>", convert("a.b.c.AAA<aa.A,bb.B>"));
+ assertEquals("AAA<A<B>>", convert("a.b.c.AAA<aa.A<bb.B>>"));
+ assertEquals("AAA<A<B>,AA<GG<KK>>>", convert("a.b.c.AAA<aa.A<bb.B>,a.b.c.AA<GG<KK>>>"));
+ }
+ System.out.println(System.currentTimeMillis() - time);
+ }
+
+ private String convert(String totrim) {
+ return ProgramElement.trim(totrim);
+ }
+
public void testPervasivePerthis_354470() throws Exception {
runTest("perthis too pervasive");
}