mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 04:43:03 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user