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

Function test_debug_clang_output

test/cli/clang-import_test.py:250–269  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

248
249
250def test_debug_clang_output(tmp_path):
251 test_file = tmp_path / 'test.c'
252 with open(test_file, 'wt') as f:
253 f.write(
254"""
255void f() {}
256""")
257
258 args = [
259 '-q',
260 '--clang',
261 '--debug-clang-output',
262 str(test_file)
263 ]
264
265 exitcode, stdout, stderr = cppcheck(args)
266 assert exitcode == 0, stderr if not stdout else stdout
267 assert stderr == ''
268 assert stdout.startswith('TranslationUnitDecl'), stdout
269 assert stdout.find(str(test_file)) != -1, stdout
270
271
272def test_debug_clang_output_failure_exitcode(tmp_path):

Callers

nothing calls this directly

Calls 4

cppcheckFunction · 0.90
strFunction · 0.85
writeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected