From 06fb5aceeb65a75b1cd643debd667c52fdcafcb9 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sun, 8 Nov 2026 14:10:02 -0800 Subject: Better error messages Better error messages. Buffs to the std lib; getch() to fetch a single character; streaming I/O handles retries, and large sizes, with better error reporting. Formatted strings. Default int moved to i32. TicTacToe, the game. --- chapter30/src/test/java/com/seaofnodes/simple/Chapter04Test.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chapter30/src/test/java/com/seaofnodes/simple/Chapter04Test.java') diff --git a/chapter30/src/test/java/com/seaofnodes/simple/Chapter04Test.java b/chapter30/src/test/java/com/seaofnodes/simple/Chapter04Test.java index 1132375e..bfde3b2a 100644 --- a/chapter30/src/test/java/com/seaofnodes/simple/Chapter04Test.java +++ b/chapter30/src/test/java/com/seaofnodes/simple/Chapter04Test.java @@ -127,14 +127,14 @@ public class Chapter04Test { public void testBug1() { CodeGen code = new CodeGen("int a=arg+1; int !b=a; b=1; return a+2; "); code.parse(); - assertEquals("return (arg+3);", code.print()); + assertEquals("return ((((arg+1)<<32)>>32)+2);", code.print()); } @Test public void testBug2() { CodeGen code = new CodeGen("int !a=arg+1; a=a; return a; "); code.parse(); - assertEquals("return (arg+1);", code.print()); + assertEquals("return (((arg+1)<<32)>>32);", code.print()); } @Test -- cgit v1.2.3