|
40 | 40 | class TestCmdlineParser : public TestFixture { |
41 | 41 | public: |
42 | 42 | TestCmdlineParser() : TestFixture("TestCmdlineParser") |
43 | | - { |
44 | | -#if defined(_WIN64) || defined(_WIN32) |
45 | | - CmdLineParser::SHOW_DEF_PLATFORM_MSG = false; |
46 | | -#endif |
47 | | - } |
48 | | - |
49 | | - ~TestCmdlineParser() override { |
50 | | -#if defined(_WIN64) || defined(_WIN32) |
51 | | - CmdLineParser::SHOW_DEF_PLATFORM_MSG = true; |
52 | | -#endif |
53 | | - } |
| 43 | + {} |
54 | 44 |
|
55 | 45 | private: |
56 | 46 | std::unique_ptr<Settings> settings; |
@@ -169,10 +159,6 @@ class TestCmdlineParser : public TestFixture { |
169 | 159 | TEST_CASE(platformUnspecified); |
170 | 160 | TEST_CASE(platformPlatformFile); |
171 | 161 | TEST_CASE(platformUnknown); |
172 | | -#if defined(_WIN64) || defined(_WIN32) |
173 | | - TEST_CASE(platformDefault); |
174 | | - TEST_CASE(platformDefault2); |
175 | | -#endif |
176 | 162 | TEST_CASE(plistEmpty); |
177 | 163 | TEST_CASE(plistDoesNotExist); |
178 | 164 | TEST_CASE(suppressionsOld); |
@@ -1237,39 +1223,6 @@ class TestCmdlineParser : public TestFixture { |
1237 | 1223 | ASSERT_EQUALS("cppcheck: error: unrecognized platform: 'win128'.\n", GET_REDIRECT_OUTPUT); |
1238 | 1224 | } |
1239 | 1225 |
|
1240 | | -#if defined(_WIN64) || defined(_WIN32) |
1241 | | - void platformDefault() { |
1242 | | - REDIRECT; |
1243 | | - |
1244 | | - CmdLineParser::SHOW_DEF_PLATFORM_MSG = true; |
1245 | | - |
1246 | | - const char * const argv[] = {"cppcheck", "file.cpp"}; |
1247 | | - ASSERT(parser->parseFromArgs(2, argv)); |
1248 | | -#if defined(_WIN64) |
1249 | | - ASSERT_EQUALS(cppcheck::Platform::Type::Win64, settings->platform.type); |
1250 | | - ASSERT_EQUALS("cppcheck: Windows 64-bit binaries currently default to the 'win64' platform. Starting with Cppcheck 2.13 they will default to 'native' instead. Please specify '--platform=win64' explicitly if you rely on this.\n", GET_REDIRECT_OUTPUT); |
1251 | | -#elif defined(_WIN32) |
1252 | | - ASSERT_EQUALS(cppcheck::Platform::Type::Win32A, settings->platform.type); |
1253 | | - ASSERT_EQUALS("cppcheck: Windows 32-bit binaries currently default to the 'win32A' platform. Starting with Cppcheck 2.13 they will default to 'native' instead. Please specify '--platform=win32A' explicitly if you rely on this.\n", GET_REDIRECT_OUTPUT); |
1254 | | -#endif |
1255 | | - |
1256 | | - CmdLineParser::SHOW_DEF_PLATFORM_MSG = false; |
1257 | | - } |
1258 | | - |
1259 | | - void platformDefault2() { |
1260 | | - REDIRECT; |
1261 | | - |
1262 | | - CmdLineParser::SHOW_DEF_PLATFORM_MSG = true; |
1263 | | - |
1264 | | - const char * const argv[] = {"cppcheck", "--platform=unix64", "file.cpp"}; |
1265 | | - ASSERT(parser->parseFromArgs(3, argv)); |
1266 | | - ASSERT_EQUALS(cppcheck::Platform::Type::Unix64, settings->platform.type); |
1267 | | - ASSERT_EQUALS("", GET_REDIRECT_OUTPUT); |
1268 | | - |
1269 | | - CmdLineParser::SHOW_DEF_PLATFORM_MSG = false; |
1270 | | - } |
1271 | | -#endif |
1272 | | - |
1273 | 1226 | void plistEmpty() { |
1274 | 1227 | REDIRECT; |
1275 | 1228 | const char * const argv[] = {"cppcheck", "--plist-output=", "file.cpp"}; |
|
0 commit comments