testuninitvar: use new checking instead of executionpath in 2 more testcases

This commit is contained in:
Daniel Marjamäki 2015-07-23 13:50:02 +02:00
parent 229d488048
commit 28fd6ce2f0
1 changed files with 10 additions and 10 deletions

View File

@ -2087,11 +2087,11 @@ private:
ASSERT_EQUALS("", errout.str());
// using uninitialized function pointer..
checkUninitVar("void foo()\n"
"{\n"
" void (*f)();\n"
" f();\n"
"}");
checkUninitVar2("void foo()\n"
"{\n"
" void (*f)();\n"
" f();\n"
"}");
ASSERT_EQUALS("[test.cpp:4]: (error) Uninitialized variable: f\n", errout.str());
checkUninitVarB("void foo() {\n"
@ -2192,11 +2192,11 @@ private:
"}").c_str());
ASSERT_EQUALS("[test.cpp:3]: (error) Uninitialized variable: x\n", errout.str());
checkUninitVar((funca +
"void b() {\n"
" int *p;\n"
" a(*p);\n"
"}").c_str());
checkUninitVar2((funca +
"void b() {\n"
" int *p;\n"
" a(*p);\n"
"}").c_str());
ASSERT_EQUALS("[test.cpp:3]: (error) Uninitialized variable: p\n", errout.str());
}