diff options
author | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
commit | 144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch) | |
tree | b12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/ArrayInc1CE.java | |
parent | fafae443719b26159ab2d7dac1c9b46b5e00b671 (diff) | |
download | aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip |
initial version
Diffstat (limited to 'tests/new/ArrayInc1CE.java')
-rw-r--r-- | tests/new/ArrayInc1CE.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/new/ArrayInc1CE.java b/tests/new/ArrayInc1CE.java new file mode 100644 index 000000000..5ebd86112 --- /dev/null +++ b/tests/new/ArrayInc1CE.java @@ -0,0 +1,29 @@ + +/** + * @testcase PR#715 PUREJAVA incrementing objects, arrays + */ +public class ArrayIncCE { + private static int[] IRA = new int[]{0,1,2}; + private static Object OBJECT = new Object(); + static int[] getIRA() { return IRA; } + static Object getObject() { return null; } + + public void testObjectIncrementingCE() { + int i = 0; + Object object = new Object(); + String[] sra = new String[]{""}; + //++getIRA(); // CE prefix ++ not applied to int[] + //++getObject(); // CE prefix ++ not applied to Object + //getIRA()++; // CE postfix ++ not applied to int[] + //getObject()++; // CE postfix ++ not applied to Object + IRA += 1; // CE + not applied to int[], int + //getIRA() += 1; // CE + not applied to int[], int + object += 1; // CE + not applied to Object, int + //getObject() += 1; // CE + not applied to Object, int + i = +IRA; // CE unary + not applied to int[] + i = +getIRA(); // CE unary + not applied to int[] + sra += "bad concat"; // CE string + not applied to String[], String + //"1" += sra[0]; // CE no literal on lhs + } +} + |