From 78bc4ddbadf105a335331de175852266e8cdfd27 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Wed, 1 Aug 2012 11:18:03 -0700 Subject: [PATCH] Fixed unusedFunctions warnings emmitted by cppcheck: - Several tests in testcmdlineparser.cpp were never executed (failing tests commented) - Unnecessary function in testmemleak.cpp removed. --- test/testcmdlineparser.cpp | 8 ++++++++ test/testmemleak.cpp | 19 ------------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index 7d1d3edbb..454a5bc77 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -51,6 +51,14 @@ private: TEST_CASE(defines); TEST_CASE(defines2); TEST_CASE(defines3); + //TEST_CASE(defines4); + //TEST_CASE(fileListStdin); // Hangs + TEST_CASE(ignorefilepaths1); + TEST_CASE(ignorefilepaths2); + //TEST_CASE(ignorepaths1); + //TEST_CASE(ignorepaths2); + //TEST_CASE(ignorepaths3); + //TEST_CASE(ignorepaths4); TEST_CASE(includesnopath); TEST_CASE(includes); TEST_CASE(includesslash); diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 0bd5bdd32..f74e05997 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -3125,25 +3125,6 @@ private: } - void checkvcl(const char code[]) { - // Clear the error buffer.. - errout.str(""); - - Settings settings; - settings.experimental = true; - - // Tokenize.. - Tokenizer tokenizer(&settings, this); - std::istringstream istr(code); - tokenizer.tokenize(istr, "test.cpp"); - tokenizer.simplifyTokenList(); - - // Check for memory leaks.. - CheckMemoryLeakInFunction checkMemoryLeak(&tokenizer, &settings, this); - checkMemoryLeak.check(); - } - - void class1() { check("class Fred\n" "{\n"