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

Function test_rules_suppression

addons/test/misra_test.py:115–126  ·  view source on GitHub ↗
(checker, capsys)

Source from the content-addressed store, hash-verified

113 assert("(custom-severity)" in captured)
114
115def test_rules_suppression(checker, capsys):
116 test_sources = ["addons/test/misra/misra-suppressions1-test.c",
117 "addons/test/misra/misra-suppressions2-test.c"]
118
119 for src in test_sources:
120 re_suppressed= r"\[%s\:[0-9]+\]" % src
121 dump_create(src, "--suppressions-list=addons/test/misra/suppressions.txt","--inline-suppr")
122 checker.parseDump(src + ".dump")
123 captured = capsys.readouterr().err
124 found = re.search(re_suppressed, captured)
125 assert found is None, 'Unexptected output:\n' + captured
126 dump_remove(src)
127
128def test_arguments_regression():
129 args_ok = ["-generate-table",

Callers

nothing calls this directly

Calls 3

dump_createFunction · 0.85
dump_removeFunction · 0.85
parseDumpMethod · 0.80

Tested by

no test coverage detected