diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-08-28 11:47:29 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-08-28 11:47:29 +0100 |
| commit | 11d6ee8d4eeba3f73414a2325d7bd8bfd7ac6a11 (patch) | |
| tree | 0fdf6ed95f024e7948729f8f876044d672711fc2 /src/test/java/org/shedlang/compiler/backends | |
| parent | 6a7df59852a7545f5a15955a167e33584330e296 (diff) | |
Support variable result count from if instruction
Diffstat (limited to 'src/test/java/org/shedlang/compiler/backends')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenIfTests.java | 3 | ||||
| -rw-r--r-- | src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenIfTests.java | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenIfTests.java b/src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenIfTests.java index 3a04ce3f..0243ae90 100644 --- a/src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenIfTests.java +++ b/src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenIfTests.java @@ -15,6 +15,7 @@ public class LlvmCodeGenIfTests { @Test public void ifIsCompiled(Snapshotter snapshotter) throws IOException { var instruction = Instructions.if_( + 1, List.of( Instructions.pushInt(1), Instructions.pushInt(2), @@ -38,6 +39,7 @@ public class LlvmCodeGenIfTests { @Test public void canCompileNestedIf(Snapshotter snapshotter) throws IOException { var instruction = Instructions.if_( + 1, List.of( Instructions.pushInt(1), Instructions.pushInt(2), @@ -46,6 +48,7 @@ public class LlvmCodeGenIfTests { List.of( Instructions.pushBool(true), Instructions.if_( + 1, List.of( Instructions.pushInt(101), Instructions.pushInt(102), diff --git a/src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenIfTests.java b/src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenIfTests.java index 37cf28af..76eb4a1a 100644 --- a/src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenIfTests.java +++ b/src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenIfTests.java @@ -16,6 +16,7 @@ public class WasmCodeGenIfTests { @Test public void ifIsCompiledToWasmIf(Snapshotter snapshotter) throws IOException, InterruptedException { var instruction = Instructions.if_( + 1, List.of( Instructions.pushInt(1), Instructions.pushInt(2), |
