()
| 51 | |
| 52 | |
| 53 | def 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 | |
| 65 | def test_segv(): |
nothing calls this directly
no test coverage detected