Skip to content

Commit

Permalink
[EH] Make test setting consistent (NFC) (emscripten-core#18655)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aheejin committed Feb 4, 2023
1 parent 5a2a360 commit ad65236
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -8120,9 +8120,11 @@ def test_wasm_exceptions_stack_trace_and_message(self):
assert_returncode=NON_ZERO, expected_output=stack_trace_checks)

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

# Doesn't print stack traces
self.set_setting('ASSERTIONS', 0)
Expand Down

0 comments on commit ad65236

Please sign in to comment.