aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs153
diff options
context:
space:
mode:
authormwebster <mwebster>2006-11-06 13:50:14 +0000
committermwebster <mwebster>2006-11-06 13:50:14 +0000
commit36ba801b8f3f45f8c9acd2af2b03489958b97b55 (patch)
tree4cbba55ea756e74e2a6afa2cc971767ca6d44d2d /tests/bugs153
parent4add2e21b067b1e0ea1fb6e862d5c22429336c4a (diff)
downloadaspectj-36ba801b8f3f45f8c9acd2af2b03489958b97b55.tar.gz
aspectj-36ba801b8f3f45f8c9acd2af2b03489958b97b55.zip
Bug 155033 "Use ajcore for LTW problems" (add ajcore LTW testcases)
Diffstat (limited to 'tests/bugs153')
-rw-r--r--tests/bugs153/pr155033/Annotation.java1
-rw-r--r--tests/bugs153/pr155033/Aspect.aj9
-rw-r--r--tests/bugs153/pr155033/Class1.java8
-rw-r--r--tests/bugs153/pr155033/Class2.java8
-rw-r--r--tests/bugs153/pr155033/Class3.java7
-rw-r--r--tests/bugs153/pr155033/MultipleDumpTest.java24
-rw-r--r--tests/bugs153/pr155033/ant.xml27
-rw-r--r--tests/bugs153/pr155033/aop-multipledumponerror.xml4
8 files changed, 88 insertions, 0 deletions
diff --git a/tests/bugs153/pr155033/Annotation.java b/tests/bugs153/pr155033/Annotation.java
new file mode 100644
index 000000000..12f6811c7
--- /dev/null
+++ b/tests/bugs153/pr155033/Annotation.java
@@ -0,0 +1 @@
+@interface Annotation {} \ No newline at end of file
diff --git a/tests/bugs153/pr155033/Aspect.aj b/tests/bugs153/pr155033/Aspect.aj
new file mode 100644
index 000000000..60b1b57c2
--- /dev/null
+++ b/tests/bugs153/pr155033/Aspect.aj
@@ -0,0 +1,9 @@
+public aspect Aspect {
+
+ declare @method : public static void main(String[]) : @Annotation;
+
+ before () : execution(public Class*.new()) {
+ System.out.println("? Aspect.before()");
+ }
+
+} \ No newline at end of file
diff --git a/tests/bugs153/pr155033/Class1.java b/tests/bugs153/pr155033/Class1.java
new file mode 100644
index 000000000..aae2faf15
--- /dev/null
+++ b/tests/bugs153/pr155033/Class1.java
@@ -0,0 +1,8 @@
+public class Class1 /*implements MissingInterface*/ {
+
+ @Annotation
+ public static void main(String[] args) {
+ System.out.println("? Class1.main()");
+ new Class1();
+ }
+} \ No newline at end of file
diff --git a/tests/bugs153/pr155033/Class2.java b/tests/bugs153/pr155033/Class2.java
new file mode 100644
index 000000000..bfbd85e6d
--- /dev/null
+++ b/tests/bugs153/pr155033/Class2.java
@@ -0,0 +1,8 @@
+public class Class2 /*implements MissingInterface*/ {
+
+ @Annotation
+ public static void main(String[] args) {
+ System.out.println("? Class2.main()");
+ new Class2();
+ }
+} \ No newline at end of file
diff --git a/tests/bugs153/pr155033/Class3.java b/tests/bugs153/pr155033/Class3.java
new file mode 100644
index 000000000..9577464dd
--- /dev/null
+++ b/tests/bugs153/pr155033/Class3.java
@@ -0,0 +1,7 @@
+public class Class3 {
+
+ public static void main(String[] args) {
+ System.out.println("? Class3.main()");
+ new Class3();
+ }
+} \ No newline at end of file
diff --git a/tests/bugs153/pr155033/MultipleDumpTest.java b/tests/bugs153/pr155033/MultipleDumpTest.java
new file mode 100644
index 000000000..554460bb1
--- /dev/null
+++ b/tests/bugs153/pr155033/MultipleDumpTest.java
@@ -0,0 +1,24 @@
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+public class MultipleDumpTest {
+
+ public static void main(String[] args) throws Exception {
+ System.out.println("? MultipleDumpTest.main()");
+ invokeMain("Class1",args);
+ invokeMain("Class2",args);
+ invokeMain("Class3",args);
+ }
+
+ private static void invokeMain (String className, String[] args) throws Exception
+ {
+ Class clazz = Class.forName(className);
+ Class[] paramTypes = new Class[1];
+ paramTypes[0] = args.getClass();
+
+ Method method = clazz.getDeclaredMethod("main",paramTypes);
+ Object[] params = new Object[1];
+ params[0] = args;
+ method.invoke(null,params);
+ }
+} \ No newline at end of file
diff --git a/tests/bugs153/pr155033/ant.xml b/tests/bugs153/pr155033/ant.xml
new file mode 100644
index 000000000..5995cb9d5
--- /dev/null
+++ b/tests/bugs153/pr155033/ant.xml
@@ -0,0 +1,27 @@
+<!-- ajc-ant script, not to be used from Ant commant line - see AntSpec -->
+<project name="ltw">
+
+ <!-- using this we can debug the forked VM -->
+ <property
+ name="jdwp"
+ value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>
+ <property name="aj.bootpath" refid="aj.path"/>
+
+ <target name="multiple dump on error">
+ <copy file="aop-multipledumponerror.xml"
+ tofile="${aj.sandbox}/META-INF/aop.xml"/>
+ <java fork="yes" classname="MultipleDumpTest" failonerror="yes">
+ <classpath refid="aj.path"/>
+ <jvmarg value="-Dorg.aspectj.weaver.Dump.condition=error"/>
+ <sysproperty key="org.aspectj.dump.directory" path="${aj.sandbox}"/>
+ <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+<!-- <jvmarg line="${jdwp}"/>-->
+<!--
+ <jvmarg value="-Dorg.aspectj.tracing.enabled=true"/>
+ <jvmarg value="-Dorg.aspectj.tracing.factory=default"/>
+ <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
+-->
+ </java>
+ </target>
+
+</project>
diff --git a/tests/bugs153/pr155033/aop-multipledumponerror.xml b/tests/bugs153/pr155033/aop-multipledumponerror.xml
new file mode 100644
index 000000000..c3c75fb47
--- /dev/null
+++ b/tests/bugs153/pr155033/aop-multipledumponerror.xml
@@ -0,0 +1,4 @@
+<aspectj>
+ <!--<weaver options="-XmessageHandlerClass:AbortingMessageHandler -debug -XnoInline -Xlint:error"/>-->
+ <weaver options="-1.5 -Xlint:error"/>
+</aspectj> \ No newline at end of file