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

Function test_ast_control_flow

test/cli/clang-import_test.py:109–113  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

107 __check_ast(tmpdir, 'long long dostuff(int x) { return x ? 3 : 5; }')
108
109def test_ast_control_flow(tmpdir):
110 __check_ast(tmpdir, 'void foo(int x) { if (x > 5){} }')
111 __check_ast(tmpdir, 'int dostuff() { for (int x = 0; x < 10; x++); }')
112 __check_ast(tmpdir, 'void foo(int x) { switch (x) {case 1: break; } }')
113 __check_ast(tmpdir, 'void foo(int a, int b, int c) { foo(a,b,c); }')
114
115def test_ast(tmpdir):
116 __check_ast(tmpdir, 'struct S { int x; }; S* foo() { return new S(); }')

Callers

nothing calls this directly

Calls 1

__check_astFunction · 0.85

Tested by

no test coverage detected