Skip to content

Commit f4509e4

Browse files
authored
[EH] Make test_embind_val_coro_catch_cpp_exception use @with_all_eh_sjlj (#27446)
`@with_all_eh_sjlj` also handles skipping for wasm2js.
1 parent 6e20fdc commit f4509e4

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

test/test_core.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7767,18 +7767,13 @@ def test_embind_val_coro_propagate_js_error(self, extra_flags):
77677767
self.cflags += ['-std=c++20', '--bind', '--pre-js=pre.js', *extra_flags, '-sINCOMING_MODULE_JS_API=onRuntimeInitialized', '--no-entry']
77687768
self.do_runf('embind/test_val_coro_noexcept.cpp', 'rejected with: bang from JS promise!\n')
77697769

7770-
@parameterized({
7771-
'emscripten_eh': (['-fexceptions'],),
7772-
'wasm_eh': (['-fwasm-exceptions'],),
7773-
})
7774-
def test_embind_val_coro_catch_cpp_exception(self, extra_flags):
7775-
if self.is_wasm2js() and '-fwasm-exceptions' in extra_flags:
7776-
self.skipTest('wasm2js does not support WASM exceptions')
7770+
@with_all_eh_sjlj
7771+
def test_embind_val_coro_catch_cpp_exception(self):
77777772
self.set_setting('EXCEPTION_STACK_TRACES') # For debugging
77787773
create_file('pre.js', r'''Module.onRuntimeInitialized = () => {
77797774
Module.catchCppExceptionPromise().then(console.log);
77807775
}''')
7781-
self.cflags += ['-std=c++20', '--bind', '--pre-js=pre.js', *extra_flags, '-sINCOMING_MODULE_JS_API=onRuntimeInitialized', '--no-entry']
7776+
self.cflags += ['-std=c++20', '--bind', '--pre-js=pre.js', '-sINCOMING_MODULE_JS_API=onRuntimeInitialized', '--no-entry']
77827777
self.do_runf('embind/test_val_coro.cpp', 'successfully caught!\n')
77837778

77847779
def test_embind_val_coro_await_in_non_val_coro(self):

0 commit comments

Comments
 (0)