diff options
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java b/src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java index 1ed17236..44f45c1d 100644 --- a/src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java +++ b/src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java @@ -4,6 +4,9 @@ import org.junit.jupiter.api.Test; import org.shedlang.compiler.ast.typed.Typed; import org.shedlang.compiler.ast.typed.TypedFunctionDefinitionNode; import org.shedlang.compiler.stackir.instructions.DefineFunctionInstruction; +import org.shedlang.compiler.stackir.instructions.FieldLoadInstruction; +import org.shedlang.compiler.stackir.instructions.LocalStoreInstruction; +import org.shedlang.compiler.stackir.instructions.NamespaceImportInstruction; import org.shedlang.compiler.types.NamespaceName; import org.shedlang.compiler.types.Types; @@ -34,6 +37,11 @@ public class StackCompilerNamespaceTests { var instructions = StackCompiler.compileNamespace(node); assertThat(instructions, isSequence( + // TODO: test the builtin loading properly + instanceOf(NamespaceImportInstruction.class), + instanceOf(FieldLoadInstruction.class), + instanceOf(LocalStoreInstruction.class), + instanceOf( DefineFunctionInstruction.class, has("name", x -> x.name(), equalTo("f")) |
