@@ -2290,13 +2290,13 @@ class TestClass : public TestFixture {
22902290 ASSERT_EQUALS (" [test.cpp:3]: (style, inconclusive) Technically the member function 'Fred::getA' can be const.\n " , errout.str ());
22912291
22922292 checkConst (" class Fred {\n "
2293- " const std::string foo() { return " " ; }\n "
2293+ " const std::string foo() { return \"\ " ; }\n "
22942294 " };\n " );
22952295 ASSERT_EQUALS (" [test.cpp:2]: (performance, inconclusive) Technically the member function 'Fred::foo' can be static.\n " , errout.str ());
22962296
22972297 checkConst (" class Fred {\n "
22982298 " std::string s;\n "
2299- " const std::string & foo() { return " " ; }\n "
2299+ " const std::string & foo() { return \"\ " ; }\n "
23002300 " };\n " );
23012301 ASSERT_EQUALS (" [test.cpp:3]: (performance, inconclusive) Technically the member function 'Fred::foo' can be static.\n " , errout.str ());
23022302
@@ -2349,7 +2349,7 @@ class TestClass : public TestFixture {
23492349 ASSERT_EQUALS (" " , errout.str ());
23502350
23512351 checkConst (" class Fred {\n "
2352- " const std::string foo() const throw() { return " " ; }\n "
2352+ " const std::string foo() const throw() { return \"\ " ; }\n "
23532353 " };\n " );
23542354 ASSERT_EQUALS (" [test.cpp:2]: (performance, inconclusive) Technically the member function 'Fred::foo' can be static.\n " , errout.str ());
23552355 }
@@ -2359,7 +2359,7 @@ class TestClass : public TestFixture {
23592359 // assignment to variable can't be const
23602360 checkConst (" class Fred {\n "
23612361 " std::string s;\n "
2362- " void foo() { s = " " ; }\n "
2362+ " void foo() { s = \"\ " ; }\n "
23632363 " };\n " );
23642364 ASSERT_EQUALS (" " , errout.str ());
23652365
@@ -2462,8 +2462,8 @@ class TestClass : public TestFixture {
24622462 " std::string s;\n "
24632463 " const std::string & foo();\n "
24642464 " };\n "
2465- " const std::string & Fred::foo() { return " " ; }" );
2466- ASSERT_EQUALS (" [test.cpp:5] -> [test.cpp:3]: (performance, inconclusive) Technically the member function 'Fred::foo' can be static.\n " , errout.str ());
2465+ " const std::string & Fred::foo() { return \"\ " ; }" );
2466+ TODO_ASSERT_EQUALS (" [test.cpp:5] -> [test.cpp:3]: (performance, inconclusive) Technically the member function 'Fred::foo' can be static.\n " , " " , errout.str ());
24672467
24682468 // functions with a function call to a non-const member can't be const.. (#1305)
24692469 checkConst (" class Fred\n "
@@ -2490,7 +2490,7 @@ class TestClass : public TestFixture {
24902490 " std::string s;\n "
24912491 " void foo();\n "
24922492 " };\n "
2493- " void Fred::foo() { s = " " ; }" );
2493+ " void Fred::foo() { s = \"\ " ; }" );
24942494 ASSERT_EQUALS (" " , errout.str ());
24952495
24962496 // assignment to function argument reference can be const
@@ -2860,7 +2860,7 @@ class TestClass : public TestFixture {
28602860 // ticket #1517
28612861 checkConst (" class A {\n "
28622862 " public:\n "
2863- " A():m_strValue(" " ){}\n "
2863+ " A():m_strValue(\"\ " ){}\n "
28642864 " std::string strGetString() { return m_strValue; }\n "
28652865 " private:\n "
28662866 " std::string m_strValue;\n "
@@ -3514,7 +3514,7 @@ class TestClass : public TestFixture {
35143514 void const25 () { // ticket #1724
35153515 checkConst (" class A{\n "
35163516 " public:\n "
3517- " A(){m_strVal=" " ;}\n "
3517+ " A(){m_strVal=\"\ " ;}\n "
35183518 " std::string strGetString() const\n "
35193519 " {return m_strVal.c_str();}\n "
35203520 " const std::string strGetString1() const\n "
@@ -3527,7 +3527,7 @@ class TestClass : public TestFixture {
35273527
35283528 checkConst (" class A{\n "
35293529 " public:\n "
3530- " A(){m_strVal=" " ;}\n "
3530+ " A(){m_strVal=\"\ " ;}\n "
35313531 " std::string strGetString()\n "
35323532 " {return m_strVal.c_str();}\n "
35333533 " private:\n "
@@ -3538,7 +3538,7 @@ class TestClass : public TestFixture {
35383538
35393539 checkConst (" class A{\n "
35403540 " public:\n "
3541- " A(){m_strVal=" " ;}\n "
3541+ " A(){m_strVal=\"\ " ;}\n "
35423542 " const std::string strGetString1()\n "
35433543 " {return m_strVal.c_str();}\n "
35443544 " private:\n "
@@ -3549,7 +3549,7 @@ class TestClass : public TestFixture {
35493549
35503550 checkConst (" class A{\n "
35513551 " public:\n "
3552- " A(){m_strVec.push_back(" " );}\n "
3552+ " A(){m_strVec.push_back(\"\ " );}\n "
35533553 " size_t strGetSize()\n "
35543554 " {return m_strVec.size();}\n "
35553555 " private:\n "
@@ -3560,7 +3560,7 @@ class TestClass : public TestFixture {
35603560
35613561 checkConst (" class A{\n "
35623562 " public:\n "
3563- " A(){m_strVec.push_back(" " );}\n "
3563+ " A(){m_strVec.push_back(\"\ " );}\n "
35643564 " bool strGetEmpty()\n "
35653565 " {return m_strVec.empty();}\n "
35663566 " private:\n "
0 commit comments