diff options
Diffstat (limited to 'chapter05/src/test/java')
| -rw-r--r-- | chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java index bb95dc18..ea65900f 100644 --- a/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java +++ b/chapter05/src/test/java/com/seaofnodes/simple/Chapter05Test.java @@ -69,7 +69,13 @@ return c; StopNode stop = parser.parse(); assertEquals("return Phi(Region33,Phi(Region21,2,3),Phi(Region31,4,5));", stop.toString()); } - + + @Test + public void testChapter5True() { + StopNode stop = new Parser("return true;").parse(); + assertEquals("return 1;",stop.toString()); + } + @Test public void testChapter5HalfDef() { try { @@ -91,12 +97,6 @@ return c; } @Test - public void testChapter5True() { - StopNode stop = new Parser("return true;").parse(); - assertEquals("return 1;",stop.toString()); - } - - @Test public void testChapter5BadNum() { try { new Parser("return 1-;").parse(); @@ -135,6 +135,7 @@ return c; assertEquals("Syntax error, expected =: (",e.getMessage()); } } + @Test public void testChapter4Peephole() { Parser parser = new Parser("return 1+arg+2; #showGraph;"); |
