TestRunner: Updated warning message when there is unsimplified code
This commit is contained in:
parent
21f9adf15e
commit
4e65800adf
|
@ -56,7 +56,9 @@ private:
|
||||||
|
|
||||||
// Ensure that the test case is not bad.
|
// Ensure that the test case is not bad.
|
||||||
if (str1 != str2) {
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,10 @@ private:
|
||||||
tokenizer.simplifyTokenList();
|
tokenizer.simplifyTokenList();
|
||||||
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
|
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
|
||||||
if (str1 != str2)
|
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
|
// Check auto variables
|
||||||
checkAutoVariables.autoVariables();
|
checkAutoVariables.autoVariables();
|
||||||
|
|
|
@ -80,7 +80,10 @@ private:
|
||||||
tokenizer.simplifyTokenList();
|
tokenizer.simplifyTokenList();
|
||||||
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
|
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
|
||||||
if (str1 != str2)
|
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);
|
checkBool.runSimplifiedChecks(&tokenizer, &settings, this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,9 @@ private:
|
||||||
|
|
||||||
// Ensure that the test case is not bad.
|
// Ensure that the test case is not bad.
|
||||||
if (verify && str1 != str2) {
|
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..
|
// Check for buffer overruns..
|
||||||
|
|
|
@ -99,7 +99,9 @@ private:
|
||||||
tokenizer.simplifyTokenList();
|
tokenizer.simplifyTokenList();
|
||||||
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
|
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
|
||||||
if (verify && str1 != str2)
|
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.nullConstantDereference();
|
||||||
checkNullPointer.executionPaths();
|
checkNullPointer.executionPaths();
|
||||||
|
|
Loading…
Reference in New Issue