@@ -153,8 +153,8 @@ class TestLibrary : public TestFixture {
153153 " </def>" ;
154154
155155 TokenList tokenList (&settings);
156- std::istringstream istr ( " foo();" ) ; // <- too few arguments, not library function
157- ASSERT (tokenList.createTokens (istr , Standards::Language::CPP));
156+ const char code[] = " foo();" ; // <- too few arguments, not library function
157+ ASSERT (tokenList.createTokens (code , Standards::Language::CPP));
158158 Token::createMutualLinks (tokenList.front ()->next (), tokenList.back ()->previous ());
159159 tokenList.createAst ();
160160
@@ -177,17 +177,17 @@ class TestLibrary : public TestFixture {
177177
178178 {
179179 TokenList tokenList (&settings);
180- std::istringstream istr ( " foo();" ) ; // <- too few arguments, not library function
181- ASSERT (tokenList.createTokens (istr , Standards::Language::CPP));
180+ const char code[] = " foo();" ; // <- too few arguments, not library function
181+ ASSERT (tokenList.createTokens (code , Standards::Language::CPP));
182182 Token::createMutualLinks (tokenList.front ()->next (), tokenList.back ()->previous ());
183183 tokenList.createAst ();
184184
185185 ASSERT (library.isNotLibraryFunction (tokenList.front ()));
186186 }
187187 {
188188 TokenList tokenList (&settings);
189- std::istringstream istr ( " foo(a);" ) ; // <- library function
190- ASSERT (tokenList.createTokens (istr , Standards::Language::CPP));
189+ const char code[] = " foo(a);" ; // <- library function
190+ ASSERT (tokenList.createTokens (code , Standards::Language::CPP));
191191 Token::createMutualLinks (tokenList.front ()->next (), tokenList.back ()->previous ());
192192 tokenList.createAst ();
193193
@@ -197,8 +197,8 @@ class TestLibrary : public TestFixture {
197197 }
198198 {
199199 TokenList tokenList (&settings);
200- std::istringstream istr ( " foo(a, b);" ) ; // <- library function
201- ASSERT (tokenList.createTokens (istr , Standards::Language::CPP));
200+ const char code[] = " foo(a, b);" ; // <- library function
201+ ASSERT (tokenList.createTokens (code , Standards::Language::CPP));
202202 Token::createMutualLinks (tokenList.front ()->next (), tokenList.back ()->previous ());
203203 tokenList.createAst ();
204204
@@ -208,8 +208,8 @@ class TestLibrary : public TestFixture {
208208 }
209209 {
210210 TokenList tokenList (&settings);
211- std::istringstream istr ( " foo(a, b, c);" ) ; // <- too much arguments, not library function
212- ASSERT (tokenList.createTokens (istr , Standards::Language::CPP));
211+ const char code[] = " foo(a, b, c);" ; // <- too much arguments, not library function
212+ ASSERT (tokenList.createTokens (code , Standards::Language::CPP));
213213 Token::createMutualLinks (tokenList.front ()->next (), tokenList.back ()->previous ());
214214 tokenList.createAst ();
215215
0 commit comments