diff options
Diffstat (limited to 'chapter14')
| -rw-r--r-- | chapter14/src/test/java/com/seaofnodes/simple/Chapter14Test.java | 23 | ||||
| -rw-r--r-- | chapter14/src/test/java/com/seaofnodes/simple/FuzzerWrap.java | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/chapter14/src/test/java/com/seaofnodes/simple/Chapter14Test.java b/chapter14/src/test/java/com/seaofnodes/simple/Chapter14Test.java new file mode 100644 index 00000000..e668d48e --- /dev/null +++ b/chapter14/src/test/java/com/seaofnodes/simple/Chapter14Test.java @@ -0,0 +1,23 @@ +package com.seaofnodes.simple; + +import com.seaofnodes.simple.evaluator.Evaluator; +import com.seaofnodes.simple.node.StopNode; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +public class Chapter14Test { + // This is a just a copy of a test from ch12 - remove! + @Test + public void testToBeRemoved() { + Parser parser = new Parser( +""" +return 3.14; +"""); + StopNode stop = parser.parse(false).iterate(false); + assertEquals("return 3.14;", stop.toString()); + assertEquals(3.14, Evaluator.evaluate(stop, 0)); + } + +} diff --git a/chapter14/src/test/java/com/seaofnodes/simple/FuzzerWrap.java b/chapter14/src/test/java/com/seaofnodes/simple/FuzzerWrap.java index efd76481..699711fc 100644 --- a/chapter14/src/test/java/com/seaofnodes/simple/FuzzerWrap.java +++ b/chapter14/src/test/java/com/seaofnodes/simple/FuzzerWrap.java @@ -14,6 +14,7 @@ import static org.junit.Assert.assertTrue; */ public class FuzzerWrap { + @Ignore @Test public void fuzzPeeps() { var fuzzer = new Fuzzer(); |
