summaryrefslogtreecommitdiff
path: root/chapter12/src/test/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'chapter12/src/test/java/com')
-rw-r--r--chapter12/src/test/java/com/seaofnodes/simple/Chapter12Test.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/chapter12/src/test/java/com/seaofnodes/simple/Chapter12Test.java b/chapter12/src/test/java/com/seaofnodes/simple/Chapter12Test.java
index 2eeccba9..92ed9031 100644
--- a/chapter12/src/test/java/com/seaofnodes/simple/Chapter12Test.java
+++ b/chapter12/src/test/java/com/seaofnodes/simple/Chapter12Test.java
@@ -13,21 +13,11 @@ public class Chapter12Test {
public void testJig() {
Parser parser = new Parser(
"""
-struct s0 {
- int v0;
-}
-s0? fIflMOdp;
-while(1) {
- if(fIflMOdp){
- fIflMOdp.v0=-fIflMOdp.v0;
- continue;
- }
- break;
-}
+return 3.14
""");
StopNode stop = parser.parse(false).iterate(false);
- assertEquals("return 0;", stop.toString());
- assertEquals(0L, Evaluator.evaluate(stop, 0));
+ assertEquals("return 3.14;", stop.toString());
+ assertEquals(3.14, Evaluator.evaluate(stop, 0));
}
@Test