Incomplete statement: test case for statement that begins with numeric constant.

This commit is contained in:
Leandro Penz 2009-02-11 15:16:32 +00:00
parent 7858ac9ab8
commit d1af0b6478
1 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,7 @@ private:
TEST_CASE(test2);
TEST_CASE(test3);
TEST_CASE(test4);
TEST_CASE(test5);
TEST_CASE(test_numeric);
// TODO TEST_CASE(intarray);
}
@ -116,6 +117,16 @@ private:
ASSERT_EQUALS(std::string(""), errout.str());
}
void test5()
{
check("void foo()\n"
"{\n"
" 50;\n"
"}\n");
ASSERT_EQUALS(std::string("[test.cpp:3]: (style) Redundant code: Found a statement that begins with numeric constant\n"), errout.str());
}
void test_numeric()
{
check("struct P\n"