diff options
Diffstat (limited to 'chapter05/src/test/java')
| -rw-r--r-- | chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java | 7 |
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 4106ef3b..858e2470 100644 --- a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java +++ b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java @@ -14,6 +14,13 @@ public class Chapter05Test { public ExpectedException exceptionRule = ExpectedException.none(); @Test + public void testChapter5IfStmt() { + Parser parser = new Parser("int a = 1; if (arg == 1) a = arg+2; else a = arg-3; return a;", TypeInteger.BOT); + ReturnNode ret = parser.parse(); + } + + + @Test public void testChapter4Peephole() { Parser parser = new Parser("return 1+arg+2; #showGraph;", TypeInteger.BOT); ReturnNode ret = parser.parse(); |
