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

Function test_abort

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

Source from the content-addressed store, hash-verified

51
52
53def test_abort():
54 exitcode, stdout, _ = __call_process('abort')
55 lines = stdout.splitlines()
56 assert lines[0] == 'Internal error: cppcheck received signal SIGABRT - abort or assertion'
57 # no stacktrace on macOS
58 if sys.platform != "darwin":
59 assert lines[1] == 'Callstack:'
60 assert lines[2].endswith('my_segv()'), lines[2] # TODO: wrong function
61 assert lines[len(lines)-1] == 'Please report this to the cppcheck developers!'
62 assert exitcode == -6
63
64
65def test_segv():

Callers

nothing calls this directly

Calls 1

__call_processFunction · 0.70

Tested by

no test coverage detected