mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-31 23:32:04 +00:00
Add unwinding test.
This commit is contained in:
38
examples/single_pass_tests/unwinding.wat
Normal file
38
examples/single_pass_tests/unwinding.wat
Normal file
@@ -0,0 +1,38 @@
|
||||
(module
|
||||
(func $main (export "main")
|
||||
(i32.const 5)
|
||||
(block (result i32)
|
||||
(i32.const 10)
|
||||
(block
|
||||
(i32.const 20)
|
||||
(block
|
||||
(i32.const 50)
|
||||
(br 1)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(i32.add)
|
||||
(if (i32.eq (i32.const 15))
|
||||
(then)
|
||||
(else unreachable)
|
||||
)
|
||||
|
||||
(block (result i32)
|
||||
(i32.const 10)
|
||||
(block (result i32)
|
||||
(i32.const 20)
|
||||
(block
|
||||
(i32.const 50)
|
||||
(br 1)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(i32.add)
|
||||
)
|
||||
(if (i32.eq (i32.const 60))
|
||||
(then)
|
||||
(else unreachable)
|
||||
)
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user