@@ -257,6 +257,15 @@ class TestSimplifyTypedef : public TestFixture {
257257 TEST_CASE (typedefInfo3);
258258 }
259259
260+ class TokenizerTest : public Tokenizer
261+ {
262+ friend class TestSimplifyTypedef ;
263+ public:
264+ TokenizerTest (TokenList tokenList, ErrorLogger &errorLogger)
265+ : Tokenizer(std::move(tokenList), errorLogger)
266+ {}
267+ };
268+
260269 struct TokOptions
261270 {
262271 bool simplify = true ;
@@ -280,7 +289,7 @@ class TestSimplifyTypedef : public TestFixture {
280289 TokenList tokenlist{settings1, Standards::Language::CPP};
281290 if (!tokenlist.createTokensFromString (data))
282291 return " " ;
283- Tokenizer tokenizer (std::move (tokenlist), *this );
292+ TokenizerTest tokenizer (std::move (tokenlist), *this );
284293 tokenizer.createLinks ();
285294 tokenizer.simplifyTypedef ();
286295
@@ -315,7 +324,7 @@ class TestSimplifyTypedef : public TestFixture {
315324
316325 if (!TokenListHelper::createTokensFromString (tokenlist, data, " file.c" ))
317326 return " " ;
318- Tokenizer tokenizer (std::move (tokenlist), *this );
327+ TokenizerTest tokenizer (std::move (tokenlist), *this );
319328 tokenizer.createLinks ();
320329 tokenizer.simplifyTypedef ();
321330 try {
@@ -331,7 +340,7 @@ class TestSimplifyTypedef : public TestFixture {
331340 TokenList tokenlist{settings1, Standards::Language::C};
332341 if (!TokenListHelper::createTokensFromString (tokenlist, code, " file.c" ))
333342 return {};
334- Tokenizer tokenizer (std::move (tokenlist), *this );
343+ TokenizerTest tokenizer (std::move (tokenlist), *this );
335344 tokenizer.createLinks ();
336345 tokenizer.simplifyTypedef ();
337346 try {
@@ -4457,7 +4466,7 @@ class TestSimplifyTypedef : public TestFixture {
44574466
44584467 TokenList tokenlist{settings1, Standards::Language::C};
44594468 ASSERT (TokenListHelper::createTokensFromString (tokenlist, code, " file.c" ));
4460- Tokenizer tokenizer (std::move (tokenlist), *this );
4469+ TokenizerTest tokenizer (std::move (tokenlist), *this );
44614470 tokenizer.createLinks ();
44624471 tokenizer.simplifyTypedef ();
44634472
@@ -4499,7 +4508,7 @@ class TestSimplifyTypedef : public TestFixture {
44994508
45004509 TokenList tokenlist{settings1, Standards::Language::C};
45014510 ASSERT (TokenListHelper::createTokensFromString (tokenlist, code, " file.c" ));
4502- Tokenizer tokenizer (std::move (tokenlist), *this );
4511+ TokenizerTest tokenizer (std::move (tokenlist), *this );
45034512 tokenizer.createLinks ();
45044513 tokenizer.simplifyTypedef ();
45054514
@@ -4517,7 +4526,7 @@ class TestSimplifyTypedef : public TestFixture {
45174526
45184527 TokenList tokenlist{settings1, Standards::Language::C};
45194528 ASSERT (TokenListHelper::createTokensFromString (tokenlist, code, " file.c" ));
4520- Tokenizer tokenizer (std::move (tokenlist), *this );
4529+ TokenizerTest tokenizer (std::move (tokenlist), *this );
45214530 tokenizer.createLinks ();
45224531 tokenizer.simplifyTypedef ();
45234532
0 commit comments