summaryrefslogtreecommitdiff
path: root/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.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/Chapter08Test.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/Chapter08Test.java')
-rw-r--r--chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java b/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java
index 376e472b..249beb11 100644
--- a/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java
+++ b/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java
@@ -46,7 +46,7 @@ while(arg < 10) {
return a;
""");
code.driver(CodeGen.Phase.FinalizeIR);
- assertEquals("return Phi(Loop,1,Phi(Region,Phi_a,(Phi_a+1),Phi_a));", code.print());
+ assertEquals("return Phi(Loop,1,Phi(Region,Phi_a,(((Phi_a+1)<<32)>>32),Phi_a));", code.print());
assertTrue(code.ctrl() instanceof CProjNode);
}
@@ -185,7 +185,7 @@ while(arg < 10) {
return a;
""");
code.driver(CodeGen.Phase.FinalizeIR);
- assertEquals("return Phi(Region,Phi(Loop,1,(Phi_a+1)),Add);", code.print());
+ assertEquals("return Phi(Region,Phi(Loop,1,(((Phi_a+1)<<32)>>32)),Sar);", code.print());
assertTrue(code.ctrl() instanceof RegionNode);
}
@@ -201,7 +201,7 @@ while(1) {
return a;
""");
code.driver(CodeGen.Phase.FinalizeIR);
- assertEquals("return (Phi(Loop,1,Add)+1);", code.print());
+ assertEquals("return (((Phi(Loop,1,Sar)+1)<<32)>>32);", code.print());
assertTrue(code.ctrl() instanceof CProjNode prj && prj._idx==1 );
}