3232#include < utility>
3333#include < vector>
3434
35- class TestImporter : public ImportProject {
35+ class TestImporter final : public ImportProject {
3636public:
3737 using ImportProject::importCompileCommands;
3838 using ImportProject::importCppcheckGuiProject;
3939 using ImportProject::importVcxproj;
4040 using ImportProject::SharedItemsProject;
4141 using ImportProject::collectArgs;
42+ using ImportProject::fsSetDefines;
43+ using ImportProject::fsSetIncludePaths;
4244};
4345
4446
@@ -88,24 +90,24 @@ class TestImportProject : public TestFixture {
8890 void setDefines () const {
8991 FileSettings fs{" test.cpp" , Standards::Language::CPP, 0 };
9092
91- ImportProject ::fsSetDefines (fs, " A" );
93+ TestImporter ::fsSetDefines (fs, " A" );
9294 ASSERT_EQUALS (" A=1" , fs.defines );
9395
94- ImportProject ::fsSetDefines (fs, " A;B;" );
96+ TestImporter ::fsSetDefines (fs, " A;B;" );
9597 ASSERT_EQUALS (" A=1;B=1" , fs.defines );
9698
97- ImportProject ::fsSetDefines (fs, " A;;B;" );
99+ TestImporter ::fsSetDefines (fs, " A;;B;" );
98100 ASSERT_EQUALS (" A=1;B=1" , fs.defines );
99101
100- ImportProject ::fsSetDefines (fs, " A;;B" );
102+ TestImporter ::fsSetDefines (fs, " A;;B" );
101103 ASSERT_EQUALS (" A=1;B=1" , fs.defines );
102104 }
103105
104106 void setIncludePaths1 () const {
105107 FileSettings fs{" test.cpp" , Standards::Language::CPP, 0 };
106108 std::list<std::string> in (1 , " ../include" );
107109 std::map<std::string, std::string, cppcheck::stricmp> variables;
108- ImportProject ::fsSetIncludePaths (fs, " abc/def/" , in, variables);
110+ TestImporter ::fsSetIncludePaths (fs, " abc/def/" , in, variables);
109111 ASSERT_EQUALS (1U , fs.includePaths .size ());
110112 ASSERT_EQUALS (" abc/include/" , fs.includePaths .front ());
111113 }
@@ -115,7 +117,7 @@ class TestImportProject : public TestFixture {
115117 std::list<std::string> in (1 , " $(SolutionDir)other" );
116118 std::map<std::string, std::string, cppcheck::stricmp> variables;
117119 variables[" SolutionDir" ] = " c:/abc/" ;
118- ImportProject ::fsSetIncludePaths (fs, " /home/fred" , in, variables);
120+ TestImporter ::fsSetIncludePaths (fs, " /home/fred" , in, variables);
119121 ASSERT_EQUALS (1U , fs.includePaths .size ());
120122 ASSERT_EQUALS (" c:/abc/other/" , fs.includePaths .front ());
121123 }
@@ -125,7 +127,7 @@ class TestImportProject : public TestFixture {
125127 std::list<std::string> in (1 , " $(SOLUTIONDIR)other" );
126128 std::map<std::string, std::string, cppcheck::stricmp> variables;
127129 variables[" SolutionDir" ] = " c:/abc/" ;
128- ImportProject ::fsSetIncludePaths (fs, " /home/fred" , in, variables);
130+ TestImporter ::fsSetIncludePaths (fs, " /home/fred" , in, variables);
129131 ASSERT_EQUALS (1U , fs.includePaths .size ());
130132 ASSERT_EQUALS (" c:/abc/other/" , fs.includePaths .front ());
131133 }
0 commit comments