TestBoost: Warn if test case is not simplified properly

This commit is contained in:
Daniel Marjamäki 2013-04-13 18:42:56 +02:00
parent 8c6637c79c
commit dd6a806ada
1 changed files with 4 additions and 0 deletions

View File

@ -47,7 +47,11 @@ private:
Tokenizer tokenizer(&settings, this); Tokenizer tokenizer(&settings, this);
std::istringstream istr(code); std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp"); tokenizer.tokenize(istr, "test.cpp");
const std::string str1(tokenizer.tokens()->stringifyList(0,true));
tokenizer.simplifyTokenList(); tokenizer.simplifyTokenList();
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
if (str1 != str2)
warn("Unsimplified code in test case");
// Check.. // Check..
CheckBoost checkBoost; CheckBoost checkBoost;