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

Function __check_ast

test/cli/clang-import_test.py:57–65  ·  view source on GitHub ↗
(tmpdir, code)

Source from the content-addressed store, hash-verified

55
56
57def __check_ast(tmpdir, code):
58 testfile = os.path.join(tmpdir, 'test.cpp')
59 with open(testfile, 'w+t') as f:
60 f.write(code)
61 ret1, stdout1, _ = cppcheck(['-q', '--clang', '--debug-ast', testfile])
62 ret2, stdout2, _ = cppcheck(['-q', '--debug-ast', testfile])
63 assert 0 == ret1, stdout1
64 assert 0 == ret2, stdout1
65 assert __get_debug_section('##AST', stdout1) == __get_debug_section('##AST', stdout2)
66
67
68

Callers 3

test_ast_calculationsFunction · 0.85
test_ast_control_flowFunction · 0.85
test_astFunction · 0.85

Calls 4

cppcheckFunction · 0.90
__get_debug_sectionFunction · 0.85
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected