summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2008-07-17 17:37:33 +0000
committeraclement <aclement>2008-07-17 17:37:33 +0000
commitccfe4bf346a7f8145116fcecd68ee93df20f2055 (patch)
tree91a17d98c1010b2447677800d420888016a9b88b /tests
parentdf587ce7e378af478e7ee4eca3e998ea728ab05d (diff)
downloadaspectj-ccfe4bf346a7f8145116fcecd68ee93df20f2055.tar.gz
aspectj-ccfe4bf346a7f8145116fcecd68ee93df20f2055.zip
198181 - testcode
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs162/pr198181/A.java14
-rw-r--r--tests/bugs162/pr198181/M.java10
-rw-r--r--tests/bugs162/pr198181/aop.xml7
-rw-r--r--tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc162/ajc162.xml11
5 files changed, 43 insertions, 0 deletions
diff --git a/tests/bugs162/pr198181/A.java b/tests/bugs162/pr198181/A.java
new file mode 100644
index 000000000..7168ccfc6
--- /dev/null
+++ b/tests/bugs162/pr198181/A.java
@@ -0,0 +1,14 @@
+package m;
+
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect("pertarget(execution( public void m.M.run() ))")
+public class A {
+ int i;
+ @Around("execution( public void m.M.run() )")
+ public void count() {
+// System.out.println(this);
+ System.out.println("tick " + (i++));
+ }
+}
diff --git a/tests/bugs162/pr198181/M.java b/tests/bugs162/pr198181/M.java
new file mode 100644
index 000000000..ce7aff9d2
--- /dev/null
+++ b/tests/bugs162/pr198181/M.java
@@ -0,0 +1,10 @@
+package m;
+public class M {
+ public void run() {
+ }
+ public static void main(String[] args) {
+ for (int i = 0; i < 3; i++) {
+ new M().run();
+ }
+ }
+}
diff --git a/tests/bugs162/pr198181/aop.xml b/tests/bugs162/pr198181/aop.xml
new file mode 100644
index 000000000..90fcc9a64
--- /dev/null
+++ b/tests/bugs162/pr198181/aop.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<aspectj>
+ <aspects>
+ <aspect name="m.A"/>
+ </aspects>
+ <weaver options="-verbose -showWeaveInfo"/>
+</aspectj> \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
index 39563df21..92a8f0cb0 100644
--- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
@@ -20,6 +20,7 @@ public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectJ1.6.2
public void testAnnotationDecp_pr239441() { runTest("annotation decp"); }
+ public void testAtAspectJPerTarget_pr198181() { runTest("ataspectj ltw pertarget"); }
// public void testAnnotationValueDecp_pr238992() { runTest("annotation value decp"); }
// public void testAnnotationValueDecp_pr238992_2() { runTest("annotation value decp - 2"); }
// public void testAnnotationValueDecp_pr238992_3() { runTest("annotation value decp - 3"); }
diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
index e302c79e1..bdc633a97 100644
--- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
+++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
@@ -61,5 +61,16 @@
<run class="ArgsBinding"/>
</ajc-test>
+ <ajc-test dir="bugs162/pr198181" title="ataspectj ltw pertarget">
+ <compile files="M.java" outjar="code.jar"/>
+ <compile files="A.java" classpath="code.jar" options="-1.5 -Xlint:ignore"/>
+ <run class="m.M" classpath="$sandbox/code.jar" ltw="aop.xml">
+ <stdout>
+ <line text="tick 0"/>
+ <line text="tick 0"/>
+ <line text="tick 0"/>
+ </stdout>
+ </run>
+ </ajc-test>
</suite> \ No newline at end of file