From 23a031cb69312a50eed7d42dc072f42a8595376b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 2 Feb 2024 22:29:19 +0000 Subject: Use runtime type tag as struct tag --- src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java | 4 ++-- .../shedlang/compiler/shidtopatio/ShidToPatioDefineStructTests.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/java') diff --git a/src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java b/src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java index 1a646bdd..273ff21a 100644 --- a/src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java +++ b/src/test/java/org/shedlang/compiler/patio/PatioExampleTests.java @@ -274,7 +274,7 @@ public abstract class PatioExampleTests { .addLocal(Patio.val("x2", PatioTypes.INT)) .addBodyInstruction(Patio.switch_( List.of(Patio.localRef("x")), - Patio.intConst(2), + Patio.int32Const(2), List.of( Patio.switchCase( 1, @@ -319,7 +319,7 @@ public abstract class PatioExampleTests { .addLocal(Patio.val("x2", PatioTypes.INT)) .addBodyInstruction(Patio.switch_( List.of(Patio.localRef("x")), - Patio.intConst(2), + Patio.int32Const(2), List.of( Patio.switchCase( 1, diff --git a/src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineStructTests.java b/src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineStructTests.java index c9dd3cf1..4b409c74 100644 --- a/src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineStructTests.java +++ b/src/test/java/org/shedlang/compiler/shidtopatio/ShidToPatioDefineStructTests.java @@ -61,7 +61,7 @@ public class ShidToPatioDefineStructTests { context = ShidToPatio.generateInstruction(instruction1, context); context = ShidToPatio.generateInstruction(instruction2, context); - assertThat(context.structTag(structType1), equalTo(0)); - assertThat(context.structTag(structType2), equalTo(1)); + assertThat(context.structTag(structType1), equalTo(1)); + assertThat(context.structTag(structType2), equalTo(2)); } } -- cgit v1.2.3