test/testtokenize.cpp: use tokenizeAndStringify() function.
Instead of self-written code. No functional change.
This commit is contained in:
parent
9fa8c0ee9c
commit
88d7c598e3
|
@ -351,17 +351,10 @@ private:
|
||||||
" if (5==5);\n"
|
" if (5==5);\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
// tokenize..
|
ASSERT_EQUALS("void f ( )\n"
|
||||||
Tokenizer tokenizer;
|
"{\n"
|
||||||
std::istringstream istr(code);
|
"{ ; }\n"
|
||||||
tokenizer.tokenize(istr, "test.cpp");
|
"}", tokenizeAndStringify(code, true));
|
||||||
|
|
||||||
tokenizer.simplifyTokenList();
|
|
||||||
|
|
||||||
std::ostringstream ostr;
|
|
||||||
for (const Token *tok = tokenizer.tokens(); tok; tok = tok->next())
|
|
||||||
ostr << " " << tok->str();
|
|
||||||
ASSERT_EQUALS(" void f ( ) { { ; } }", ostr.str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ifAddBraces1()
|
void ifAddBraces1()
|
||||||
|
|
Loading…
Reference in New Issue