Skip to content

Commit 88efa98

Browse files
committed
remove toomanyconfigs, tested in other_test.py
1 parent 3943e9e commit 88efa98

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

test/testcppcheck.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ class TestCppcheck : public TestFixture {
8181
TEST_CASE(getDumpFileContentsLibrary);
8282
TEST_CASE(checkPlistOutput);
8383
TEST_CASE(premiumResultsCache);
84-
TEST_CASE(toomanyconfigs);
8584
TEST_CASE(purgedConfiguration);
8685
}
8786

@@ -594,35 +593,6 @@ class TestCppcheck : public TestFixture {
594593
ASSERT(hash1 != hash2);
595594
}
596595

597-
void toomanyconfigs() const
598-
{
599-
ScopedFile test_file_a("a.c",
600-
"#if DEF_1\n"
601-
"#endif\n"
602-
"#if DEF_2\n"
603-
"#endif\n"
604-
"#if DEF_3\n"
605-
"#endif");
606-
607-
// this is the "simple" format
608-
const auto s = dinit(Settings,
609-
$.templateFormat = templateFormat, // TODO: remove when we only longer rely on toString() in unique message handling
610-
$.severity.enable (Severity::information);
611-
$.maxConfigs = 2);
612-
Suppressions supprs;
613-
ErrorLogger2 errorLogger;
614-
CppCheck cppcheck(s, supprs, errorLogger, false, {});
615-
ASSERT_EQUALS(1, cppcheck.check(FileWithDetails(test_file_a.path(), Path::identify(test_file_a.path(), false), 0)));
616-
// TODO: how to properly disable these warnings?
617-
errorLogger.errmsgs.erase(std::remove_if(errorLogger.errmsgs.begin(), errorLogger.errmsgs.end(), [](const ErrorMessage& msg) {
618-
return msg.id == "logChecker";
619-
}), errorLogger.errmsgs.end());
620-
// the internal errorlist is cleared after each check() call
621-
ASSERT_EQUALS(1, errorLogger.errmsgs.size());
622-
const auto it = errorLogger.errmsgs.cbegin();
623-
ASSERT_EQUALS("a.c:0:0: information: Too many #ifdef configurations - cppcheck only checks 2 of 4 configurations. Use --force to check all configurations. [toomanyconfigs]", it->toString(false, templateFormat, ""));
624-
}
625-
626596
void purgedConfiguration() const
627597
{
628598
ScopedFile test_file("test.cpp",

0 commit comments

Comments
 (0)