Skip to content

Commit 78bc4dd

Browse files
committed
Fixed unusedFunctions warnings emmitted by cppcheck:
- Several tests in testcmdlineparser.cpp were never executed (failing tests commented) - Unnecessary function in testmemleak.cpp removed.
1 parent 88e4794 commit 78bc4dd

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

test/testcmdlineparser.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ class TestCmdlineParser : public TestFixture {
5151
TEST_CASE(defines);
5252
TEST_CASE(defines2);
5353
TEST_CASE(defines3);
54+
//TEST_CASE(defines4);
55+
//TEST_CASE(fileListStdin); // Hangs
56+
TEST_CASE(ignorefilepaths1);
57+
TEST_CASE(ignorefilepaths2);
58+
//TEST_CASE(ignorepaths1);
59+
//TEST_CASE(ignorepaths2);
60+
//TEST_CASE(ignorepaths3);
61+
//TEST_CASE(ignorepaths4);
5462
TEST_CASE(includesnopath);
5563
TEST_CASE(includes);
5664
TEST_CASE(includesslash);

test/testmemleak.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3125,25 +3125,6 @@ class TestMemleakInFunction : public TestFixture {
31253125
}
31263126

31273127

3128-
void checkvcl(const char code[]) {
3129-
// Clear the error buffer..
3130-
errout.str("");
3131-
3132-
Settings settings;
3133-
settings.experimental = true;
3134-
3135-
// Tokenize..
3136-
Tokenizer tokenizer(&settings, this);
3137-
std::istringstream istr(code);
3138-
tokenizer.tokenize(istr, "test.cpp");
3139-
tokenizer.simplifyTokenList();
3140-
3141-
// Check for memory leaks..
3142-
CheckMemoryLeakInFunction checkMemoryLeak(&tokenizer, &settings, this);
3143-
checkMemoryLeak.check();
3144-
}
3145-
3146-
31473128
void class1() {
31483129
check("class Fred\n"
31493130
"{\n"

0 commit comments

Comments
 (0)