Add TODO test case for #1444 (inline suppression suppress all errors of the same type in a function)

http://sourceforge.net/apps/trac/cppcheck/ticket/1444
This commit is contained in:
Reijo Tomperi 2010-02-25 22:55:09 +02:00
parent 13f8e10c40
commit b35acc1e6b
1 changed files with 11 additions and 0 deletions

View File

@ -1030,6 +1030,17 @@ private:
" f();\n" " f();\n"
"}\n"); "}\n");
ASSERT_EQUALS("[test.cpp:5]: (error) Possible null pointer dereference: f\n", errout.str()); ASSERT_EQUALS("[test.cpp:5]: (error) Possible null pointer dereference: f\n", errout.str());
checkNullPointer("static void foo()\n"
"{\n"
" int *p = 0;\n"
" int *p2 = 0;\n"
" int r = *p;\n"
" int r2 = *p2;\n"
"}\n");
TODO_ASSERT_EQUALS("[test.cpp:5]: (error) Null pointer dereference\n"
"[test.cpp:6]: (error) Null pointer dereference\n", errout.str());
} }
void nullpointer7() void nullpointer7()