summaryrefslogtreecommitdiff
path: root/chapter04/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'chapter04/src/test/java')
-rw-r--r--chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java b/chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java
index 8cc78af0..4782e568 100644
--- a/chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java
+++ b/chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java
@@ -113,6 +113,13 @@ public class Chapter04Test {
}
@Test
+ public void testChapter4Bug3() {
+ Parser parser = new Parser("int a=arg*2+1; a=a+-1; return a; #showGraph;", TypeInteger.BOT);
+ ReturnNode ret = parser.parse();
+ assertEquals("return (Proj_3*2);", ret.print());
+ }
+
+ @Test
public void testVarDecl() {
Parser parser = new Parser("int a=1; return a;");
ReturnNode ret = parser.parse();