aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-06-23 07:38:55 +0000
committeraclement <aclement>2006-06-23 07:38:55 +0000
commit5b90af1d60b15994abaef2c9391b890b8605c482 (patch)
treee49cd007b6a874089fcc483b67fd830db14927b2 /tests
parent4dafe048cb1f5bf9a30fcfac58011fe425141b91 (diff)
downloadaspectj-5b90af1d60b15994abaef2c9391b890b8605c482.tar.gz
aspectj-5b90af1d60b15994abaef2c9391b890b8605c482.zip
unfinished (not sure of expected output) testcase committed for 147841
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs152/pr147841/A.java12
-rw-r--r--tests/bugs152/pr147841/C.java19
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/ajc152.xml13
4 files changed, 45 insertions, 0 deletions
diff --git a/tests/bugs152/pr147841/A.java b/tests/bugs152/pr147841/A.java
new file mode 100644
index 000000000..715918494
--- /dev/null
+++ b/tests/bugs152/pr147841/A.java
@@ -0,0 +1,12 @@
+package pkg;
+
+public aspect A {
+
+ before() : execution(* pack.C.method1()) && this(pack.C) {
+ System.err.println("before exec method1 and this is C");
+ }
+
+ before() : call(* pack.C.method2()) && target(pack.C) {
+ System.err.println("before call to method2 and target is C");
+ }
+}
diff --git a/tests/bugs152/pr147841/C.java b/tests/bugs152/pr147841/C.java
new file mode 100644
index 000000000..3b6b49021
--- /dev/null
+++ b/tests/bugs152/pr147841/C.java
@@ -0,0 +1,19 @@
+package pack;
+
+public class C {
+
+ public C() {
+ }
+
+ public void method1() {
+ new C().method2();
+ }
+
+ public void method2() {
+ }
+
+ public static void main(String[] args) {
+ new C().method1();
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
index 906695d5f..202e592a4 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
@@ -33,6 +33,7 @@ public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// public void testBrokenIfArgsCflowAtAj_pr145018() { runTest("ataj crashing with cflow, if and args");}
// public void testItdCallingGenericMethod_pr145391() { runTest("itd calling generic method");}
// public void testItdCallingGenericMethod_pr145391_2() { runTest("itd calling generic method - 2");}
+// public void testAdviceNotWovenAspectPath_pr147841() { runTest("advice not woven on aspectpath");}
public void testDuplicateBridgeMethods_pr147801_1() { runTest("duplicate bridge methods");}
public void testPackageIgnoredForException_pr147701_1() { runTest("package for exception ignored");}
public void testPackageIgnoredForException_pr147701_2() { runTest("package for exception ignored - 2");}
diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
index b4244e827..1505d989a 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
+++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
@@ -78,6 +78,19 @@
</run>
</ajc-test>
+ <ajc-test dir="bugs152/pr147841" title="advice not woven on aspectpath">
+ <compile files="A.java" options="-Xlint:ignore" outjar="apath.jar"/>
+ <!--compile files="C.java" outjar="cpa.jar" classpath="cpath.jar"/-->
+ <compile files="C.java" options="-showWeaveInfo" aspectpath="apath.jar">
+ <message kind="weave" text="foo"/>
+ </compile>
+ <run class="C">
+ <stderr>
+ <line text="foo"/>
+ </stderr>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs152/pr145693" title="verifyErrNoTypeCflowField">
<compile files="Event.java" outjar="cpath.jar"/>
<compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>