aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-01-22 18:52:29 +0000
committerMichael Williamson <mike@zwobble.org>2024-01-22 18:56:19 +0000
commit6d380ac1b8aefb00e6be1655a416588e5559bfa0 (patch)
tree792c3b68299e493749a7ac901829f18827d46d6e /src/test/java
parent8462c0ecc99be62339fe1829363c15beb8c5c0f1 (diff)
Rename const operands to with const suffix
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java92
-rw-r--r--src/test/java/org/shedlang/compiler/patio/PatioSerializerTests.java104
-rw-r--r--src/test/java/org/shedlang/compiler/patio/instructions/Patio.java16
-rw-r--r--src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineFunctionTests.java4
4 files changed, 108 insertions, 108 deletions
diff --git a/src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java b/src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java
index 3b894f3a..6a5545ab 100644
--- a/src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java
+++ b/src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java
@@ -31,7 +31,7 @@ public abstract class PatioExampleTests {
.addLocal(Patio.val("x", PatioTypes.INT))
.addBodyInstruction(Patio.memoryLoad(
Patio.localRef("x"),
- Patio.dataPtr("answer"),
+ Patio.dataPtrConst("answer"),
PatioDataLayouts.INT,
List.of()
))
@@ -66,7 +66,7 @@ public abstract class PatioExampleTests {
.addLocal(Patio.val("x", PatioTypes.INT))
.addBodyInstruction(Patio.memoryLoad(
Patio.localRef("x"),
- Patio.dataPtr("answer"),
+ Patio.dataPtrConst("answer"),
PatioDataLayouts.struct(List.of(
PatioDataLayouts.INT,
PatioDataLayouts.INT,
@@ -102,7 +102,7 @@ public abstract class PatioExampleTests {
Patio.localRef("x"),
PatioDataLayouts.INT,
List.of(),
- Patio.int_(42)
+ Patio.intConst(42)
))
.addBodyInstruction(Patio.memoryLoad(
Patio.localRef("y"),
@@ -113,7 +113,7 @@ public abstract class PatioExampleTests {
.addBodyInstruction(Patio.intAdd(
Patio.localRef("z"),
Patio.localRef("y"),
- Patio.int_(5)
+ Patio.intConst(5)
))
.addBodyInstruction(Patio.memoryStore(
Patio.localRef("x"),
@@ -148,7 +148,7 @@ public abstract class PatioExampleTests {
List.of(
Patio.localStore(
Patio.localRef("x"),
- Patio.int_(42)
+ Patio.intConst(42)
)
),
List.of(Patio.localRef("x"))
@@ -173,7 +173,7 @@ public abstract class PatioExampleTests {
.addLocal(Patio.val("r", PatioTypes.INT))
.addBodyInstruction(Patio.localStore(
Patio.localRef("x"),
- Patio.bool(false)
+ Patio.boolConst(false)
))
.addBodyInstruction(Patio.boolToInt(
Patio.localRef("y"),
@@ -186,8 +186,8 @@ public abstract class PatioExampleTests {
.addBodyInstruction(Patio.if_(
List.of(Patio.localRef("r")),
Patio.localRef("z"),
- Patio.block(List.of(), List.of(Patio.int_(42))),
- Patio.block(List.of(), List.of(Patio.int_(47)))
+ Patio.block(List.of(), List.of(Patio.intConst(42))),
+ Patio.block(List.of(), List.of(Patio.intConst(47)))
))
.addBodyInstruction(Patio.return_(Patio.localRef("r")))
.build();
@@ -209,7 +209,7 @@ public abstract class PatioExampleTests {
.addLocal(Patio.val("r", PatioTypes.INT))
.addBodyInstruction(Patio.localStore(
Patio.localRef("x"),
- Patio.bool(true)
+ Patio.boolConst(true)
))
.addBodyInstruction(Patio.boolToInt(
Patio.localRef("y"),
@@ -222,8 +222,8 @@ public abstract class PatioExampleTests {
.addBodyInstruction(Patio.if_(
List.of(Patio.localRef("r")),
Patio.localRef("z"),
- Patio.block(List.of(), List.of(Patio.int_(42))),
- Patio.block(List.of(), List.of(Patio.int_(47)))
+ Patio.block(List.of(), List.of(Patio.intConst(42))),
+ Patio.block(List.of(), List.of(Patio.intConst(47)))
))
.addBodyInstruction(Patio.return_(Patio.localRef("r")))
.build();
@@ -244,11 +244,11 @@ public abstract class PatioExampleTests {
.addLocal(Patio.val("z", PatioTypes.INT))
.addBodyInstruction(Patio.localStore(
Patio.localRef("x"),
- Patio.int_(42)
+ Patio.intConst(42)
))
.addBodyInstruction(Patio.localStore(
Patio.localRef("y"),
- Patio.int_(5)
+ Patio.intConst(5)
))
.addBodyInstruction(Patio.intAdd(
Patio.localRef("z"),
@@ -274,13 +274,13 @@ public abstract class PatioExampleTests {
.addLocal(Patio.val("x2", PatioTypes.INT))
.addBodyInstruction(Patio.switch_(
List.of(Patio.localRef("x")),
- Patio.int_(2),
+ Patio.intConst(2),
List.of(
Patio.switchCase(
1,
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x1"), Patio.int_(42))
+ Patio.localStore(Patio.localRef("x1"), Patio.intConst(42))
),
List.of(Patio.localRef("x1"))
)
@@ -289,7 +289,7 @@ public abstract class PatioExampleTests {
2,
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x2"), Patio.int_(47))
+ Patio.localStore(Patio.localRef("x2"), Patio.intConst(47))
),
List.of(Patio.localRef("x2"))
)
@@ -319,13 +319,13 @@ public abstract class PatioExampleTests {
.addLocal(Patio.val("x2", PatioTypes.INT))
.addBodyInstruction(Patio.switch_(
List.of(Patio.localRef("x")),
- Patio.int_(2),
+ Patio.intConst(2),
List.of(
Patio.switchCase(
1,
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x1"), Patio.int_(42))
+ Patio.localStore(Patio.localRef("x1"), Patio.intConst(42))
),
List.of(Patio.localRef("x1"))
)
@@ -333,7 +333,7 @@ public abstract class PatioExampleTests {
),
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x2"), Patio.int_(47))
+ Patio.localStore(Patio.localRef("x2"), Patio.intConst(47))
),
List.of(Patio.localRef("x2"))
)
@@ -364,13 +364,13 @@ public abstract class PatioExampleTests {
Patio.localRef("e1"),
Patio.block(
List.of(),
- List.of(Patio.int_(1))
+ List.of(Patio.intConst(1))
)
)
),
Patio.block(
List.of(),
- List.of(Patio.int_(0))
+ List.of(Patio.intConst(0))
)
))
.addBodyInstruction(Patio.return_(
@@ -404,7 +404,7 @@ public abstract class PatioExampleTests {
Patio.localRef("e1"),
Patio.block(
List.of(),
- List.of(Patio.int_(1))
+ List.of(Patio.intConst(1))
)
)
),
@@ -418,15 +418,15 @@ public abstract class PatioExampleTests {
Patio.localRef("e2"),
Patio.block(
List.of(),
- List.of(Patio.int_(2))
+ List.of(Patio.intConst(2))
)
)
),
Patio.block(
List.of(
- Patio.throw_("Error", Patio.int_(0))
+ Patio.throw_("Error", Patio.intConst(0))
),
- List.of(Patio.int_(0))
+ List.of(Patio.intConst(0))
)
)
),
@@ -464,7 +464,7 @@ public abstract class PatioExampleTests {
Patio.localRef("e2"),
Patio.block(
List.of(),
- List.of(Patio.int_(1))
+ List.of(Patio.intConst(1))
)
),
Patio.catchClause(
@@ -472,15 +472,15 @@ public abstract class PatioExampleTests {
Patio.localRef("e2"),
Patio.block(
List.of(),
- List.of(Patio.int_(2))
+ List.of(Patio.intConst(2))
)
)
),
Patio.block(
List.of(
- Patio.throw_("Error2", Patio.int_(0))
+ Patio.throw_("Error2", Patio.intConst(0))
),
- List.of(Patio.int_(0))
+ List.of(Patio.intConst(0))
)
))
.addBodyInstruction(Patio.return_(
@@ -515,7 +515,7 @@ public abstract class PatioExampleTests {
Patio.localRef("e1"),
Patio.block(
List.of(),
- List.of(Patio.int_(1))
+ List.of(Patio.intConst(1))
)
)
),
@@ -529,15 +529,15 @@ public abstract class PatioExampleTests {
Patio.localRef("e2"),
Patio.block(
List.of(),
- List.of(Patio.int_(2))
+ List.of(Patio.intConst(2))
)
)
),
Patio.block(
List.of(
- Patio.throw_("Error", Patio.int_(0))
+ Patio.throw_("Error", Patio.intConst(0))
),
- List.of(Patio.int_(0))
+ List.of(Patio.intConst(0))
)
)
),
@@ -576,7 +576,7 @@ public abstract class PatioExampleTests {
Patio.localRef("e1"),
Patio.block(
List.of(),
- List.of(Patio.int_(1))
+ List.of(Patio.intConst(1))
)
)
),
@@ -590,17 +590,17 @@ public abstract class PatioExampleTests {
Patio.localRef("e2"),
Patio.block(
List.of(
- Patio.throw_("Error", Patio.int_(0))
+ Patio.throw_("Error", Patio.intConst(0))
),
- List.of(Patio.int_(2))
+ List.of(Patio.intConst(2))
)
)
),
Patio.block(
List.of(
- Patio.throw_("Error", Patio.int_(0))
+ Patio.throw_("Error", Patio.intConst(0))
),
- List.of(Patio.int_(0))
+ List.of(Patio.intConst(0))
)
)
),
@@ -638,7 +638,7 @@ public abstract class PatioExampleTests {
Patio.localRef("e1"),
Patio.block(
List.of(),
- List.of(Patio.int_(1))
+ List.of(Patio.intConst(1))
)
)
),
@@ -652,16 +652,16 @@ public abstract class PatioExampleTests {
Patio.localRef("e2"),
Patio.block(
List.of(),
- List.of(Patio.int_(2))
+ List.of(Patio.intConst(2))
)
)
),
Patio.block(
List.of(),
- List.of(Patio.int_(0))
+ List.of(Patio.intConst(0))
)
),
- Patio.throw_("Error", Patio.int_(0))
+ Patio.throw_("Error", Patio.intConst(0))
),
List.of(Patio.localRef("r2"))
)
@@ -701,9 +701,9 @@ public abstract class PatioExampleTests {
),
Patio.block(
List.of(
- Patio.throw_("Error", Patio.int_(1))
+ Patio.throw_("Error", Patio.intConst(1))
),
- List.of(Patio.int_(0))
+ List.of(Patio.intConst(0))
)
))
.addBodyInstruction(Patio.return_(
@@ -731,7 +731,7 @@ public abstract class PatioExampleTests {
.addLocal(Patio.val("r", PatioTypes.INT))
.addBodyInstruction(Patio.varStore(
Patio.localRef("x"),
- Patio.int_(42)
+ Patio.intConst(42)
))
.addBodyInstruction(Patio.varLoad(
Patio.localRef("y"),
@@ -740,7 +740,7 @@ public abstract class PatioExampleTests {
.addBodyInstruction(Patio.intAdd(
Patio.localRef("z"),
Patio.localRef("y"),
- Patio.int_(5)
+ Patio.intConst(5)
))
.addBodyInstruction(Patio.varStore(
Patio.localRef("x"),
diff --git a/src/test/java/org/shedlang/compiler/patio/PatioSerializerTests.java b/src/test/java/org/shedlang/compiler/patio/PatioSerializerTests.java
index 071007f9..a1be788c 100644
--- a/src/test/java/org/shedlang/compiler/patio/PatioSerializerTests.java
+++ b/src/test/java/org/shedlang/compiler/patio/PatioSerializerTests.java
@@ -112,7 +112,7 @@ public class PatioSerializerTests {
.addLocal(Patio.val("local1", PatioTypes.FUNCTION_POINTER))
.addLocal(Patio.val("local2", PatioTypes.INT))
.withReturnType(PatioTypes.VOID)
- .addBodyInstruction(Patio.localStore(Patio.localRef("local2"), Patio.int_(2)))
+ .addBodyInstruction(Patio.localStore(Patio.localRef("local2"), Patio.intConst(2)))
.build();
var string = PatioTesting.serializeCompilationUnitElement(element);
@@ -125,7 +125,7 @@ public class PatioSerializerTests {
locals=((param "param1" int) (param "param2" data-ptr) (val "local1" function-ptr) (val "local2" int))
return-type=void
body=(
- (local-store (local "local2") (int 2))
+ (local-store (local "local2") (int-const 2))
)
)"""
));
@@ -149,8 +149,8 @@ public class PatioSerializerTests {
public void canSerializeBlock() {
var instruction = Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x1"), Patio.int_(1)),
- Patio.localStore(Patio.localRef("y1"), Patio.int_(2))
+ Patio.localStore(Patio.localRef("x1"), Patio.intConst(1)),
+ Patio.localStore(Patio.localRef("y1"), Patio.intConst(2))
),
List.of(
Patio.localRef("x1"),
@@ -164,8 +164,8 @@ public class PatioSerializerTests {
(
block
(
- (local-store (local "x1") (int 1))
- (local-store (local "y1") (int 2))
+ (local-store (local "x1") (int-const 1))
+ (local-store (local "y1") (int-const 2))
)
results=((local "x1") (local "y1"))
)"""));
@@ -290,8 +290,8 @@ public class PatioSerializerTests {
Patio.localRef("condition"),
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x1"), Patio.int_(1)),
- Patio.localStore(Patio.localRef("y1"), Patio.int_(2))
+ Patio.localStore(Patio.localRef("x1"), Patio.intConst(1)),
+ Patio.localStore(Patio.localRef("y1"), Patio.intConst(2))
),
List.of(
Patio.localRef("x1"),
@@ -300,8 +300,8 @@ public class PatioSerializerTests {
),
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x2"), Patio.int_(11)),
- Patio.localStore(Patio.localRef("y2"), Patio.int_(12))
+ Patio.localStore(Patio.localRef("x2"), Patio.intConst(11)),
+ Patio.localStore(Patio.localRef("y2"), Patio.intConst(12))
),
List.of(
Patio.localRef("x2"),
@@ -320,16 +320,16 @@ public class PatioSerializerTests {
(
block
(
- (local-store (local "x1") (int 1))
- (local-store (local "y1") (int 2))
+ (local-store (local "x1") (int-const 1))
+ (local-store (local "y1") (int-const 2))
)
results=((local "x1") (local "y1"))
)
(
block
(
- (local-store (local "x2") (int 11))
- (local-store (local "y2") (int 12))
+ (local-store (local "x2") (int-const 11))
+ (local-store (local "y2") (int-const 12))
)
results=((local "x2") (local "y2"))
)
@@ -433,7 +433,7 @@ public class PatioSerializerTests {
public void canSerializeLoop() {
var instruction = Patio.loop(
List.of(
- Patio.localStore(Patio.localRef("x"), Patio.int_(1))
+ Patio.localStore(Patio.localRef("x"), Patio.intConst(1))
)
);
@@ -443,7 +443,7 @@ public class PatioSerializerTests {
(
loop
(
- (local-store (local "x") (int 1))
+ (local-store (local "x") (int-const 1))
)
)"""));
}
@@ -550,8 +550,8 @@ public class PatioSerializerTests {
1,
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x1"), Patio.int_(11)),
- Patio.localStore(Patio.localRef("y1"), Patio.int_(12))
+ Patio.localStore(Patio.localRef("x1"), Patio.intConst(11)),
+ Patio.localStore(Patio.localRef("y1"), Patio.intConst(12))
),
List.of(
Patio.localRef("x1"),
@@ -563,8 +563,8 @@ public class PatioSerializerTests {
2,
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x2"), Patio.int_(21)),
- Patio.localStore(Patio.localRef("y2"), Patio.int_(22))
+ Patio.localStore(Patio.localRef("x2"), Patio.intConst(21)),
+ Patio.localStore(Patio.localRef("y2"), Patio.intConst(22))
),
List.of(
Patio.localRef("x2"),
@@ -575,8 +575,8 @@ public class PatioSerializerTests {
),
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("x3"), Patio.int_(31)),
- Patio.localStore(Patio.localRef("y3"), Patio.int_(32))
+ Patio.localStore(Patio.localRef("x3"), Patio.intConst(31)),
+ Patio.localStore(Patio.localRef("y3"), Patio.intConst(32))
),
List.of(
Patio.localRef("x3"),
@@ -599,8 +599,8 @@ public class PatioSerializerTests {
(
block
(
- (local-store (local "x1") (int 11))
- (local-store (local "y1") (int 12))
+ (local-store (local "x1") (int-const 11))
+ (local-store (local "y1") (int-const 12))
)
results=((local "x1") (local "y1"))
)
@@ -611,8 +611,8 @@ public class PatioSerializerTests {
(
block
(
- (local-store (local "x2") (int 21))
- (local-store (local "y2") (int 22))
+ (local-store (local "x2") (int-const 21))
+ (local-store (local "y2") (int-const 22))
)
results=((local "x2") (local "y2"))
)
@@ -621,8 +621,8 @@ public class PatioSerializerTests {
(
block
(
- (local-store (local "x3") (int 31))
- (local-store (local "y3") (int 32))
+ (local-store (local "x3") (int-const 31))
+ (local-store (local "y3") (int-const 32))
)
results=((local "x3") (local "y3"))
)
@@ -649,8 +649,8 @@ public class PatioSerializerTests {
Patio.localRef("a1"),
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("xCatch1"), Patio.int_(11)),
- Patio.localStore(Patio.localRef("yCatch1"), Patio.int_(12))
+ Patio.localStore(Patio.localRef("xCatch1"), Patio.intConst(11)),
+ Patio.localStore(Patio.localRef("yCatch1"), Patio.intConst(12))
),
List.of(Patio.localRef("xCatch1"), Patio.localRef("yCatch1"))
)
@@ -660,8 +660,8 @@ public class PatioSerializerTests {
Patio.localRef("a2"),
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("xCatch2"), Patio.int_(21)),
- Patio.localStore(Patio.localRef("yCatch2"), Patio.int_(22))
+ Patio.localStore(Patio.localRef("xCatch2"), Patio.intConst(21)),
+ Patio.localStore(Patio.localRef("yCatch2"), Patio.intConst(22))
),
List.of(Patio.localRef("xCatch2"), Patio.localRef("yCatch2"))
)
@@ -669,8 +669,8 @@ public class PatioSerializerTests {
),
Patio.block(
List.of(
- Patio.localStore(Patio.localRef("xTry"), Patio.int_(31)),
- Patio.localStore(Patio.localRef("yTry"), Patio.int_(32))
+ Patio.localStore(Patio.localRef("xTry"), Patio.intConst(31)),
+ Patio.localStore(Patio.localRef("yTry"), Patio.intConst(32))
),
List.of(Patio.localRef("xTry"), Patio.localRef("yTry"))
)
@@ -690,8 +690,8 @@ public class PatioSerializerTests {
(
block
(
- (local-store (local "xCatch1") (int 11))
- (local-store (local "yCatch1") (int 12))
+ (local-store (local "xCatch1") (int-const 11))
+ (local-store (local "yCatch1") (int-const 12))
)
results=((local "xCatch1") (local "yCatch1"))
)
@@ -703,8 +703,8 @@ public class PatioSerializerTests {
(
block
(
- (local-store (local "xCatch2") (int 21))
- (local-store (local "yCatch2") (int 22))
+ (local-store (local "xCatch2") (int-const 21))
+ (local-store (local "yCatch2") (int-const 22))
)
results=((local "xCatch2") (local "yCatch2"))
)
@@ -713,8 +713,8 @@ public class PatioSerializerTests {
(
block
(
- (local-store (local "xTry") (int 31))
- (local-store (local "yTry") (int 32))
+ (local-store (local "xTry") (int-const 31))
+ (local-store (local "yTry") (int-const 32))
)
results=((local "xTry") (local "yTry"))
)
@@ -757,39 +757,39 @@ public class PatioSerializerTests {
// == Operands ==
@Test
- public void canSerializeBool() {
- var operand = Patio.bool(true);
+ public void canSerializeBoolConst() {
+ var operand = Patio.boolConst(true);
var string = PatioTesting.serializeOperand(operand);
- assertThat(string, equalTo("(bool true)"));
+ assertThat(string, equalTo("(bool-const true)"));
}
@Test
- public void canSerializeDataPtr() {
- var operand = Patio.dataPtr("x");
+ public void canSerializeDataPtrConst() {
+ var operand = Patio.dataPtrConst("x");
var string = PatioTesting.serializeOperand(operand);
- assertThat(string, equalTo("(data-ptr \"x\")"));
+ assertThat(string, equalTo("(data-ptr-const \"x\")"));
}
@Test
- public void canSerializeFunctionPtr() {
- var operand = Patio.functionPtr("x");
+ public void canSerializeFunctionPtrConst() {
+ var operand = Patio.functionPtrConst("x");
var string = PatioTesting.serializeOperand(operand);
- assertThat(string, equalTo("(function-ptr \"x\")"));
+ assertThat(string, equalTo("(function-ptr-const \"x\")"));
}
@Test
- public void canSerializeInt() {
- var operand = Patio.int_(42);
+ public void canSerializeIntConst() {
+ var operand = Patio.intConst(42);
var string = PatioTesting.serializeOperand(operand);
- assertThat(string, equalTo("(int 42)"));
+ assertThat(string, equalTo("(int-const 42)"));
}
@Test
diff --git a/src/test/java/org/shedlang/compiler/patio/instructions/Patio.java b/src/test/java/org/shedlang/compiler/patio/instructions/Patio.java
index 49f35768..68bba360 100644
--- a/src/test/java/org/shedlang/compiler/patio/instructions/Patio.java
+++ b/src/test/java/org/shedlang/compiler/patio/instructions/Patio.java
@@ -24,8 +24,8 @@ public class Patio {
return new PatioBlock(body, results, Sources.NULL);
}
- public static PatioOperand bool(boolean value) {
- return new PatioBool(value);
+ public static PatioOperand boolConst(boolean value) {
+ return new PatioBoolConst(value);
}
public static PatioInstruction boolToInt(PatioLocalRef destination, PatioOperand value) {
@@ -115,8 +115,8 @@ public class Patio {
return new PatioDataElementMutable(name, initialValue, Sources.NULL);
}
- public static PatioOperand dataPtr(String name) {
- return new PatioDataPtr(name);
+ public static PatioOperand dataPtrConst(String name) {
+ return new PatioDataPtrConst(name);
}
public static PatioInstruction dataPtrToInt(PatioLocalRef destination, PatioOperand value) {
@@ -131,8 +131,8 @@ public class Patio {
return new PatioExceptionTypeDefinition(name, valueType, Sources.NULL);
}
- public static PatioOperand functionPtr(String name) {
- return new PatioFunctionPtr(name);
+ public static PatioOperand functionPtrConst(String name) {
+ return new PatioFunctionPtrConst(name);
}
public static PatioInstruction if_(
@@ -150,8 +150,8 @@ public class Patio {
);
}
- public static PatioOperand int_(int value) {
- return new PatioInt(value);
+ public static PatioOperand intConst(int value) {
+ return new PatioIntConst(value);
}
public static PatioInstruction intAdd(
diff --git a/src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineFunctionTests.java b/src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineFunctionTests.java
index 797a8442..2bd24199 100644
--- a/src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineFunctionTests.java
+++ b/src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineFunctionTests.java
@@ -86,9 +86,9 @@ public class ShidToPatioDefineFunctionTests {
// free variables so we can distinguish the free variable being copied
// into the closure upon closure creation (i.e. too soon) versus after
// the free variable is set.
- context = context.addInstruction(Patio.localStore(Patio.localRef("a"), Patio.int_(42)));
+ context = context.addInstruction(Patio.localStore(Patio.localRef("a"), Patio.intConst(42)));
context = context.initShidLocal("a");
- context = context.addInstruction(Patio.localStore(Patio.localRef("b"), Patio.int_(47)));
+ context = context.addInstruction(Patio.localStore(Patio.localRef("b"), Patio.intConst(47)));
context = context.initShidLocal("b");
snapshotter.assertSnapshot(serialize(context));