Fix testrunner

This commit is contained in:
Daniel Marjamäki 2018-08-05 14:01:24 +02:00
parent ddbe4b89b5
commit d8997bb43f
2 changed files with 7 additions and 7 deletions

View File

@ -52,7 +52,7 @@ private:
TEST_CASE(optionwithoutfile);
TEST_CASE(verboseshort);
TEST_CASE(verboselong);
TEST_CASE(debug);
TEST_CASE(debugSimplified);
TEST_CASE(debugwarnings);
TEST_CASE(forceshort);
TEST_CASE(forcelong);
@ -224,12 +224,12 @@ private:
ASSERT_EQUALS(true, settings.verbose);
}
void debug() {
void debugSimplified() {
REDIRECT;
const char *argv[] = {"cppcheck", "--debug", "file.cpp"};
settings.debug = false;
const char *argv[] = {"cppcheck", "--debug-simplified", "file.cpp"};
settings.debugSimplified = false;
ASSERT(defParser.parseFromArgs(3, argv));
ASSERT_EQUALS(true, settings.debug);
ASSERT_EQUALS(true, settings.debugSimplified);
}
void debugwarnings() {

View File

@ -846,7 +846,7 @@ private:
// Clear the error buffer..
errout.str("");
settings0.debug = settings0.debugwarnings = true;
settings0.debugwarnings = true;
// Tokenize..
std::istringstream istr(code);
@ -873,7 +873,7 @@ private:
const Token *tok = CheckMemoryLeakInFunction::findleak(tokens);
settings0.debug = settings0.debugwarnings = false;
settings0.debugwarnings = false;
return (tok ? tok->linenr() : (unsigned int)(-1));
}