(tmpdir)
| 121 | |
| 122 | |
| 123 | def 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 |