diff options
| author | Cliff Click <cliffc@acm.org> | 2025-02-07 09:12:14 -0800 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-02-07 09:12:14 -0800 |
| commit | ed22ac30eaf0dd2d0347637ac4f8d598c087fab1 (patch) | |
| tree | 133bf327e982d50adbc95739122f52db85ba0058 /src/test/java/com/seaofnodes | |
| parent | 8818754a41d12063ed5ff68a47a0adf2b80c24b7 (diff) | |
| download | Simple-ed22ac30eaf0dd2d0347637ac4f8d598c087fab1.tar.gz Simple-ed22ac30eaf0dd2d0347637ac4f8d598c087fab1.zip | |
Chapter 20: Graph Coloring Register Allocationlinear-chapter20
Diffstat (limited to 'src/test/java/com/seaofnodes')
| -rw-r--r-- | src/test/java/com/seaofnodes/simple/Chapter20Test.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/java/com/seaofnodes/simple/Chapter20Test.java b/src/test/java/com/seaofnodes/simple/Chapter20Test.java new file mode 100644 index 00000000..48458f95 --- /dev/null +++ b/src/test/java/com/seaofnodes/simple/Chapter20Test.java @@ -0,0 +1,17 @@ +package com.seaofnodes.simple; + +import org.junit.Test; +import static org.junit.Assert.*; + +public class Chapter20Test { + + @Test + public void testJig() { + CodeGen code = new CodeGen(""" +return 0; +"""); + code.parse().opto().typeCheck(); + assertEquals("return 0;", code._stop.toString()); + assertEquals("0", Eval2.eval(code, 2)); + } +} |
