MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / test_fpe

Function test_fpe

test/signal/test-signalhandler.py:85–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84@pytest.mark.skipif(sys.platform == 'darwin', reason='Cannot raise FPE on macOS')
85def test_fpe():
86 exitcode, stdout, stderr = __call_process('fpe')
87 assert stderr == ''
88 lines = stdout.splitlines()
89 assert lines[0].startswith('Internal error: cppcheck received signal SIGFPE - FPE_FLTINV (at 0x'), lines[0]
90 assert lines[0].endswith(').'), lines[0]
91 assert lines[1] == 'Callstack:'
92 assert lines[3].endswith('my_fpe()'), lines[2]
93 assert lines[len(lines)-1] == 'Please report this to the cppcheck developers!'
94 assert exitcode == -8

Callers

nothing calls this directly

Calls 1

__call_processFunction · 0.70

Tested by

no test coverage detected