diff options
-rw-r--r-- | tests/java5/varargs/SimpleVarargs.java | 25 | ||||
-rw-r--r-- | tests/java5/varargs/VarargsAspect01.aj | 5 | ||||
-rw-r--r-- | tests/java5/varargs/VarargsAspect02.aj | 5 | ||||
-rw-r--r-- | tests/java5/varargs/VarargsAspect03.aj | 5 | ||||
-rw-r--r-- | tests/java5/varargs/VarargsAspect04.aj | 5 | ||||
-rw-r--r-- | tests/java5/varargs/build.xml | 11 | ||||
-rw-r--r-- | tests/java5/varargs/testcode.jar | bin | 0 -> 618 bytes |
7 files changed, 56 insertions, 0 deletions
diff --git a/tests/java5/varargs/SimpleVarargs.java b/tests/java5/varargs/SimpleVarargs.java new file mode 100644 index 000000000..4060443ee --- /dev/null +++ b/tests/java5/varargs/SimpleVarargs.java @@ -0,0 +1,25 @@ +public class SimpleVarargs { + + public SimpleVarargs(Integer... strings) {} + + public void foo(Integer... strings) { } + +//public void bar(Integer[] array) { } + + public void fooInt(int i,Integer... strings) {} + +//public void barInt(int i,Integer[] strings) {} + + public static void main(String[] argv) { + SimpleVarargs s = new SimpleVarargs(new Integer(45)); + s.foo(new Integer(45)); + s.foo(new Integer(45),new Integer(45)); + s.foo(new Integer[]{new Integer(45),new Integer(45)}); +// s.bar(new Integer[]{new Integer(45),new Integer(45)}); + + s.fooInt(1,new Integer(45)); + s.fooInt(2,new Integer(45),new Integer(45)); + s.fooInt(3,new Integer[]{new Integer(45),new Integer(45)}); +// s.barInt(4,new Integer[]{new Integer(45),new Integer(45)}); + } +} diff --git a/tests/java5/varargs/VarargsAspect01.aj b/tests/java5/varargs/VarargsAspect01.aj new file mode 100644 index 000000000..8b30c7017 --- /dev/null +++ b/tests/java5/varargs/VarargsAspect01.aj @@ -0,0 +1,5 @@ +public aspect VarargsAspect01 {
+
+ before(): call(* *(Integer[])) { }
+
+}
diff --git a/tests/java5/varargs/VarargsAspect02.aj b/tests/java5/varargs/VarargsAspect02.aj new file mode 100644 index 000000000..a64b7462d --- /dev/null +++ b/tests/java5/varargs/VarargsAspect02.aj @@ -0,0 +1,5 @@ +public aspect VarargsAspect02 {
+
+ before(): execution(* *(Integer[])) { }
+
+}
diff --git a/tests/java5/varargs/VarargsAspect03.aj b/tests/java5/varargs/VarargsAspect03.aj new file mode 100644 index 000000000..c1b37e1bf --- /dev/null +++ b/tests/java5/varargs/VarargsAspect03.aj @@ -0,0 +1,5 @@ +public aspect VarargsAspect03 {
+
+ before(): initialization(new(Integer[])) { }
+
+}
diff --git a/tests/java5/varargs/VarargsAspect04.aj b/tests/java5/varargs/VarargsAspect04.aj new file mode 100644 index 000000000..1eb425536 --- /dev/null +++ b/tests/java5/varargs/VarargsAspect04.aj @@ -0,0 +1,5 @@ +public aspect VarargsAspect04 {
+
+ before(): withincode(* *(Integer[])) && call(* *(..)) { }
+
+}
diff --git a/tests/java5/varargs/build.xml b/tests/java5/varargs/build.xml new file mode 100644 index 000000000..d38a7705f --- /dev/null +++ b/tests/java5/varargs/build.xml @@ -0,0 +1,11 @@ +<project name="Java 5 compilation of test source" default="default" basedir="."> + + <target name="default" > + <delete dir="output" failonerror="false"/> + <mkdir dir="output"/> + <javac destdir="output" debug="on" srcdir="." includes="*.java"/> + <zip file="testcode.jar" basedir="output" includes="**/*"/> + <delete dir="output"/> + </target> + +</project> diff --git a/tests/java5/varargs/testcode.jar b/tests/java5/varargs/testcode.jar Binary files differnew file mode 100644 index 000000000..86331bbeb --- /dev/null +++ b/tests/java5/varargs/testcode.jar |