@@ -77,17 +77,15 @@ static void testcase(const std::string &name, void (*f)(), int argc, char * cons
77
77
78
78
#define TEST_CASE (F ) (testcase(#F, F, argc, argv))
79
79
80
-
81
- static simplecpp::TokenList makeTokenList (const char code[], std::vector<std::string> &filenames, const std::string &filename=std::string(), simplecpp::OutputList *outputList=nullptr)
80
+ static simplecpp::TokenList makeTokenList (const char code[], std::size_t size, std::vector<std::string> &filenames, const std::string &filename=std::string(), simplecpp::OutputList *outputList=nullptr)
82
81
{
83
- std::istringstream istr (code);
82
+ std::istringstream istr (std::string ( code, size) );
84
83
return simplecpp::TokenList (istr,filenames,filename,outputList);
85
84
}
86
85
87
- static simplecpp::TokenList makeTokenList (const char code[], std::size_t size, std:: vector<std::string> &filenames, const std::string &filename=std::string(), simplecpp::OutputList *outputList=nullptr)
86
+ static simplecpp::TokenList makeTokenList (const char code[], std::vector<std::string> &filenames, const std::string &filename=std::string(), simplecpp::OutputList *outputList=nullptr)
88
87
{
89
- std::istringstream istr (std::string (code, size));
90
- return simplecpp::TokenList (istr,filenames,filename,outputList);
88
+ return makeTokenList (code, strlen (code), filenames, filename, outputList);
91
89
}
92
90
93
91
static std::string readfile (const char code[], simplecpp::OutputList *outputList=nullptr )
0 commit comments