diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-07-21 16:22:34 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-07-21 16:23:14 +0100 |
| commit | 0fe26c78dd1f7127654cb2dfaef8f5caeebd7e73 (patch) | |
| tree | bd20bfc0915adecadf585cfedc6f40fabf8b915a /src/test/java | |
| parent | f12f949dda91f596c8ec401375e48cef584218c2 (diff) | |
Support wasm-patio backend in CLI
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/backends/wasm/WasmExampleTests.java | 2 | ||||
| -rw-r--r-- | src/test/java/org/shedlang/compiler/patio/PatioCodeGenNamespaceTests.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/java/org/shedlang/compiler/backends/wasm/WasmExampleTests.java b/src/test/java/org/shedlang/compiler/backends/wasm/WasmExampleTests.java index fdbc7e4f..fe6ef323 100644 --- a/src/test/java/org/shedlang/compiler/backends/wasm/WasmExampleTests.java +++ b/src/test/java/org/shedlang/compiler/backends/wasm/WasmExampleTests.java @@ -8,7 +8,7 @@ import java.util.Optional; public class WasmExampleTests extends ExampleTests { @Override protected Backend backend() { - return new WasmBackend(); + return WasmBackend.DIRECT; } @Override diff --git a/src/test/java/org/shedlang/compiler/patio/PatioCodeGenNamespaceTests.java b/src/test/java/org/shedlang/compiler/patio/PatioCodeGenNamespaceTests.java index 60e5d3dd..3b42046c 100644 --- a/src/test/java/org/shedlang/compiler/patio/PatioCodeGenNamespaceTests.java +++ b/src/test/java/org/shedlang/compiler/patio/PatioCodeGenNamespaceTests.java @@ -4,6 +4,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.shedlang.compiler.ast.typed.FreeVariables; import org.shedlang.compiler.sources.Sources; +import org.shedlang.compiler.stackir.StackIrNamespace; import org.shedlang.compiler.stackir.instructions.DefineFunctionInstruction; import org.shedlang.compiler.stackir.instructions.Instruction; import org.shedlang.compiler.stackir.instructions.Instructions; @@ -44,8 +45,9 @@ public class PatioCodeGenNamespaceTests { Map.entry("y", Types.STRING) ))) ))); + var stackIrNamespace = new StackIrNamespace(namespaceName, instructions); - var result = PatioCodeGen.generateNamespace(namespaceName, instructions, context); + var result = PatioCodeGen.generateNamespace(stackIrNamespace, context); snapshotter.assertSnapshot(serializeCompilationUnit(result)); } |
