TestBool: Warn if test case is not simplified properly

This commit is contained in:
Daniel Marjamäki 2013-04-13 18:41:06 +02:00
parent 25582dbde7
commit 8c6637c79c
1 changed files with 5 additions and 0 deletions

View File

@ -76,7 +76,12 @@ private:
checkBool.runChecks(&tokenizer, &settings, this);
// Simplify token list..
const std::string str1(tokenizer.tokens()->stringifyList(0,true));
tokenizer.simplifyTokenList();
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
if (str1 != str2)
warn("Unsimplified code in test case");
checkBool.runSimplifiedChecks(&tokenizer, &settings, this);
}