Fixed #3015 (xml-style error output when running testrunner on particular tests)

This commit is contained in:
Daniel Marjamäki 2012-01-06 09:09:46 +01:00
parent 73d9dc870e
commit 5ae7c4506f
1 changed files with 6 additions and 6 deletions

View File

@ -348,14 +348,14 @@ private:
std::string getcode(const char code[], const char varname[], bool classfunc=false) const {
std::string getcode(const char code[], const char varname[], bool classfunc=false) {
// Clear the error buffer..
errout.str("");
Settings settings;
// Tokenize..
Tokenizer tokenizer(&settings, NULL);
Tokenizer tokenizer(&settings, this);
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
tokenizer.simplifyTokenList();
@ -601,14 +601,14 @@ private:
}
std::string simplifycode(const char code[]) const {
std::string simplifycode(const char code[]) {
// Clear the error buffer..
errout.str("");
Settings settings;
// Tokenize..
Tokenizer tokenizer(&settings, NULL);
Tokenizer tokenizer(&settings, this);
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
Token *tokens = const_cast<Token *>(tokenizer.tokens());
@ -769,7 +769,7 @@ private:
// is there a leak in given code? if so, return the linenr
unsigned int dofindleak(const char code[]) const {
unsigned int dofindleak(const char code[]) {
// Clear the error buffer..
errout.str("");
@ -777,7 +777,7 @@ private:
settings.debug = settings.debugwarnings = true;
// Tokenize..
Tokenizer tokenizer(&settings, NULL);
Tokenizer tokenizer(&settings, this);
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");