Incomplete statement: test case for statement that begins with numeric constant.
This commit is contained in:
parent
7858ac9ab8
commit
d1af0b6478
|
@ -62,6 +62,7 @@ private:
|
||||||
TEST_CASE(test2);
|
TEST_CASE(test2);
|
||||||
TEST_CASE(test3);
|
TEST_CASE(test3);
|
||||||
TEST_CASE(test4);
|
TEST_CASE(test4);
|
||||||
|
TEST_CASE(test5);
|
||||||
TEST_CASE(test_numeric);
|
TEST_CASE(test_numeric);
|
||||||
// TODO TEST_CASE(intarray);
|
// TODO TEST_CASE(intarray);
|
||||||
}
|
}
|
||||||
|
@ -116,6 +117,16 @@ private:
|
||||||
ASSERT_EQUALS(std::string(""), errout.str());
|
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()
|
void test_numeric()
|
||||||
{
|
{
|
||||||
check("struct P\n"
|
check("struct P\n"
|
||||||
|
|
Loading…
Reference in New Issue