summaryrefslogtreecommitdiff
path: root/chapter17/src/test/java/com/seaofnodes
diff options
context:
space:
mode:
Diffstat (limited to 'chapter17/src/test/java/com/seaofnodes')
-rw-r--r--chapter17/src/test/java/com/seaofnodes/simple/Chapter07Test.java12
-rw-r--r--chapter17/src/test/java/com/seaofnodes/simple/Chapter11Test.java4
2 files changed, 8 insertions, 8 deletions
diff --git a/chapter17/src/test/java/com/seaofnodes/simple/Chapter07Test.java b/chapter17/src/test/java/com/seaofnodes/simple/Chapter07Test.java
index 23ad18f1..355bbba4 100644
--- a/chapter17/src/test/java/com/seaofnodes/simple/Chapter07Test.java
+++ b/chapter17/src/test/java/com/seaofnodes/simple/Chapter07Test.java
@@ -10,12 +10,12 @@ public class Chapter07Test {
@Test
public void testExample() {
Parser parser = new Parser(
- """
- while(arg < 10) {
- arg = arg + 1;
- }
- return arg;
- """);
+"""
+while(arg < 10) {
+ arg = arg + 1;
+}
+return arg;
+""");
Node._disablePeephole = true;
StopNode stop = parser.parse();
assertEquals("return Phi(Loop,arg,(Phi_arg+1));", stop.toString());
diff --git a/chapter17/src/test/java/com/seaofnodes/simple/Chapter11Test.java b/chapter17/src/test/java/com/seaofnodes/simple/Chapter11Test.java
index 0151a694..613b979b 100644
--- a/chapter17/src/test/java/com/seaofnodes/simple/Chapter11Test.java
+++ b/chapter17/src/test/java/com/seaofnodes/simple/Chapter11Test.java
@@ -292,7 +292,7 @@ else {
}
""");
StopNode stop = parser.parse().iterate();
- assertEquals("Stop[ return 9; return 0; return 0; return 0; return 0; return 0; return 0; ]", stop.toString());
+ assertEquals("Stop[ return 9; return 0; return 0; return 0; return 0; ]", stop.toString());
}
@@ -438,7 +438,7 @@ while(1)
arg = arg+ptr.v;
""");
StopNode stop = parser.parse().iterate();
- assertEquals("Stop[ return 0; return 0; ]", stop.toString());
+ assertEquals("return 0;", stop.toString());
}
@Test