]> source.dussan.org Git - aspectj.git/commitdiff
aspectpath weave tests - disabled pending weaveinfo suppression
authorwisberg <wisberg>
Wed, 6 Oct 2004 10:38:42 +0000 (10:38 +0000)
committerwisberg <wisberg>
Wed, 6 Oct 2004 10:38:42 +0000 (10:38 +0000)
tests/ajcHarnessTests.xml
tests/harness/aspectpath/A.java [new file with mode: 0644]
tests/harness/aspectpath/Main.java [new file with mode: 0644]

index 56c098a38b9529196676410e78ec3140cbd645a4..76cef4c506ed020333ac1aacf860ea3c2837d3d8 100644 (file)
                fork="true" 
                vmargs="-DPASS=true,-Dname=value"/>
     </ajc-test>
+    <ajc-test dir="harness/aspectpath"
+               title="pass aspectpath LTW aspect works in one compile">
+        <compile files="A.java,Main.java"/>
+        <run class="Main"/> 
+    </ajc-test>
+
+    <ajc-test dir="harness/aspectpath"
+               keywords="expect-fail"
+               title="fail aspectpath LTW failure case">
+        <compile files="Main.java"/>
+        <run class="Main"/> 
+    </ajc-test>
+
+       <!-- uncomment after weaveinfo messages 
+         (which cause false negatives) are suppressed
+    <ajc-test dir="harness/aspectpath"
+               title="pass aspectpath LTW">
+        <compile files="A.java" outjar="out.jar"/>
+        <compile files="Main.java"/>
+        <run class="Main" aspectpath="out.jar"/> 
+    </ajc-test>
+    -->
 
 </suite>
 
diff --git a/tests/harness/aspectpath/A.java b/tests/harness/aspectpath/A.java
new file mode 100644 (file)
index 0000000..267b267
--- /dev/null
@@ -0,0 +1,6 @@
+
+aspect A {
+    before() : execution(void main(String[])) {
+        System.setProperty("A.before", "true");
+    }
+}
\ No newline at end of file
diff --git a/tests/harness/aspectpath/Main.java b/tests/harness/aspectpath/Main.java
new file mode 100644 (file)
index 0000000..15b5d74
--- /dev/null
@@ -0,0 +1,8 @@
+
+public class Main {
+    public static void main(String[] args) {
+        if (!Boolean.getBoolean("A.before")) {
+            throw new Error("property A.before not set by aspect A.java");
+        }
+    }
+}
\ No newline at end of file