summaryrefslogtreecommitdiff
path: root/src/test/java/com/seaofnodes/simple/Chapter20Test.java
blob: 48458f95ea870cf56597bf98bd16eba6e2c9090b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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));
    }
}