(checker, capsys, test_files)
| 82 | |
| 83 | |
| 84 | def test_json_out(checker, capsys, test_files): |
| 85 | sys.argv.append("--cli") |
| 86 | checker.loadRuleTexts("./addons/test/misra/misra_rules_dummy.txt") |
| 87 | checker.parseDump("./addons/test/misra/misra-test.c.dump") |
| 88 | captured = capsys.readouterr() |
| 89 | captured = captured.out.splitlines() |
| 90 | sys.argv.remove("--cli") |
| 91 | json_output = convert_json_output(captured) |
| 92 | assert("Mandatory" in json_output['c2012-10.4'][0]['extra']) |
| 93 | assert("Required" in json_output['c2012-21.3'][0]['extra']) |
| 94 | assert("Advisory" in json_output['c2012-20.1'][0]['extra']) |
| 95 | |
| 96 | |
| 97 | def test_rules_cppcheck_severity(checker, capsys, test_files): |
nothing calls this directly
no test coverage detected