java: example: rely on autoboxing

AFAICT, autoboxing/unboxing was added in Java 5 (September 30, 2004).
I think we can afford to use it.  It should help us merge some Java
tests with the main ones.

However, beware that != does not unbox: it compares the object
addresses.

* examples/java/Calc.y, tests/java.at: Simplify.
* examples/java/Calc.test, tests/java.at: Improve tests.
This commit is contained in:
Akim Demaille
2020-01-31 06:34:50 +01:00
parent c5b215b5e6
commit d5f929d407
3 changed files with 31 additions and 28 deletions

View File

@@ -20,6 +20,13 @@ cat >input <<EOF
EOF
run 0 7
cat >input <<EOF
1 + 2 * 3 = 7
(1 + 2) * 3 = 9
EOF
run 0 '7
9'
cat >input <<EOF
1 + 2 * * 3
EOF