diff options
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 |