diff --git a/crates/wast/tests/local/if.wast b/crates/wast/tests/local/if.wast new file mode 100644 index 0000000000..eaf65c4303 --- /dev/null +++ b/crates/wast/tests/local/if.wast @@ -0,0 +1,10 @@ +(module + (func (export "if.only-then.diverging") + (if + (i32.const 0) ;; false + (then + (br 0) + ) + ) + ) +) diff --git a/crates/wast/tests/local/local-tee.wast b/crates/wast/tests/local/local-tee.wast new file mode 100644 index 0000000000..c4200c835b --- /dev/null +++ b/crates/wast/tests/local/local-tee.wast @@ -0,0 +1,22 @@ +(module + (func (export "local.tee.same") (param i32) (result i32) + (local.tee 0 (local.get 0)) + ) + (func (export "local.tee.same.drop") (param i32) + (drop (local.tee 0 (local.get 0))) + ) +) + +(assert_return + (invoke "local.tee.same" (i32.const 0)) (i32.const 0) +) +(assert_return + (invoke "local.tee.same" (i32.const 1)) (i32.const 1) +) + +(assert_return + (invoke "local.tee.same.drop" (i32.const 0)) +) +(assert_return + (invoke "local.tee.same.drop" (i32.const 1)) +) diff --git a/crates/wast/tests/mod.rs b/crates/wast/tests/mod.rs index 73a62e87ec..7786791597 100644 --- a/crates/wast/tests/mod.rs +++ b/crates/wast/tests/mod.rs @@ -197,8 +197,12 @@ macro_rules! expand_tests { fn wasm_utf8_import_module("utf8-import-module"); fn wasm_utf8_invalid_encoding("utf8-invalid-encoding"); fn wasm_wide_arithmetic("proposals/wide-arithmetic/wide-arithmetic"); - fn wasm_wide_arithmetic_local("../../local/wide-arithmetic"); - fn wasm_replace_result("../../local/replace-result"); + + // Wasmi specific test cases + fn wasmi_wide_arithmetic("../../local/wide-arithmetic"); + fn wasmi_replace_result("../../local/replace-result"); + fn wasmi_local_tee("../../local/local-tee"); + fn wasmi_if("../../local/if"); // Wasm `simd` tests fn wasm_simd_address("simd_address");