Added test case for detecting false positive in the STL size handling

This commit is contained in:
Daniel Marjamäki 2009-03-17 18:54:50 +01:00
parent b3dd9e699b
commit 128215d692
1 changed files with 18 additions and 0 deletions

View File

@ -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());
}
}