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

Function __check_symbol_database

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

Source from the content-addressed store, hash-verified

44
45
46def __check_symbol_database(tmpdir, code):
47 testfile = os.path.join(tmpdir, 'test.cpp')
48 with open(testfile, 'w+t') as f:
49 f.write(code)
50 ret1, stdout1, _ = cppcheck(['-q', '--clang', '--debug-symdb', testfile])
51 ret2, stdout2, _ = cppcheck(['-q', '--debug-symdb', testfile])
52 assert 0 == ret1, stdout1
53 assert 0 == ret2, stdout2
54 assert __get_debug_section('### Symbol database', stdout1) == __get_debug_section('### Symbol database', stdout2)
55
56
57def __check_ast(tmpdir, code):

Calls 4

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

Tested by

no test coverage detected