aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2005-11-07 10:53:18 +0000
committeraclement <aclement>2005-11-07 10:53:18 +0000
commita625ea2ed4810fb5aa1334c027418d25cfb37834 (patch)
tree6b02edf6c31afafd77ecb4bdc28ca802b4c49596 /tests
parente9e0a7be5be07919d74f7da12fa59232a8b81a1e (diff)
downloadaspectj-a625ea2ed4810fb5aa1334c027418d25cfb37834.tar.gz
aspectj-a625ea2ed4810fb5aa1334c027418d25cfb37834.zip
fix for 95516 (-outxml / -outxmlfile) - from Matthew.
Diffstat (limited to 'tests')
-rw-r--r--tests/ltw/pakkage/Aspect3.aj23
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java13
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ltw/ltw-tests.xml57
4 files changed, 91 insertions, 4 deletions
diff --git a/tests/ltw/pakkage/Aspect3.aj b/tests/ltw/pakkage/Aspect3.aj
new file mode 100644
index 000000000..08894259e
--- /dev/null
+++ b/tests/ltw/pakkage/Aspect3.aj
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Contributors.
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster initial implementation
+ *******************************************************************************/
+package pakkage;
+
+import org.aspectj.lang.JoinPoint;
+
+public aspect Aspect3 {
+
+ declare precedence : *, Aspect3;
+
+ before () : execution(void Main.test2()){
+ System.err.println("pakkage.Aspect3.before_" + thisJoinPoint.getSignature().getName());
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index 3a7560290..915c55794 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -51,7 +51,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testITDCtor_pr112783() { runTest("Problem with constructor ITDs");}
*/
- //public void testPossibleStaticImports_pr113066() { runTest("possible static imports bug");}
+ public void testPossibleStaticImports_pr113066() { runTest("possible static imports bug");}
public void testBrokenDecp_pr112476() { runTest("binary weaving decp broken");}
public void testUnboundFormal_pr112027() { runTest("unexpected error unboundFormalInPC");}
public void testNPEScopeSetup_pr115038() { runTest("NPE in ensureScopeSetup");}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java b/tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java
index 543d586e8..3b489cf07 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java
@@ -28,8 +28,15 @@ public class LTWTests extends org.aspectj.testing.XMLBasedAjcTestCase {
}
- public void test001(){
- runTest("Ensure 1st aspect is rewoven when weaving 2nd aspect");
- }
+ public void test001(){
+ runTest("Ensure 1st aspect is rewoven when weaving 2nd aspect");
+ }
+
+ public void testOutxmlFile (){
+ runTest("Ensure valid aop.xml file is generated");
+ }
+ public void testOutxmlJar (){
+ runTest("Ensure valid aop.xml is generated for -outjar");
+ }
}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ltw/ltw-tests.xml b/tests/src/org/aspectj/systemtest/ajc150/ltw/ltw-tests.xml
index 0e818afbf..34f2f3dab 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ltw/ltw-tests.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ltw/ltw-tests.xml
@@ -30,4 +30,61 @@
</run>
</ajc-test>
+ <ajc-test dir="ltw"
+ title="Ensure valid aop.xml file is generated"
+ keywords="-outxml">
+ <compile
+ files="Main.java"
+ outjar="main.jar"
+ >
+ </compile>
+ <compile
+ classpath="main.jar"
+ files="Aspect1.aj, Aspect2.aj, pakkage/Aspect3.aj"
+ outxmlfile="META-INF/aop.xml"
+ >
+ </compile>
+ <run class="Main" ltw="">
+ <stdout>
+ <line text="Main.main"/>
+ <line text="Main.test1"/>
+ <line text="Main.test2"/>
+ </stdout>
+ <stderr>
+ <line text="Aspect1.before_test1"/>
+ <line text="Aspect2.before_test2"/>
+ <line text="pakkage.Aspect3.before_test2"/>
+ </stderr>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="ltw"
+ title="Ensure valid aop.xml is generated for -outjar"
+ keywords="-outxml">
+ <compile
+ files="Main.java"
+ outjar="main.jar"
+ >
+ </compile>
+ <compile
+ classpath="main.jar"
+ files="Aspect1.aj, Aspect2.aj, pakkage/Aspect3.aj"
+ outjar="aspects.jar"
+ options="-outxml"
+ >
+ </compile>
+ <run class="Main" ltw="">
+ <stdout>
+ <line text="Main.main"/>
+ <line text="Main.test1"/>
+ <line text="Main.test2"/>
+ </stdout>
+ <stderr>
+ <line text="Aspect1.before_test1"/>
+ <line text="Aspect2.before_test2"/>
+ <line text="pakkage.Aspect3.before_test2"/>
+ </stderr>
+ </run>
+ </ajc-test>
+