File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333#include < algorithm>
3434#include < cstdlib>
3535#include < list>
36- #include < sstream>
3736#include < string>
3837#include < unordered_set>
3938#include < utility>
@@ -486,9 +485,8 @@ class TestCppcheck : public TestFixture {
486485 " y\n "
487486 " ;\n " ;
488487
489- std::istringstream fin (code);
490488 simplecpp::OutputList outputList;
491- const simplecpp::TokenList tokens2 (fin , files, " " , &outputList);
489+ const simplecpp::TokenList tokens2 (code , files, " " , &outputList);
492490 const std::string expected2 = " <rawtokens>\n "
493491 " <file index=\" 0\" name=\" test.c\" />\n "
494492 " <file index=\" 1\" name=\"\" />\n "
@@ -531,8 +529,8 @@ class TestCppcheck : public TestFixture {
531529
532530 std::vector<std::string> files;
533531
534- std::istringstream istr ( " void f();\n int x;\n " ) ;
535- const simplecpp::TokenList tokens (istr , files, " m1.c" );
532+ const char code[] = " void f();\n int x;\n " ;
533+ const simplecpp::TokenList tokens (code , files, " m1.c" );
536534
537535 Preprocessor preprocessor (settings, errorLogger, Standards::Language::C);
538536 ASSERT (preprocessor.loadFiles (tokens, files));
You can’t perform that action at this time.
0 commit comments