summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2023-04-23 15:47:28 +0900
committerGitHub <noreply@github.com>2023-04-23 15:47:28 +0900
commit3dd36ab00f6eb117fafbcd0e55170ca2a3796c13 (patch)
tree1cdfdc8048781733eaebd15c1ad377c54c05d1e5 /test
parentbd1822dde2b08c79c6e98667a5317194ca913545 (diff)
downloadbinaryen-3dd36ab00f6eb117fafbcd0e55170ca2a3796c13.tar.gz
binaryen-3dd36ab00f6eb117fafbcd0e55170ca2a3796c13.tar.bz2
binaryen-3dd36ab00f6eb117fafbcd0e55170ca2a3796c13.zip
[EH] Support assert_exception (#5684)
`assert_exception` is similar to `assert_trap` but for exceptions, which is supported in the interpreter of the EH proposal (https://github.com/WebAssembly/exception-handling/tree/main/interpreter). We've been using `assert_trap` for both traps and exceptions, but this PR distinguishes them.
Diffstat (limited to 'test')
-rw-r--r--test/spec/exception-handling.wast14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/spec/exception-handling.wast b/test/spec/exception-handling.wast
index 4b817a81d..5ec78dfed 100644
--- a/test/spec/exception-handling.wast
+++ b/test/spec/exception-handling.wast
@@ -285,23 +285,23 @@
)
)
-(assert_trap (invoke "throw_single_value"))
-(assert_trap (invoke "throw_multiple_values"))
+(assert_exception (invoke "throw_single_value"))
+(assert_exception (invoke "throw_multiple_values"))
(assert_return (invoke "try_nothrow") (i32.const 3))
(assert_return (invoke "try_throw_catch") (i32.const 3))
-(assert_trap (invoke "try_throw_nocatch"))
+(assert_exception (invoke "try_throw_nocatch"))
(assert_return (invoke "try_throw_catchall") (i32.const 3))
(assert_return (invoke "try_call_catch") (i32.const 5))
(assert_return (invoke "try_throw_multivalue_catch") (i32.const 5))
-(assert_trap (invoke "try_throw_rethrow"))
-(assert_trap (invoke "try_call_rethrow"))
+(assert_exception (invoke "try_throw_rethrow"))
+(assert_exception (invoke "try_call_rethrow"))
(assert_return (invoke "rethrow_target_test1") (i32.const 2))
(assert_return (invoke "rethrow_target_test2") (i32.const 1))
(assert_return (invoke "rethrow_target_test3") (i32.const 1))
(assert_return (invoke "try_delegate_caught") (i32.const 3))
-(assert_trap (invoke "try_delegate_to_catchless_try"))
+(assert_exception (invoke "try_delegate_to_catchless_try"))
(assert_return (invoke "try_delegate_to_delegate") (i32.const 3))
-(assert_trap (invoke "try_delegate_to_caller"))
+(assert_exception (invoke "try_delegate_to_caller"))
(assert_invalid
(module