added a todo testcase for ticket 1778
This commit is contained in:
parent
00dcec47ac
commit
c9cd5ea250
|
@ -69,6 +69,7 @@ private:
|
||||||
TEST_CASE(nullpointer6);
|
TEST_CASE(nullpointer6);
|
||||||
TEST_CASE(nullpointer7);
|
TEST_CASE(nullpointer7);
|
||||||
TEST_CASE(nullpointer8);
|
TEST_CASE(nullpointer8);
|
||||||
|
TEST_CASE(nullpointer9);
|
||||||
|
|
||||||
TEST_CASE(uninitvar1);
|
TEST_CASE(uninitvar1);
|
||||||
TEST_CASE(uninitvar_alloc); // data is allocated but not initialized
|
TEST_CASE(uninitvar_alloc); // data is allocated but not initialized
|
||||||
|
@ -1151,6 +1152,16 @@ private:
|
||||||
ASSERT_EQUALS("[test.cpp:4]: (error) Possible null pointer dereference: x\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:4]: (error) Possible null pointer dereference: x\n", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nullpointer9() //#ticket 1778
|
||||||
|
{
|
||||||
|
checkNullPointer("void foo()\n"
|
||||||
|
"{\n"
|
||||||
|
" std::string * x = 0;\n"
|
||||||
|
" *x = \"test\";\n"
|
||||||
|
"}\n");
|
||||||
|
TODO_ASSERT_EQUALS("[test.cpp:4]: (error) Possible null pointer dereference: x\n", errout.str());
|
||||||
|
}
|
||||||
|
|
||||||
void checkUninitVar(const char code[])
|
void checkUninitVar(const char code[])
|
||||||
{
|
{
|
||||||
// Tokenize..
|
// Tokenize..
|
||||||
|
|
Loading…
Reference in New Issue