diff options
| author | Cliff Click <cliffc@acm.org> | 2024-10-21 09:25:15 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2024-11-22 15:23:43 -0800 |
| commit | b0e1da2a7d0d39347e247d9fbda924b720d4b0a0 (patch) | |
| tree | f40907ed72bdffff46e2fd6c79b47e8d672803fb /src/test/java/com/seaofnodes/simple/Chapter14Test.java | |
| parent | 4b24919a2cd06dd5debcc0322cbeb314d77aaba1 (diff) | |
| download | Simple-linear-chapter17.tar.gz Simple-linear-chapter17.zip | |
Chapter 17: Syntax Sugarlinear-chapter17
Diffstat (limited to 'src/test/java/com/seaofnodes/simple/Chapter14Test.java')
| -rw-r--r-- | src/test/java/com/seaofnodes/simple/Chapter14Test.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/java/com/seaofnodes/simple/Chapter14Test.java b/src/test/java/com/seaofnodes/simple/Chapter14Test.java index 7d7bb25a..23c82358 100644 --- a/src/test/java/com/seaofnodes/simple/Chapter14Test.java +++ b/src/test/java/com/seaofnodes/simple/Chapter14Test.java @@ -59,7 +59,7 @@ while( b ) b = b + 456;// Truncate return b; """); StopNode stop = parser.parse().iterate(); - assertEquals("return Phi(Loop11,123,((Phi_b+456)&255));", stop.toString()); + assertEquals("return 0;", stop.toString()); } @Test @@ -94,7 +94,7 @@ return b; Parser parser = new Parser( """ struct Foo { u1 b; }; -Foo f = new Foo; +Foo !f = new Foo; f.b = 123; return f.b; """); @@ -175,7 +175,7 @@ while(v1) break; return v1; """); StopNode stop = parser.parse().iterate(); - assertEquals("return (Phi(Loop18,((1<<arg)&1),0)&Phi(Loop,Shl,4294967295));", stop.toString()); + assertEquals("return (Phi(Loop,((1<<arg)&1),0)&Phi(Loop,Shl,4294967295));", stop.toString()); assertEquals(1L, Evaluator.evaluate(stop, 0)); } |
