summaryrefslogtreecommitdiffstats
path: root/tests/new/ClassForName.java
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-05-01 00:21:12 +0000
committerjhugunin <jhugunin>2003-05-01 00:21:12 +0000
commit50a7291088bb04a856e5cf6ff31606b86213b052 (patch)
tree8976ab069a905be53cfa913bc35ec8c23004cfa6 /tests/new/ClassForName.java
parenta9823f122ff3c9322c136292c45c1f9ea7cddc0a (diff)
downloadaspectj-50a7291088bb04a856e5cf6ff31606b86213b052.tar.gz
aspectj-50a7291088bb04a856e5cf6ff31606b86213b052.zip
Added easy to understand test for issue of Class.forName differences
between IBM and SUN's JDKs Moved a nit-picking part of SourceLocationWithExpr to its own test that is listed as a known limitation.
Diffstat (limited to 'tests/new/ClassForName.java')
-rw-r--r--tests/new/ClassForName.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/new/ClassForName.java b/tests/new/ClassForName.java
new file mode 100644
index 000000000..83b8a62c5
--- /dev/null
+++ b/tests/new/ClassForName.java
@@ -0,0 +1,22 @@
+
+import org.aspectj.testing.Tester;
+import java.util.*;
+
+public class ClassForName {
+ public static void main(String[] args) throws ClassNotFoundException {
+ Class c1 = String[].class;
+ Class c2 = Class.forName("[Ljava.lang.String;");
+ Class c3 = ClassForName.class.getClassLoader().loadClass("[Ljava.lang.String;");
+
+ Tester.checkEqual(c1, c2, "classes c1, c2");
+ Tester.checkEqual(c2, c3, "classes c2, c3");
+
+ Tester.checkEqual(c1.getComponentType(), String.class, "component");
+ }
+}
+
+aspect A {
+ before(): execution(void main(..)) {
+ System.out.println(thisJoinPointStaticPart);
+ }
+}