diff options
| author | Dibyendu Majumdar <mobile@majumdar.org.uk> | 2023-12-03 23:23:04 +0000 |
|---|---|---|
| committer | Dibyendu Majumdar <mobile@majumdar.org.uk> | 2024-10-23 17:51:09 -0700 |
| commit | 48ce51174de5636232ad642d1080c8872d245f93 (patch) | |
| tree | bafdc1700a4bc80c4e272cb59fb82c1f66cb8c17 /src/test/java/com/seaofnodes/simple/Chapter06Test.java | |
| parent | ff11dd42bb845ad4a979b8924c678addb8681801 (diff) | |
| download | Simple-linear-chapter07.tar.gz Simple-linear-chapter07.zip | |
Chapter 7: While Statementlinear-chapter07
Co-authored-by: Cliff Click <cliffc@acm.org>
Co-authored-by: Thalia Archibald <thalia@archibald.dev>
Co-authored-by: XmiliaH <45106915+XmiliaH@users.noreply.github.com>
Co-authored-by: Robert Obkircher <robert.obkircher@gmail.com>
Diffstat (limited to 'src/test/java/com/seaofnodes/simple/Chapter06Test.java')
| -rw-r--r-- | src/test/java/com/seaofnodes/simple/Chapter06Test.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/test/java/com/seaofnodes/simple/Chapter06Test.java b/src/test/java/com/seaofnodes/simple/Chapter06Test.java index 44b49d73..00d725bc 100644 --- a/src/test/java/com/seaofnodes/simple/Chapter06Test.java +++ b/src/test/java/com/seaofnodes/simple/Chapter06Test.java @@ -15,7 +15,7 @@ public class Chapter06Test { if( true ) return 2; return 1; """); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return 2;", stop.toString()); assertTrue(stop.ret().ctrl() instanceof ProjNode); } @@ -29,7 +29,7 @@ if (arg) a = 2; return (arg < a) < 3; """); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return ((arg<Phi(Region12,2,1))<3);", stop.toString()); } @@ -44,7 +44,7 @@ else a=3; return a; """); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return 2;", stop.toString()); assertTrue(stop.ret().ctrl() instanceof ProjNode); } @@ -64,7 +64,7 @@ if( a==2 ) else b=5; return b;""", TypeInteger.BOT); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return Phi(Region32,42,5);", stop.toString()); } @@ -83,7 +83,7 @@ if( arg==2 ) else b=5; return b;""", TypeInteger.BOT); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return Phi(Region28,2,5);", stop.toString()); } @@ -123,7 +123,7 @@ else a=5; return a; """, TypeInteger.constant(1)); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return 3;", stop.toString()); } @@ -143,7 +143,7 @@ else a=5; return a; """, TypeInteger.BOT); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return Phi(Region36,3,Phi(Region34,4,5));", stop.toString()); } @@ -163,7 +163,7 @@ else a=5; return a; """, TypeInteger.constant(1)); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return 3;", stop.toString()); } @@ -183,7 +183,7 @@ else a=5; return a; """, TypeInteger.constant(3)); - StopNode stop = parser.parse(false); + StopNode stop = parser.parse(); assertEquals("return 4;", stop.toString()); } @@ -199,7 +199,7 @@ if( arg ) { } return a+b; """); - StopNode ret = parser.parse(false); + StopNode ret = parser.parse(); assertEquals("return Phi(Region22,4,1);", ret.toString()); } @@ -216,7 +216,7 @@ if( arg ) { } return a+b; """, TypeInteger.constant(1)); - StopNode ret = parser.parse(false); + StopNode ret = parser.parse(); assertEquals("return 4;", ret.toString()); } @@ -232,7 +232,7 @@ if( arg ) { } return a+b; """, TypeInteger.constant(0)); - StopNode ret = parser.parse(false); + StopNode ret = parser.parse(); assertEquals("return 1;", ret.toString()); } @@ -250,8 +250,8 @@ if( arg ) { } return a+b+c; """); - StopNode ret = parser.parse(false); - assertEquals("return (Phi(Region33,Phi(Region22,2,3),0)+Phi(Region33,3,1));", ret.toString()); + StopNode ret = parser.parse(); + assertEquals("return (Phi(Region33,Phi(Region22,2,3),0)+Phi(Region,3,1));", ret.toString()); } @@ -269,7 +269,7 @@ if( arg ) { } return a+b+c; """, TypeInteger.constant(1)); - StopNode ret = parser.parse(false); + StopNode ret = parser.parse(); assertEquals("return 6;", ret.toString()); } @@ -287,7 +287,7 @@ if( arg ) { } return a+b+c; """, TypeInteger.constant(2)); - StopNode ret = parser.parse(false); + StopNode ret = parser.parse(); assertEquals("return 5;", ret.toString()); } |
