diff --git a/test/testmathlib.cpp b/test/testmathlib.cpp index d8f75f283..d6d33c0bc 100644 --- a/test/testmathlib.cpp +++ b/test/testmathlib.cpp @@ -308,7 +308,7 @@ private: ASSERT_EQUALS(1714631779, MathLib::toLongNumber("'\\U0001f34c'")); { // some unit-testing for a utility function - ASSERT_EQUALS(0, MathLib::characterLiteralToLongNumber(std::string(""))); + ASSERT_EQUALS(0, MathLib::characterLiteralToLongNumber(std::string())); ASSERT_EQUALS(32, MathLib::characterLiteralToLongNumber(std::string(" "))); ASSERT_EQUALS(538976288, MathLib::characterLiteralToLongNumber(std::string(" "))); ASSERT_THROW(MathLib::characterLiteralToLongNumber(std::string("\\u")), InternalError); @@ -700,7 +700,7 @@ private: value = "garbage"; ASSERT_EQUALS(false, MathLib::isValidIntegerSuffix(value.begin(), value.end())); - value = ""; + value.clear(); ASSERT_EQUALS(false, MathLib::isValidIntegerSuffix(value.begin(), value.end())); value = "llu "; diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 13bb030f1..b5b5659b0 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -2596,7 +2596,7 @@ private: " if ((ret = alloc(&p)) != 0) return;\n" " free(p);\n" "}"); - ASSERT_EQUALS(std::string(""), errout.str()); + ASSERT_EQUALS(std::string(), errout.str()); } diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index d218c5917..69ac5cb3c 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -1361,7 +1361,7 @@ private: " if (pDocSh && !getCellRangesForAddress(nFlags)) ;\n" "}"); - ASSERT(db && errout.str() == ""); + ASSERT(db && errout.str().empty()); if (db) { const Scope *scope = db->findScopeByName("getFormula1"); @@ -1377,7 +1377,7 @@ private: " if (pDocSh && !getCellRangesForAddress(nFlags)) ;\n" "}"); - ASSERT(db && errout.str() == ""); + ASSERT(db && errout.str().empty()); if (db) { const Scope *scope = db->findScopeByName("getFormula1"); @@ -1397,7 +1397,7 @@ private: " if (pDocSh && !getCellRangesForAddress(nFlags)) ;\n" "}"); - ASSERT(db && errout.str() == ""); + ASSERT(db && errout.str().empty()); if (db) { const Scope *scope = db->findScopeByName("getFormula1"); @@ -1414,7 +1414,7 @@ private: "extern void f5() { };\n" "void f6() { }"); - ASSERT(db && errout.str() == ""); + ASSERT(db && errout.str().empty()); if (db) { const Token *f = Token::findsimplematch(tokenizer.tokens(), "f1");