Skip to content

Commit ad65236

Browse files
authored
[EH] Make test setting consistent (NFC) (#18655)
I wasn't aware that we can also use `set_setting` to set settings and use `get_emcc_args` when testing with `expect_fail`. Changed to use `set_setting` to be consistent with the tests of other combinations.
1 parent 5a2a360 commit ad65236

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_other.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8120,9 +8120,11 @@ def test_wasm_exceptions_stack_trace_and_message(self):
81208120
assert_returncode=NON_ZERO, expected_output=stack_trace_checks)
81218121

81228122
# Not allowed
8123+
self.set_setting('ASSERTIONS', 1)
8124+
self.set_setting('EXCEPTION_STACK_TRACES', 0)
81238125
create_file('src.cpp', src)
8124-
err = self.expect_fail([EMCC, 'src.cpp', '-sASSERTIONS=1', '-sEXCEPTION_STACK_TRACES=0'])
8125-
self.assertContained('EXCEPTION_STACK_TRACES cannot be disabled when ASSERTIONS are enabled', err)
8126+
err = self.expect_fail([EMCC, 'src.cpp'] + self.get_emcc_args())
8127+
self.assertContained('error: EXCEPTION_STACK_TRACES cannot be disabled when ASSERTIONS are enabled', err)
81268128

81278129
# Doesn't print stack traces
81288130
self.set_setting('ASSERTIONS', 0)

0 commit comments

Comments
 (0)