You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testcppcheck.cpp
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,7 @@ class TestCppcheck : public TestFixture {
81
81
TEST_CASE(getDumpFileContentsLibrary);
82
82
TEST_CASE(premiumResultsCache);
83
83
TEST_CASE(toomanyconfigs);
84
+
TEST_CASE(purgedConfiguration);
84
85
}
85
86
86
87
voidgetErrorMessages() const {
@@ -584,6 +585,33 @@ class TestCppcheck : public TestFixture {
584
585
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, ""));
585
586
}
586
587
588
+
voidpurgedConfiguration() const
589
+
{
590
+
ScopedFile test_file("test.cpp",
591
+
"#ifdef X\n"
592
+
"#endif\n"
593
+
"int main() {}\n");
594
+
595
+
// this is the "simple" format
596
+
constauto s = dinit(Settings,
597
+
$.templateFormat = templateFormat, // TODO: remove when we only longer rely on toString() in unique message handling
0 commit comments