diff --git a/test/testbufferoverrun.cpp b/test/testbufferoverrun.cpp index 6112bfa6b..0698f32d9 100644 --- a/test/testbufferoverrun.cpp +++ b/test/testbufferoverrun.cpp @@ -123,7 +123,7 @@ private: " char str[50];\n" " }\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -145,7 +145,7 @@ private: "{\n" " strcpy(buf, str);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -156,7 +156,7 @@ private: " char data[1];\n" " return abc.data[1];\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -168,7 +168,7 @@ private: " char data[100];\n" " const char *p = &data[100];\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -181,7 +181,7 @@ private: " char data[10];\n" " data[ sizeof(*data) ] = 0;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void sizeof2() @@ -191,7 +191,7 @@ private: " char data[10];\n" " data[ sizeof(data[0]) ] = 0;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("static void f()\n" "{\n" @@ -500,7 +500,7 @@ private: " char str[5];\n" " snprintf(str, 5, \"%s\", \"abc\");\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void snprintf3() @@ -510,7 +510,7 @@ private: " char str[5];\n" " snprintf(str, sizeof str, \"%s\", \"abc\");\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void snprintf4() @@ -520,7 +520,7 @@ private: " char str[5];\n" " snprintf(str, 8 - x, \"abcdefghijkl\");\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -572,7 +572,7 @@ private: " str[30] = 0;\n" " }\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -587,7 +587,7 @@ private: " memset(str,0,50);\n" " }\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void assign1() diff --git a/test/testcharvar.cpp b/test/testcharvar.cpp index 550a31a0d..2f16baf83 100644 --- a/test/testcharvar.cpp +++ b/test/testcharvar.cpp @@ -65,7 +65,7 @@ private: " unsigned char ch = 0x80;\n" " buf[ch] = 0;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void foo()\n" "{\n" @@ -106,7 +106,7 @@ private: " char ch;\n" " func(&ch);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void return1() @@ -116,7 +116,7 @@ private: " char c;\n" " return &c;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } }; diff --git a/test/testclass.cpp b/test/testclass.cpp index 5cede4d7b..8dae3e568 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -81,10 +81,10 @@ private: // Base class not found checkVirtualDestructor("class Derived : public Base { };"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); checkVirtualDestructor("class Derived : Base { };"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void virtualDestructor2() @@ -97,7 +97,7 @@ private: checkVirtualDestructor("class Base { };\n" "class Derived : Base { public: ~Derived() { (void)11; } };"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void virtualDestructor3() @@ -119,11 +119,11 @@ private: checkVirtualDestructor("class Base { public: ~Base(); };\n" "class Derived : public Base { };"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); checkVirtualDestructor("class Base { public: ~Base(); };\n" "class Derived : private Fred, public Base { };"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void virtualDestructor5() @@ -132,11 +132,11 @@ private: checkVirtualDestructor("class Base { public: ~Base(); };\n" "class Derived : public Base { public: ~Derived() {} };"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); checkVirtualDestructor("class Base { public: ~Base(); };\n" "class Derived : public Base { public: ~Derived(); }; Derived::~Derived() {}"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void virtualDestructorProtected() @@ -154,7 +154,7 @@ private: "public:\n" " ~B() { int a; }\n" "};\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void checkUninitVar(const char code[]) @@ -223,7 +223,7 @@ private: " }\n" "};\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void uninitVarTypedef() @@ -246,7 +246,7 @@ private: " Foo() { }\n" "};\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void privateCtor2() @@ -282,7 +282,7 @@ private: " return p;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } diff --git a/test/testconstructors.cpp b/test/testconstructors.cpp index 69fa4f76f..ef0859505 100644 --- a/test/testconstructors.cpp +++ b/test/testconstructors.cpp @@ -146,7 +146,7 @@ private: " { this->i = 0; }\n" " int i;\n" "};\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void initvar_if() @@ -163,7 +163,7 @@ private: " }\n" " int i;\n" "};\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void initvar_operator_eq1() @@ -187,7 +187,7 @@ private: "};\n"); std::string err(errout.str()); - ASSERT_EQUALS(std::string(""), err); + ASSERT_EQUALS("", err); } @@ -214,7 +214,7 @@ private: " Init() { i = 0; }\n" " int i;\n" "};\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void initvar_same_classname() @@ -240,7 +240,7 @@ private: "}\n"); std::string err(errout.str()); - ASSERT_EQUALS(std::string(""), err); + ASSERT_EQUALS("", err); } void initvar_chained_assign() @@ -261,7 +261,7 @@ private: "}\n"); std::string err(errout.str()); - ASSERT_EQUALS(std::string(""), err); + ASSERT_EQUALS("", err); } @@ -296,7 +296,7 @@ private: "}\n"); std::string err(errout.str()); - ASSERT_EQUALS(std::string(""), err); + ASSERT_EQUALS("", err); } @@ -337,7 +337,7 @@ private: "};\n" "Fred::Fred()\n" "{ }"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void initvar_destructor() @@ -350,7 +350,7 @@ private: " Fred() : var(0) {}\n" " ~Fred() {}\n" "};\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void operatorEqSTL() diff --git a/test/testdivision.cpp b/test/testdivision.cpp index eabe16dee..e9d401518 100644 --- a/test/testdivision.cpp +++ b/test/testdivision.cpp @@ -113,7 +113,7 @@ private: " unsigned int i2;\n" " result = i2 / i1;}\n" ); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void division5() @@ -124,7 +124,7 @@ private: " unsigned int val = 32;\n" " val = val / USER_HASH;}\n" ); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void division6() diff --git a/test/testfunctionusage.cpp b/test/testfunctionusage.cpp index 6e1a605b4..78cca6b11 100644 --- a/test/testfunctionusage.cpp +++ b/test/testfunctionusage.cpp @@ -66,7 +66,7 @@ private: " { }\n" "}\n"); std::string err(errout.str()); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void return1() @@ -76,7 +76,7 @@ private: " return f1();\n" "}\n"); std::string err(errout.str()); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void callback1() @@ -86,7 +86,7 @@ private: " void (*f)() = cond ? f1 : NULL;\n" "}\n"); std::string err(errout.str()); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void else1() @@ -97,7 +97,7 @@ private: " else f1();\n" "}\n"); std::string err(errout.str()); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void functionpointer() @@ -111,7 +111,7 @@ private: " f(&abc::foo);\n" " return 0\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } }; diff --git a/test/testincompletestatement.cpp b/test/testincompletestatement.cpp index f13d7e5e2..92b752fec 100644 --- a/test/testincompletestatement.cpp +++ b/test/testincompletestatement.cpp @@ -80,7 +80,7 @@ private: "#endif\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void test2() @@ -100,7 +100,7 @@ private: " const char *str[] = { \"abc\" };\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void test4() @@ -115,7 +115,7 @@ private: "};\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void test5() @@ -143,13 +143,13 @@ private: "};\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void intarray() { check("int arr[] = { 100/2, 1*100 };\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void structarraynull() @@ -158,7 +158,7 @@ private: " { 100/2, 1*100 }\n" " { 90, 70 }\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void structarray() @@ -167,7 +167,7 @@ private: " { 100/2, 1*100 }\n" " { 90, 70 }\n" "};\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } }; diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index dc83d4028..2ddb1429d 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -245,7 +245,7 @@ private: " Fred *f = new Fred;\n" " return f;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void simple3() @@ -255,7 +255,7 @@ private: " char *s = new char[100];\n" " return (char *)s;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -277,7 +277,7 @@ private: " struct *str = new strlist;\n" " return &str->s;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -289,7 +289,7 @@ private: " char *str2 = (char *)str;\n" " free(str2);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -301,7 +301,7 @@ private: "{\n" " Fred *f = new Fred;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -315,7 +315,7 @@ private: " { }\n" " return str;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -327,7 +327,7 @@ private: " c->free(c);\n" " delete c;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void simple10() @@ -337,7 +337,7 @@ private: " FILE * f = fopen(fname, str);\n" " if ( fclose(f) != NULL );\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -371,7 +371,7 @@ private: " DeleteString(str);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -384,7 +384,7 @@ private: " *somestr = str;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -402,7 +402,7 @@ private: " delete [] a;\n" " }\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -432,7 +432,7 @@ private: " return;\n" " }\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void f()\n" "{\n" @@ -459,7 +459,7 @@ private: " }\n" " delete [] str;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -478,7 +478,7 @@ private: " }\n" " delete [] str;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -508,7 +508,7 @@ private: " }\n" " return s;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -523,7 +523,7 @@ private: " }\n" " return 0;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -537,7 +537,7 @@ private: " delete [] s;\n" " }\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -555,7 +555,7 @@ private: " str[0] = s;\n" " }\n" "}\n", true); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -584,7 +584,7 @@ private: " return;\n" " kfree( smp );\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void if3() @@ -595,7 +595,7 @@ private: " if (0 != s)\n" " foo(s);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void if4() @@ -609,7 +609,7 @@ private: " if (b)\n" " free(s);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void if5() @@ -621,7 +621,7 @@ private: " return;\n" " free(p);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void if6() @@ -637,7 +637,7 @@ private: "\n" " fclose( a );\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void if7() @@ -654,7 +654,7 @@ private: " delete [] a;\n" " else {}\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void if8() @@ -689,7 +689,7 @@ private: " buf = tmp;\n" " return buf;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void if10() @@ -739,7 +739,7 @@ private: " }\n" " free(str);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -801,7 +801,7 @@ private: " }\n" " return str;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -875,7 +875,7 @@ private: "\n" " return a;\n" "}\n", true); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -932,7 +932,7 @@ private: " };\n" " delete [] str;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void switch2() @@ -984,7 +984,7 @@ private: " return *str = ret;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1030,7 +1030,7 @@ private: " char *c = new char[50];\n" " return (c ? c : NULL);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void ret6() @@ -1040,7 +1040,7 @@ private: " char *c = new char[50];\n" " return strcpy(c, \"foo\");\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void ret7() @@ -1050,7 +1050,7 @@ private: " char *c = new char[50];\n" " return memcpy(c, \"foo\",4);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1076,7 +1076,7 @@ private: " fp = popen();\n" " pclose(fp);\n" "}\n", false); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void mismatch3() @@ -1091,7 +1091,7 @@ private: " if (abc) fclose(fp);\n" " else pclose(fp);\n" "}\n", false); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void mismatch4() @@ -1124,7 +1124,7 @@ private: " char *p = new char[100];\n" " foo(p);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1135,7 +1135,7 @@ private: " char *p = new char[100];\n" " foo.add(p);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1165,7 +1165,7 @@ private: " char *p = new char[100];\n" " foo(p);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1229,7 +1229,7 @@ private: " char *str = new char[100];" " (*release)(str);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1247,7 +1247,7 @@ private: " return;\n" " delete [] a;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void func10() @@ -1257,7 +1257,7 @@ private: " char *c = malloc(50);\n" " (fnc)(c);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void func11() @@ -1267,7 +1267,7 @@ private: " char *c = malloc(50);\n" " (s1->fnc)(c);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void func12() @@ -1287,7 +1287,7 @@ private: "\n" " add_list(base);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void func13() @@ -1297,7 +1297,7 @@ private: " char *p = malloc(100);\n" " foo(&p);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1425,7 +1425,7 @@ private: " }\n" "}\n", true); - TODO_ASSERT_EQUALS(std::string(""), errout.str()); + TODO_ASSERT_EQUALS("", errout.str()); } void class4() @@ -1600,7 +1600,7 @@ private: " }\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1619,7 +1619,7 @@ private: " func(&ab->a);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1682,7 +1682,7 @@ private: " free(a);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void realloc4() @@ -1717,7 +1717,7 @@ private: " free(p);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void foo()\n" "{\n" @@ -1726,7 +1726,7 @@ private: " free(p);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void foo()\n" "{\n" @@ -1735,7 +1735,7 @@ private: " free(a - 10);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void foo()\n" "{\n" @@ -1744,7 +1744,7 @@ private: " free(a - 10);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void foo()\n" "{\n" @@ -1752,7 +1752,7 @@ private: " list += a;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1767,7 +1767,7 @@ private: " }\n" " free(p);\n" "}\n"); - TODO_ASSERT_EQUALS(std::string(""), errout.str()); + TODO_ASSERT_EQUALS("", errout.str()); } void cast1() @@ -1788,7 +1788,7 @@ private: " free((void *)a);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void cast3() @@ -1799,7 +1799,7 @@ private: " free(reinterpret_cast(a));\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1840,7 +1840,7 @@ private: " free(str);\n" " foo(&str);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void dealloc_use_3() @@ -1852,7 +1852,7 @@ private: " f1(&str);\n" " f2(str);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void dealloc_use_4() @@ -1863,7 +1863,7 @@ private: " ReadDir( subdir );\n" " closedir(subdir);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void dealloc_use_5() @@ -1885,7 +1885,7 @@ private: " free(str);\n" " printf(\"free %x\", str);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void dealloc_use_7() @@ -1919,7 +1919,7 @@ private: " fprintf(fd, \"test\");\n" " fclose(fd);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void strcat_result_assignment() @@ -1932,7 +1932,7 @@ private: " free( p );\n" " return 0;\n" "}"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } @@ -1943,7 +1943,7 @@ private: "{\n" " Fred *f = new Fred;\n" "}\n", false); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void foo()\n" "{\n" @@ -2144,7 +2144,7 @@ private: " FILE *f = popen (\"test\", \"w\");\n" " int a = pclose(f);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void exit1() @@ -2160,7 +2160,7 @@ private: " }\n" " delete [] out;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void exit2() @@ -2170,7 +2170,7 @@ private: " char *out = new char[100];\n" " exit(0);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void stdstring() @@ -2241,14 +2241,14 @@ private: " FILE *f = fopen(fname, str);\n" " fcloseall();\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void f()\n" "{\n" " FILE *f = tmpfile();\n" " fcloseall();\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void opendir_function() @@ -2276,21 +2276,21 @@ private: " DIR *f = opendir(\".\");\n" " closedir(f);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void f(int fd)\n" "{\n" " DIR *f = fdopendir(fd);\n" " closedir(f);\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); check("void foo()\n" "{\n" " DIR * f = opendir(dirname);\n" " if (closedir(f));\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void dir_functions() @@ -2343,7 +2343,7 @@ private: " *c = 0;\n" " *data = c;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } void dealloc_and_alloc_in_func() @@ -2362,7 +2362,7 @@ private: " delete [] a;\n" " return 0;\n" "}\n"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS("", errout.str()); } }; diff --git a/test/testother.cpp b/test/testother.cpp index 4666365af..6eaf2093a 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -110,7 +110,7 @@ private: " }\n" " cout<