TestRunner: Updated warning message when there is unsimplified code

This commit is contained in:
Daniel Marjamäki 2013-04-16 16:54:19 +02:00
parent 21f9adf15e
commit 4e65800adf
5 changed files with 17 additions and 5 deletions

View File

@ -56,7 +56,9 @@ private:
// Ensure that the test case is not bad.
if (str1 != str2) {
warn(("Unsimplified code in test case\nstr1="+str1+"\nstr2="+str2).c_str());
warn(("Unsimplified code in test case. It looks like this test "
"should either be cleaned up or moved to TestTokenizer or "
"TestSimplifyTokens instead.\nstr1="+str1+"\nstr2="+str2).c_str());
}

View File

@ -55,7 +55,10 @@ private:
tokenizer.simplifyTokenList();
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
if (str1 != str2)
warn(("Unsimplified code in test case\nstr1="+str1+"\nstr2="+str2).c_str());
warn(("Unsimplified code in test case. It looks like this test "
"should either be cleaned up or moved to TestTokenizer or "
"TestSimplifyTokens instead.\nstr1="+str1+"\nstr2="+str2).c_str());
// Check auto variables
checkAutoVariables.autoVariables();

View File

@ -80,7 +80,10 @@ private:
tokenizer.simplifyTokenList();
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
if (str1 != str2)
warn("Unsimplified code in test case");
warn(("Unsimplified code in test case. It looks like this test "
"should either be cleaned up or moved to TestTokenizer or "
"TestSimplifyTokens instead.\nstr1="+str1+"\nstr2="+str2).c_str());
checkBool.runSimplifiedChecks(&tokenizer, &settings, this);
}

View File

@ -59,7 +59,9 @@ private:
// Ensure that the test case is not bad.
if (verify && str1 != str2) {
warn("Unsimplified code in test case");
warn(("Unsimplified code in test case. It looks like this test "
"should either be cleaned up or moved to TestTokenizer or "
"TestSimplifyTokens instead.\nstr1="+str1+"\nstr2="+str2).c_str());
}
// Check for buffer overruns..

View File

@ -99,7 +99,9 @@ private:
tokenizer.simplifyTokenList();
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
if (verify && str1 != str2)
warn(("Unsimplified code in test case\nstr1="+str1+"\nstr2="+str2).c_str());
warn(("Unsimplified code in test case. It looks like this test "
"should either be cleaned up or moved to TestTokenizer or "
"TestSimplifyTokens instead.\nstr1="+str1+"\nstr2="+str2).c_str());
checkNullPointer.nullConstantDereference();
checkNullPointer.executionPaths();