diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-11-26 16:45:51 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-11-26 16:45:51 +0000 |
| commit | aa13c97dac536bd1c4bf2f4e5c6ee505a487c634 (patch) | |
| tree | 61fe8650b0579aa5dc5b55fb50b41eff6c3470d6 /src/test/java/org/shedlang/compiler/backends | |
| parent | ee02a8cd9af3b2ae723cbba9a910fc159fe75a7c (diff) | |
Support Patio exceptions in Patio Wasm backend
Diffstat (limited to 'src/test/java/org/shedlang/compiler/backends')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/backends/llvm/LlvmPatioCodeGenTests.java | 8 | ||||
| -rw-r--r-- | src/test/java/org/shedlang/compiler/backends/wasm/WasmPatioCodeGenTests.java | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/test/java/org/shedlang/compiler/backends/llvm/LlvmPatioCodeGenTests.java b/src/test/java/org/shedlang/compiler/backends/llvm/LlvmPatioCodeGenTests.java index a4c823df..56262676 100644 --- a/src/test/java/org/shedlang/compiler/backends/llvm/LlvmPatioCodeGenTests.java +++ b/src/test/java/org/shedlang/compiler/backends/llvm/LlvmPatioCodeGenTests.java @@ -1,5 +1,7 @@ package org.shedlang.compiler.backends.llvm; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.shedlang.compiler.backends.llvm.ir.ast.LlvmBasicBlock; import org.shedlang.compiler.backends.llvm.ir.ast.LlvmFunctionDefinition; import org.shedlang.compiler.backends.llvm.ir.ast.instructions.LlvmCall; @@ -64,4 +66,10 @@ public class LlvmPatioCodeGenTests extends PatioExampleTests { return TestProcessRunner.runCaptureOutput(List.of(executablePath.toString())); } + + @Disabled("WIP") + @Test + public void whenExceptionIsThrownThenFirstMatchingExceptionHandlerIsUsed() { + + } } diff --git a/src/test/java/org/shedlang/compiler/backends/wasm/WasmPatioCodeGenTests.java b/src/test/java/org/shedlang/compiler/backends/wasm/WasmPatioCodeGenTests.java index b3c0960f..fe87bfc8 100644 --- a/src/test/java/org/shedlang/compiler/backends/wasm/WasmPatioCodeGenTests.java +++ b/src/test/java/org/shedlang/compiler/backends/wasm/WasmPatioCodeGenTests.java @@ -9,6 +9,7 @@ import org.shedlang.compiler.backends.wasm.structure.ast.modules.WasmImport; import org.shedlang.compiler.backends.wasm.structure.ast.modules.WasmImportDescriptor; import org.shedlang.compiler.backends.wasm.structure.ast.types.WasmFuncType; import org.shedlang.compiler.backends.wasm.structure.ast.types.WasmValueType; +import org.shedlang.compiler.filesystem.ShedCompilerFiles; import org.shedlang.compiler.patio.PatioExampleTests; import org.shedlang.compiler.patio.ast.PatioCompilationUnit; import org.shedlang.compiler.testing.ExecutionResult; @@ -61,6 +62,13 @@ public class WasmPatioCodeGenTests extends PatioExampleTests { executablePath ); - return TestProcessRunner.runCaptureOutput(List.of("wasmtime", executablePath.toString())); + return TestProcessRunner.runCaptureOutput(List.of( + "node", + "--experimental-wasi-unstable-preview1", + "--no-warnings=ExperimentalWarning", + "--experimental-wasm-eh", + ShedCompilerFiles.getRoot().resolve("run-wasm.js").toString(), + executablePath.toString() + )); } } |
