TestOther: code cleanup
This commit is contained in:
parent
389aec51ae
commit
bf921251e9
|
@ -168,7 +168,7 @@ private:
|
||||||
TEST_CASE(test_isSameExpression);
|
TEST_CASE(test_isSameExpression);
|
||||||
}
|
}
|
||||||
|
|
||||||
void check(const char raw_code[], const char *filename = nullptr, bool experimental = false, bool inconclusive = true, bool runSimpleChecks=true, Settings* settings = 0) {
|
void check(const char code[], const char *filename = nullptr, bool experimental = false, bool inconclusive = true, bool runSimpleChecks=true, Settings* settings = 0) {
|
||||||
// Clear the error buffer..
|
// Clear the error buffer..
|
||||||
errout.str("");
|
errout.str("");
|
||||||
|
|
||||||
|
@ -183,14 +183,6 @@ private:
|
||||||
settings->inconclusive = inconclusive;
|
settings->inconclusive = inconclusive;
|
||||||
settings->experimental = experimental;
|
settings->experimental = experimental;
|
||||||
|
|
||||||
// Preprocess file..
|
|
||||||
Preprocessor preprocessor(*settings);
|
|
||||||
std::list<std::string> configurations;
|
|
||||||
std::string filedata = "";
|
|
||||||
std::istringstream fin(raw_code);
|
|
||||||
preprocessor.preprocess(fin, filedata, configurations, "", settings->_includePaths);
|
|
||||||
const std::string code = preprocessor.getcode(filedata, "", "");
|
|
||||||
|
|
||||||
// Tokenize..
|
// Tokenize..
|
||||||
Tokenizer tokenizer(settings, this);
|
Tokenizer tokenizer(settings, this);
|
||||||
std::istringstream istr(code);
|
std::istringstream istr(code);
|
||||||
|
|
Loading…
Reference in New Issue