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

Function test_container_methods

test/cli/dumpfile_test.py:123–134  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

121
122
123def test_container_methods(tmpdir):
124 test_file = str(tmpdir / 'test.cpp')
125 with open(test_file, 'wt') as f:
126 f.write('std::string s;\n')
127
128 exitcode, _, stderr = cppcheck(['--dump', '.'], cwd=str(tmpdir))
129 assert exitcode == 0, stderr
130
131 dumpfile = test_file + '.dump'
132 with open(dumpfile, 'rt') as f:
133 dump = f.read()
134 assert '<f name="emplace" action="push" yield="iterator"/>' in dump

Callers

nothing calls this directly

Calls 4

cppcheckFunction · 0.90
strFunction · 0.85
writeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected