summaryrefslogtreecommitdiff
path: root/chapter05/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05/src/test/java')
-rw-r--r--chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java
index 981af93c..95150f2e 100644
--- a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java
+++ b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java
@@ -78,6 +78,13 @@ return c;
}
@Test
+ public void testChapter5Merge5() {
+ Parser parser = new Parser("int a=arg==2;if(arg==1)a=arg==3;return a;");
+ StopNode ret = parser.parse(true);
+ assertEquals("return (arg==Phi(Region16,3,2));", ret.toString());
+ }
+
+ @Test
public void testChapter5True() {
StopNode stop = new Parser("return true;").parse();
assertEquals("return 1;",stop.toString());