diff options
author | acolyer <acolyer> | 2005-03-23 12:48:10 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-03-23 12:48:10 +0000 |
commit | 13a88313eac9573418a047f59d2b8e8e5bbb8c1c (patch) | |
tree | c8f31335d9df164bded347a335f310243c9e4173 /tests | |
parent | 8c80fde9d4d3c7c2d913da377f8fb2de6e4bf854 (diff) | |
download | aspectj-13a88313eac9573418a047f59d2b8e8e5bbb8c1c.tar.gz aspectj-13a88313eac9573418a047f59d2b8e8e5bbb8c1c.zip |
test and fix for handling a *... varargs pattern
Diffstat (limited to 'tests')
-rw-r--r-- | tests/java5/varargs/StarVarargsPattern.aj | 11 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 7 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/java5/varargs/StarVarargsPattern.aj b/tests/java5/varargs/StarVarargsPattern.aj new file mode 100644 index 000000000..ecaae4a44 --- /dev/null +++ b/tests/java5/varargs/StarVarargsPattern.aj @@ -0,0 +1,11 @@ +public aspect StarVarargsPattern { + + declare warning : execution(* *(..,*...)) : "you used a varargs signature"; + + void foo(Object... objs) {} // DW L 5 + + void bar(String s, String... ss) {} // DW L7 + + void goo(Integer[] is) {} + +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java b/tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java index a5eadb3af..a3a76f217 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java @@ -68,5 +68,9 @@ public class VarargsTests extends XMLBasedAjcTestCase { public void testAJDKExamples() { runTest("ajdk: varargs"); } + + public void testStarVarargs() { + runTest("star varargs pattern"); + } }
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 67370847d..4ee4988f4 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -133,6 +133,13 @@ </compile> </ajc-test> + <ajc-test dir="java5/varargs" title="star varargs pattern" vm="1.5"> + <compile files="StarVarargsPattern.aj" options="-1.5"> + <message kind="warning" line="5" text="you used a varargs signature"/> + <message kind="warning" line="7" text="you used a varargs signature"/> + </compile> + </ajc-test> + <ajc-test dir="java5/annotations" title="invalid cons syntax" vm="1.5"> <compile files="SyntaxError.aj" options="-1.5"> <message kind="error" line="3" text="Syntax error on token "new", "method name (not constructor)" expected"/> |