diff options
author | Andrew Haley <aph@redhat.com> | 2002-10-15 18:43:11 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2002-10-15 18:43:11 +0000 |
commit | f95eae39f875f8097e275957c524f9e6d272a1e0 (patch) | |
tree | 3c0bbba3b03ac9e035672f6174903b17fb0fccb7 /libjava/testsuite/libjava.lang | |
parent | b4258f06171f75430117fcf59957693313f21678 (diff) | |
download | gcc-f95eae39f875f8097e275957c524f9e6d272a1e0.zip gcc-f95eae39f875f8097e275957c524f9e6d272a1e0.tar.gz gcc-f95eae39f875f8097e275957c524f9e6d272a1e0.tar.bz2 |
EvaluationOrder.java (EvaluationOrder): New.
2002-10-15 Andrew Haley <aph@redhat.com>
* libjava.lang/EvaluationOrder.java (EvaluationOrder): New.
* libjava.lang/EvaluationOrder.out (EvaluationOrder): New.
From-SVN: r58176
Diffstat (limited to 'libjava/testsuite/libjava.lang')
-rw-r--r-- | libjava/testsuite/libjava.lang/EvaluationOrder.java | 22 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/EvaluationOrder.out | 3 |
2 files changed, 25 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.lang/EvaluationOrder.java b/libjava/testsuite/libjava.lang/EvaluationOrder.java new file mode 100644 index 0000000..7c09bbb --- /dev/null +++ b/libjava/testsuite/libjava.lang/EvaluationOrder.java @@ -0,0 +1,22 @@ +public class EvaluationOrder + { + private static int first (int x, int y) + { + return x; + } + + public static void main (String[] args) + { + int l = args.length; + + /* This should print: + 0 + 0 + 1 + */ + System.out.println (l); + System.out.println (first (l, ++l)); + System.out.println (l); + } + } + diff --git a/libjava/testsuite/libjava.lang/EvaluationOrder.out b/libjava/testsuite/libjava.lang/EvaluationOrder.out new file mode 100644 index 0000000..bb5ee5c --- /dev/null +++ b/libjava/testsuite/libjava.lang/EvaluationOrder.out @@ -0,0 +1,3 @@ +0 +0 +1 |