@@ -8946,14 +8946,14 @@ class TestOther : public TestFixture {
89468946 " state_t *x = NULL;\n "
89478947 " x = dostuff();\n "
89488948 " }" );
8949- ASSERT_EQUALS (" " , errout.str ());
8949+ ASSERT_EQUALS (" test.cpp:2:style:Variable 'x' can be declared as pointer to const \n " , errout.str ());
89508950
89518951 check (" void f() {\n "
89528952 " state_t *x;\n "
89538953 " x = NULL;\n "
89548954 " x = dostuff();\n "
89558955 " }" );
8956- ASSERT_EQUALS (" " , errout.str ());
8956+ ASSERT_EQUALS (" test.cpp:2:style:Variable 'x' can be declared as pointer to const \n " , errout.str ());
89578957
89588958 check (" int foo() {\n " // #4420
89598959 " int x;\n "
@@ -9086,7 +9086,8 @@ class TestOther : public TestFixture {
90869086 " barney(x);\n "
90879087 " }\n "
90889088 " }" );
9089- ASSERT_EQUALS (" test.cpp:2:style:The scope of the variable 'p' can be reduced.\n " ,
9089+ ASSERT_EQUALS (" test.cpp:2:style:The scope of the variable 'p' can be reduced.\n "
9090+ " test.cpp:2:style:Variable 'p' can be declared as pointer to const\n " ,
90909091 errout.str ());
90919092
90929093 check (" void foo() {\n "
@@ -9178,14 +9179,14 @@ class TestOther : public TestFixture {
91789179 " a = (void*)0;\n "
91799180 " a = p;\n "
91809181 " }" );
9181- ASSERT_EQUALS (" " , errout.str ());
9182+ ASSERT_EQUALS (" [test.cpp:2]: (style) Variable 'a' can be declared as pointer to const \n " , errout.str ());
91829183
91839184 check (" void f() {\n "
91849185 " void* a;\n "
91859186 " a = (void*)0U;\n "
91869187 " a = p;\n "
91879188 " }" );
9188- ASSERT_EQUALS (" " , errout.str ());
9189+ ASSERT_EQUALS (" [test.cpp:2]: (style) Variable 'a' can be declared as pointer to const \n " , errout.str ());
91899190 }
91909191
91919192 void redundantVarAssignment_struct () {
@@ -9442,7 +9443,7 @@ class TestOther : public TestFixture {
94429443 " int *p = NULL;\n "
94439444 " p = dostuff();\n "
94449445 " }" );
9445- ASSERT_EQUALS (" " , errout.str ());
9446+ ASSERT_EQUALS (" test.cpp:2:style:Variable 'p' can be declared as pointer to const \n " , errout.str ());
94469447
94479448 // "trivial" initialization => do not warn
94489449 check (" void f() {\n "
0 commit comments