diff options
| author | Thalia Archibald <thalia@archibald.dev> | 2024-06-21 06:13:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-21 14:13:09 +0100 |
| commit | e5f4f7b85fbb91a293a7d89d7b85adfbaeeb51f4 (patch) | |
| tree | 9b6ecc7ef37b1ec7f08efed6f908f478dc551e03 /chapter04/src/test/java/com/seaofnodes | |
| parent | a749c244bea3e2774d453165cbd18ed52863a8f5 (diff) | |
| download | Simple-e5f4f7b85fbb91a293a7d89d7b85adfbaeeb51f4.tar.gz Simple-e5f4f7b85fbb91a293a7d89d7b85adfbaeeb51f4.zip | |
Format whitespace (#86)
* Trim trailing whitespace
* Ensure final new lines
* Convert line endings from CRLF to LF
* Replace tabs with spaces
Diffstat (limited to 'chapter04/src/test/java/com/seaofnodes')
| -rw-r--r-- | chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java b/chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java index 299399d2..5757fc59 100644 --- a/chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java +++ b/chapter04/src/test/java/com/seaofnodes/simple/Chapter04Test.java @@ -40,7 +40,7 @@ public class Chapter04Test { ReturnNode ret = parser.parse(); assertEquals("return (arg*2);", ret.print()); } - + @Test public void testChapter4Peephole3() { Parser parser = new Parser("return 1+arg+2+arg+3; #showGraph;"); @@ -54,7 +54,7 @@ public class Chapter04Test { ReturnNode ret = parser.parse(); assertEquals("return arg;", ret.print()); } - + @Test public void testChapter4VarArg() { Parser parser = new Parser("return arg; #showGraph;", TypeInteger.BOT); @@ -114,7 +114,7 @@ public class Chapter04Test { @Test public void testChapter4Bug3() { - try { + try { new Parser("inta=1; return a;").parse(); fail(); } catch( RuntimeException e ) { @@ -128,7 +128,7 @@ public class Chapter04Test { ReturnNode ret = parser.parse(); assertEquals("return (-arg);", ret.print()); } - + @Test public void testVarDecl() { Parser parser = new Parser("int a=1; return a;"); @@ -168,7 +168,7 @@ public class Chapter04Test { @Test public void testSelfAssign() { - try { + try { new Parser("int a=a; return a;").parse(); fail(); } catch( RuntimeException e ) { @@ -236,7 +236,7 @@ public class Chapter04Test { Parser parser = new Parser("return 1;"); ReturnNode ret = parser.parse(); StartNode start = Parser.START; - + assertTrue(ret.ctrl() instanceof ProjNode); Node expr = ret.expr(); if( expr instanceof ConstantNode con ) { @@ -259,7 +259,7 @@ public class Chapter04Test { @Test public void testBad1() { - try { + try { new Parser("ret").parse(); fail(); } catch( RuntimeException e ) { @@ -269,7 +269,7 @@ public class Chapter04Test { @Test public void testBad2() { - try { + try { new Parser("return 0123;").parse(); fail(); } catch( RuntimeException e ) { @@ -285,7 +285,7 @@ public class Chapter04Test { @Test public void testBad4() { - try { + try { new Parser("return 100").parse(); fail(); } catch( RuntimeException e ) { |
