Fix all the test failures caused by my previous commit.

This commit is contained in:
Edoardo Prezioso 2011-10-30 11:27:27 +01:00
parent 44a234f9b0
commit 68cb7a2731
2 changed files with 12 additions and 1 deletions

View File

@ -6297,7 +6297,7 @@ private:
"};"; "};";
Settings settings; Settings settings;
settings.addEnabled("information"); settings.addEnabled("style");
settings.ifcfg = false; settings.ifcfg = false;
checkConst(code, &settings); checkConst(code, &settings);

View File

@ -1083,6 +1083,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("[test.cpp:7]: (warning) Redundant assignment of \"y\" in switch\n", errout.str()); ASSERT_EQUALS("[test.cpp:7]: (warning) Redundant assignment of \"y\" in switch\n", errout.str());
@ -1098,6 +1099,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("[test.cpp:8]: (warning) Redundant assignment of \"y\" in switch\n", errout.str()); ASSERT_EQUALS("[test.cpp:8]: (warning) Redundant assignment of \"y\" in switch\n", errout.str());
@ -1114,6 +1116,7 @@ private:
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
@ -1131,6 +1134,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
@ -1145,6 +1149,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
@ -1160,6 +1165,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
@ -1174,6 +1180,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
@ -1189,6 +1196,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
" }\n" " }\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
@ -1205,6 +1213,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
" }\n" " }\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
@ -1220,6 +1229,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
@ -1234,6 +1244,7 @@ private:
" case 3:\n" " case 3:\n"
" y = 3;\n" " y = 3;\n"
" }\n" " }\n"
" bar(y);\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());