summaryrefslogtreecommitdiff
path: root/src/test/java/com/seaofnodes/simple/SccpTest.java
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-08-10 11:11:18 -0700
committerCliff Click <cliffc@acm.org>2026-10-24 15:56:44 -0700
commit741d78b6e840c88b7b183010c812ad982b342da1 (patch)
tree84a75eb7ad351bffd20cd5fb152bab032b74271c /src/test/java/com/seaofnodes/simple/SccpTest.java
parent8d90d2292bbdb23596849c3c3d1cda2f6cad783e (diff)
downloadSimple-linear-chapter28a.tar.gz
Simple-linear-chapter28a.zip
Chapter 28a: Modules and Lazy Class Initializationlinear-chapter28a
Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki <jun784@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/test/java/com/seaofnodes/simple/SccpTest.java')
-rw-r--r--src/test/java/com/seaofnodes/simple/SccpTest.java27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/java/com/seaofnodes/simple/SccpTest.java b/src/test/java/com/seaofnodes/simple/SccpTest.java
deleted file mode 100644
index cad1b7de..00000000
--- a/src/test/java/com/seaofnodes/simple/SccpTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.seaofnodes.simple;
-
-import com.seaofnodes.simple.codegen.CodeGen;
-import com.seaofnodes.simple.node.*;
-import com.seaofnodes.simple.type.TypeInteger;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class SccpTest {
- @Test public void testCallArgumentFlow() {
- var code = new CodeGen("val f={ int x -> x+1; }; return f(1)+f(2);").parse().iter().opto();
- int[] parms = {0};
- code._start.walk(n -> {
- if( n instanceof ParmNode p && "x".equals(p._label) ) {
- parms[0]++;
- TypeInteger t = (TypeInteger)p._type;
- assertEquals(1,t._min);
- assertEquals(2,t._max);
- assertFalse(p.fun().in(1) instanceof StartNode);
- }
- return null;
- });
- assertEquals(1,parms[0]);
- code.driver(CodeGen.Phase.LocalSched);
- assertEquals("5",Eval2.eval(code,0));
- }
-}