Skip to content

Commit 0820249

Browse files
Update testunusedvar.cpp
1 parent ab1d0a6 commit 0820249

1 file changed

Lines changed: 4 additions & 20 deletions

File tree

test/testunusedvar.cpp

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,25 +2876,25 @@ class TestUnusedVar : public TestFixture {
28762876
"{\n"
28772877
" int * i[2];\n"
28782878
"}");
2879-
TODO_ASSERT_EQUALS("[test.cpp:3:9]: (style) Unused variable: i [unusedVariable]\n", "", errout_str());
2879+
ASSERT_EQUALS("[test.cpp:3:11]: (style) Unused variable: i [unusedVariable]\n", errout_str());
28802880

28812881
functionVariableUsage("void foo()\n"
28822882
"{\n"
28832883
" const int * i[2];\n"
28842884
"}");
2885-
TODO_ASSERT_EQUALS("[test.cpp:3:9]: (style) Unused variable: i [unusedVariable]\n", "", errout_str());
2885+
ASSERT_EQUALS("[test.cpp:3:17]: (style) Unused variable: i [unusedVariable]\n", errout_str());
28862886

28872887
functionVariableUsage("void foo()\n"
28882888
"{\n"
28892889
" void * i[2];\n"
28902890
"}");
2891-
TODO_ASSERT_EQUALS("[test.cpp:3:9]: (style) Unused variable: i [unusedVariable]\n", "", errout_str());
2891+
ASSERT_EQUALS("[test.cpp:3:12]: (style) Unused variable: i [unusedVariable]\n", errout_str());
28922892

28932893
functionVariableUsage("void foo()\n"
28942894
"{\n"
28952895
" const void * i[2];\n"
28962896
"}");
2897-
TODO_ASSERT_EQUALS("[test.cpp:3:9]: (style) Unused variable: i [unusedVariable]\n", "", errout_str());
2897+
ASSERT_EQUALS("[test.cpp:3:18]: (style) Unused variable: i [unusedVariable]\n", errout_str());
28982898

28992899
functionVariableUsage("void foo()\n"
29002900
"{\n"
@@ -5813,22 +5813,6 @@ class TestUnusedVar : public TestFixture {
58135813
" {}\n"
58145814
"}");
58155815
ASSERT_EQUALS("", errout_str());
5816-
5817-
functionVariableUsage("void f(const int* b, int x) {\n" // #11125
5818-
" int a[6];\n"
5819-
" int i = 0;\n"
5820-
" for (int j = 0; j < 6; ++j) {\n"
5821-
" if (b[j] != 0) {\n"
5822-
" a[i] = j;\n"
5823-
" ++i;\n"
5824-
" }\n"
5825-
" }\n"
5826-
" if (i > 1) {\n"
5827-
" a[i] = a[0];\n"
5828-
" (void)a[x];\n"
5829-
" }\n"
5830-
"}\n");
5831-
ASSERT_EQUALS("", errout_str());
58325816
}
58335817

58345818
void localvarForEach() { // #4155 - foreach

0 commit comments

Comments
 (0)