(tmp_path)
| 34 | |
| 35 | |
| 36 | def test_block(tmp_path): |
| 37 | test_file = tmp_path / 'test.c' |
| 38 | with open(test_file, 'wt') as f: |
| 39 | f.write('/* polyspace +1 MISRA2012:8.2 */\n' |
| 40 | 'int f();\n' # <- suppression applies to this line |
| 41 | 'int g();\n') # <- suppression does not apply to this line |
| 42 | |
| 43 | args = ['--addon=misra', '--template=simple', '--enable=style,information', '--inline-suppr', 'test.c'] |
| 44 | |
| 45 | out_exp = ['Checking test.c ...'] |
| 46 | err_exp = ['test.c:3:6: style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-8.2]'] |
| 47 | |
| 48 | assert_cppcheck(args, ec_exp=0, err_exp=err_exp, out_exp=out_exp, cwd=str(tmp_path)) |
| 49 | |
| 50 | |
| 51 | def test_begin_end(tmp_path): |
nothing calls this directly
no test coverage detected