Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/wast/tests/local/if.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(module
(func (export "if.only-then.diverging")
(if
(i32.const 0) ;; false
(then
(br 0)
)
)
)
)
22 changes: 22 additions & 0 deletions crates/wast/tests/local/local-tee.wast
Original file line number Diff line number Diff line change
@@ -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))
)
8 changes: 6 additions & 2 deletions crates/wast/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading