summaryrefslogtreecommitdiff
path: root/chapter30/src/test/java/com/seaofnodes/simple/Chapter09Test.java
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-11-08 14:10:02 -0800
committerCliff Click <cliffc@acm.org>2026-11-08 14:10:02 -0800
commit06fb5aceeb65a75b1cd643debd667c52fdcafcb9 (patch)
treec99813eaf27d98f840245302c4d6e923c964307e /chapter30/src/test/java/com/seaofnodes/simple/Chapter09Test.java
parent6560a92433a38825fd1d44d9c66ffba9f26990ff (diff)
downloadSimple-ch30.tar.gz
Simple-ch30.zip
Better error messagesch30
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.
Diffstat (limited to 'chapter30/src/test/java/com/seaofnodes/simple/Chapter09Test.java')
-rw-r--r--chapter30/src/test/java/com/seaofnodes/simple/Chapter09Test.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/chapter30/src/test/java/com/seaofnodes/simple/Chapter09Test.java b/chapter30/src/test/java/com/seaofnodes/simple/Chapter09Test.java
index 7025b98a..6be01487 100644
--- a/chapter30/src/test/java/com/seaofnodes/simple/Chapter09Test.java
+++ b/chapter30/src/test/java/com/seaofnodes/simple/Chapter09Test.java
@@ -41,7 +41,7 @@ else {
return x;
""");
code.driver(CodeGen.Phase.FinalizeIR);
- assertEquals("return Phi(Region,(arg<<1),(Shl+1));", code.print());
+ assertEquals("return Phi(Region,(arg<<1),(((((Shl<<32)>>32)+1)<<32)>>32));", code.print());
Assert.assertEquals( "2", Eval2.eval(code, 1));
Assert.assertEquals("23", Eval2.eval(code, 11));
}
@@ -182,7 +182,7 @@ while(arg) {
return a;
""");
code.driver(CodeGen.Phase.FinalizeIR);
- assertEquals("return Phi(Loop,0,(-(Phi_a+3)));", code.print());
+ assertEquals("return Phi(Loop,0,(((-(Phi_a+3))<<32)>>32));", code.print());
}
@Test