Skip to content

Commit dd6a806

Browse files
committed
TestBoost: Warn if test case is not simplified properly
1 parent 8c6637c commit dd6a806

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/testboost.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ class TestBoost : public TestFixture {
4747
Tokenizer tokenizer(&settings, this);
4848
std::istringstream istr(code);
4949
tokenizer.tokenize(istr, "test.cpp");
50+
const std::string str1(tokenizer.tokens()->stringifyList(0,true));
5051
tokenizer.simplifyTokenList();
52+
const std::string str2(tokenizer.tokens()->stringifyList(0,true));
53+
if (str1 != str2)
54+
warn("Unsimplified code in test case");
5155

5256
// Check..
5357
CheckBoost checkBoost;

0 commit comments

Comments
 (0)