@@ -2209,8 +2209,8 @@ class TestCmdlineParser : public TestFixture {
22092209 REDIRECT;
22102210 const char * const argv[] = {" cppcheck" , " --errorlist" };
22112211 ASSERT_EQUALS_ENUM (CmdLineParser::Result::Exit, parseFromArgs (argv));
2212- ASSERT_EQUALS (" " , logger->str ()); // empty since it is logged via ErrorLogger
22132212 const std::string errout_s = GET_REDIRECT_OUTPUT;
2213+ ASSERT_EQUALS (" " , logger->str ()); // empty since it is logged via ErrorLogger
22142214 ASSERT (startsWith (errout_s, ErrorMessage::getXMLHeader (" " )));
22152215 ASSERT (endsWith (errout_s, " </results>\n " ));
22162216 }
@@ -2221,9 +2221,9 @@ class TestCmdlineParser : public TestFixture {
22212221 R"( {"productName": "The Product"}\n)" );
22222222 const char * const argv[] = {" cppcheck" , " --errorlist" };
22232223 ASSERT_EQUALS_ENUM (CmdLineParser::Result::Exit, parseFromArgs (argv));
2224+ const std::string errout_s = GET_REDIRECT_OUTPUT;
22242225 ASSERT_EQUALS (1 , settings->settingsFiles .size ());
22252226 ASSERT_EQUALS (file.path (), *settings->settingsFiles .cbegin ());
2226- const std::string errout_s = GET_REDIRECT_OUTPUT;
22272227 ASSERT_EQUALS (" " , logger->str ()); // empty since it is logged via ErrorLogger
22282228 ASSERT (startsWith (errout_s, ErrorMessage::getXMLHeader (" The Product" )));
22292229 }
@@ -2232,8 +2232,8 @@ class TestCmdlineParser : public TestFixture {
22322232 REDIRECT;
22332233 const char * const argv[] = {" cppcheck" , " --library=missing" , " --errorlist" };
22342234 ASSERT_EQUALS_ENUM (CmdLineParser::Result::Exit, parseFromArgs (argv));
2235- ASSERT_EQUALS (" " , logger->str ()); // empty since it is logged via ErrorLogger
22362235 const std::string errout_s = GET_REDIRECT_OUTPUT;
2236+ ASSERT_EQUALS (" " , logger->str ()); // empty since it is logged via ErrorLogger
22372237 ASSERT (startsWith (errout_s, ErrorMessage::getXMLHeader (" " )));
22382238 ASSERT (endsWith (errout_s, " </results>\n " ));
22392239 }
@@ -3102,16 +3102,16 @@ class TestCmdlineParser : public TestFixture {
31023102 REDIRECT;
31033103 const char * const argv[] = {" cppcheck" , " --debug-lookup" , " file.cpp" };
31043104 ASSERT_EQUALS_ENUM (CmdLineParser::Result::Success, parseFromArgs (argv));
3105- ASSERT_EQUALS (true , settings->debuglookup );
31063105 GET_REDIRECT_OUTPUT; // ignore config lookup output
3106+ ASSERT_EQUALS (true , settings->debuglookup );
31073107 }
31083108
31093109 void debugLookupAll () {
31103110 REDIRECT;
31113111 const char * const argv[] = {" cppcheck" , " --debug-lookup=all" , " file.cpp" };
31123112 ASSERT_EQUALS_ENUM (CmdLineParser::Result::Success, parseFromArgs (argv));
3113- ASSERT_EQUALS (true , settings->debuglookup );
31143113 GET_REDIRECT_OUTPUT; // ignore config lookup output
3114+ ASSERT_EQUALS (true , settings->debuglookup );
31153115 }
31163116
31173117 void debugLookupAddon () {
@@ -3125,8 +3125,8 @@ class TestCmdlineParser : public TestFixture {
31253125 REDIRECT;
31263126 const char * const argv[] = {" cppcheck" , " --debug-lookup=config" , " file.cpp" };
31273127 ASSERT_EQUALS_ENUM (CmdLineParser::Result::Success, parseFromArgs (argv));
3128- ASSERT_EQUALS (true , settings->debuglookupConfig );
31293128 GET_REDIRECT_OUTPUT; // ignore config lookup output
3129+ ASSERT_EQUALS (true , settings->debuglookupConfig );
31303130 }
31313131
31323132 void debugLookupLibrary () {
0 commit comments