Added test case for detecting false positive in the STL size handling
This commit is contained in:
parent
b3dd9e699b
commit
128215d692
|
@ -128,6 +128,24 @@ private:
|
|||
"}\n");
|
||||
ASSERT_EQUALS(std::string(""), errout.str());
|
||||
}
|
||||
|
||||
{
|
||||
check("void foo()\n"
|
||||
"{\n"
|
||||
" std::vector<int> foo;\n"
|
||||
" for (unsigned int ii = 0; ii <= foo.size(); ++ii)\n"
|
||||
" {\n"
|
||||
" if (ii == foo.size())\n"
|
||||
" {\n"
|
||||
" }\n"
|
||||
" else\n"
|
||||
" {\n"
|
||||
" foo[ii] = 0;\n"
|
||||
" }\n"
|
||||
" }\n"
|
||||
"}\n");
|
||||
// TODO ASSERT_EQUALS(std::string(""), errout.str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue