test/testtokenize.cpp: use tokenizeAndStringify() function.

Instead of self-written code.

No functional change.
This commit is contained in:
Slava Semushin 2009-07-25 16:41:16 +07:00
parent 9fa8c0ee9c
commit 88d7c598e3
1 changed files with 4 additions and 11 deletions

View File

@ -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()