MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / test_postrun_exception

Method test_postrun_exception

test/test_core.py:8747–8754  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

8745
8746 @requires_node
8747 def test_postrun_exception(self):
8748 # verify that an exception thrown in postRun() will not trigger the
8749 # compilation failed handler, and will be printed to stderr.
8750 self.add_post_run('ThisFunctionDoesNotExist()')
8751 out_js = self.build('core/test_hello_world.c')
8752 output = self.run_js(out_js, assert_returncode=NON_ZERO)
8753 self.assertStartswith(output, 'Hello, world!')
8754 self.assertContained('ThisFunctionDoesNotExist is not defined', output)
8755
8756 def test_postrun_exit_runtime(self):
8757 create_file('pre.js', "Module['postRun'] = () => err('post run\\n');")

Callers

nothing calls this directly

Calls 5

assertStartswithMethod · 0.95
add_post_runMethod · 0.80
run_jsMethod · 0.80
assertContainedMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected