diff options
Diffstat (limited to 'tests/new/ArrayMethod.java')
-rw-r--r-- | tests/new/ArrayMethod.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/new/ArrayMethod.java b/tests/new/ArrayMethod.java new file mode 100644 index 000000000..5018e992d --- /dev/null +++ b/tests/new/ArrayMethod.java @@ -0,0 +1,27 @@ +import org.aspectj.testing.*; + +public class ArrayMethod { + public static void main(String[] args) { + new ArrayMethod().go(); + Tester.check(true, "compiled"); + } + + void go() { + try { + int[] array1 = array1(); + int[] array2 = array2(); + for (int i = 0; i < array1.length; i++) { + Tester.checkEqual(array1[i],i); + Tester.checkEqual(array2[i],i); + } + } catch (Exception e) { + } + } + + int array1()[] throws Exception { + return new int[] {0,1,2}; + } + int[] array2() throws Exception { + return new int[] {0,1,2}; + } +} |