summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2008-07-17 17:09:54 +0000
committeraclement <aclement>2008-07-17 17:09:54 +0000
commit49303882a2920465cf8889b7d7975bbe329696c0 (patch)
tree01f04233f660f3ae4ce0d954d3ec47c792519ad3 /tests
parent36311b94bb2057af442f50e1308b1328737e10f3 (diff)
downloadaspectj-49303882a2920465cf8889b7d7975bbe329696c0.tar.gz
aspectj-49303882a2920465cf8889b7d7975bbe329696c0.zip
239441 - testcode and fix
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs162/pr233718/ArgsBinding.java9
-rw-r--r--tests/bugs162/pr233718/ArgsMatching.java9
-rw-r--r--tests/bugs162/pr233718/Matching.java9
-rw-r--r--tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java21
-rw-r--r--tests/src/org/aspectj/systemtest/ajc162/ajc162.xml24
5 files changed, 67 insertions, 5 deletions
diff --git a/tests/bugs162/pr233718/ArgsBinding.java b/tests/bugs162/pr233718/ArgsBinding.java
new file mode 100644
index 000000000..97550ecff
--- /dev/null
+++ b/tests/bugs162/pr233718/ArgsBinding.java
@@ -0,0 +1,9 @@
+public aspect ArgsBinding {
+// public void m() {}
+// public void m(String a) {}
+ public void m(String a,String b) {}
+// public void m(int a,String b) {}
+
+
+ before(String[] p): execution(* m(..)) && args(..,p,..) {}
+}
diff --git a/tests/bugs162/pr233718/ArgsMatching.java b/tests/bugs162/pr233718/ArgsMatching.java
new file mode 100644
index 000000000..b7f29504a
--- /dev/null
+++ b/tests/bugs162/pr233718/ArgsMatching.java
@@ -0,0 +1,9 @@
+public aspect ArgsMatching {
+// public void m() {}
+// public void m(String a) {}
+ public void m(String a,String b) {}
+// public void m(int a,String b) {}
+
+
+ before(): execution(* m(..)) && args(..,String,..) {}
+}
diff --git a/tests/bugs162/pr233718/Matching.java b/tests/bugs162/pr233718/Matching.java
new file mode 100644
index 000000000..9fa60ab33
--- /dev/null
+++ b/tests/bugs162/pr233718/Matching.java
@@ -0,0 +1,9 @@
+public aspect Matching {
+ public void m() {}
+ public void m(String a) {}
+ public void m(String a,String b) {}
+ public void m(int a,String b) {}
+
+
+ before(): execution(* m(..,String,..)) {}
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
index 2cb1d3826..39563df21 100644
--- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
@@ -19,12 +19,23 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectJ1.6.2
-// public void testAnnotationDecp_pr239441() { runTest("annotation decp"); }
- 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"); }
- public void testAnnotationValueDecp_pr238992_4() { runTest("annotation value decp - 4"); }
+ public void testAnnotationDecp_pr239441() { runTest("annotation decp"); }
+// 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"); }
+// public void testAnnotationValueDecp_pr238992_4() { runTest("annotation value decp - 4"); }
+ /*
+ * test plan
+ * execution(* *(..,String,..))
+ * args(..,String,..)
+ * @args(..,Foo,..)
+ *
+ */
+// public void testParameterSubsettingMatching_pr233718_Matching() { runTest("parameter subsetting - matching");}
+// public void testParameterSubsettingMatching_pr233718_ArgsMatching() { runTest("parameter subsetting - args matching");}
+// public void testParameterSubsettingMatching_pr233718_ArgsBinding() { runTest("parameter subsetting - args binding");}
+
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc162Tests.class);
}
diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
index 5b2b599ba..e302c79e1 100644
--- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
+++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
@@ -37,5 +37,29 @@
</compile>
<run class="Foo4"/>
</ajc-test>
+
+ <ajc-test dir="bugs162/pr233718" title="parameter subsetting - matching">
+ <compile files="Matching.java" options="-1.5 -showWeaveInfo">
+ <message kind="weave" text="Join point 'method-execution(void Matching.m(java.lang.String))' in Type 'Matching' (Matching.java:3) advised by before advice from 'Matching' (Matching.java:8)"/>
+ <message kind="weave" text="'method-execution(void Matching.m(java.lang.String, java.lang.String))' in Type 'Matching' (Matching.java:4) advised by before advice from 'Matching' (Matching.java:8)"/>
+ <message kind="weave" text="'method-execution(void Matching.m(int, java.lang.String))' in Type 'Matching' (Matching.java:5) advised by before advice from 'Matching' (Matching.java:8)"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs162/pr233718" title="parameter subsetting - args matching">
+ <compile files="ArgsMatching.java" options="-1.5 -showWeaveInfo">
+ <!--
+ <message kind="weave" text="Join point 'method-execution(void Matching.m(java.lang.String))' in Type 'Matching' (Matching.java:3) advised by before advice from 'Matching' (Matching.java:8)"/>
+ <message kind="weave" text="'method-execution(void Matching.m(java.lang.String, java.lang.String))' in Type 'Matching' (Matching.java:4) advised by before advice from 'Matching' (Matching.java:8)"/>
+ <message kind="weave" text="'method-execution(void Matching.m(int, java.lang.String))' in Type 'Matching' (Matching.java:5) advised by before advice from 'Matching' (Matching.java:8)"/>
+ -->
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs162/pr233718" title="parameter subsetting - args binding">
+ <compile files="ArgsBinding.java" options="-1.5"/>
+ <run class="ArgsBinding"/>
+ </ajc-test>
+
</suite> \ No newline at end of file