diff --git a/test/testbool.cpp b/test/testbool.cpp index 2e832a6cb..b427d9b02 100644 --- a/test/testbool.cpp +++ b/test/testbool.cpp @@ -56,6 +56,7 @@ private: TEST_CASE(checkComparisonOfFuncReturningBool4); TEST_CASE(checkComparisonOfFuncReturningBool5); TEST_CASE(checkComparisonOfFuncReturningBool6); + TEST_CASE(checkComparisonOfBoolWithBool); // Converting pointer addition result to bool TEST_CASE(pointerArithBool1); diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index d3ad863d4..4f36dbd72 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -602,13 +602,13 @@ private: TODO_ASSERT_EQUALS(true, false, defParser.ParseFromArgs(4, argv)); } - void fileListStdin() { +/* void fileListStdin() { // TODO: Give it some stdin to read from, fails because the list of // files in stdin (_pathnames) is empty REDIRECT; const char *argv[] = {"cppcheck", "--file-list=-", "file.cpp"}; TODO_ASSERT_EQUALS(true, false, defParser.ParseFromArgs(3, argv)); - } + } */ void inlineSuppr() { REDIRECT; @@ -925,7 +925,7 @@ private: ASSERT_EQUALS(false, parser.ParseFromArgs(2, argv)); ASSERT_EQUALS(0, parser.GetIgnoredPaths().size()); } - +/* void ignorepaths1() { REDIRECT; const char *argv[] = {"cppcheck", "-isrc", "file.cpp"}; @@ -981,7 +981,7 @@ private: ASSERT_EQUALS(1, parser.GetIgnoredPaths().size()); ASSERT_EQUALS("src/foo.cpp", parser.GetIgnoredPaths()[0]); } - +*/ void checkconfig() { REDIRECT; const char *argv[] = {"cppcheck", "--check-config", "file.cpp"}; diff --git a/test/testsuite.cpp b/test/testsuite.cpp index 86337cf7c..3769adee8 100644 --- a/test/testsuite.cpp +++ b/test/testsuite.cpp @@ -122,20 +122,6 @@ void TestFixture::assert_(const char *filename, unsigned int linenr, bool condit } } -void TestFixture::todoAssert(const char *filename, unsigned int linenr, bool condition) const -{ - if (condition) { - if (gcc_style_errors) { - errmsg << filename << ':' << linenr << ": Assertion succeeded unexpectedly." << std::endl; - } else { - errmsg << "Assertion succeeded unexpectedly in " << filename << " at line " << linenr << std::endl; - } - ++succeeded_todos_counter; - } else { - ++todos_counter; - } -} - void TestFixture::assertEquals(const char *filename, unsigned int linenr, const std::string &expected, const std::string &actual, const std::string &msg) const { if (expected != actual) { @@ -220,15 +206,6 @@ void TestFixture::assertThrowFail(const char *filename, unsigned int linenr) con } } -void TestFixture::printTests() -{ - const std::list &tests = TestRegistry::theInstance().tests(); - - for (std::list::const_iterator it = tests.begin(); it != tests.end(); ++it) { - std::cout << (*it)->classname << std::endl; - } -} - void TestFixture::run(const std::string &str) { testToRun = str; diff --git a/test/testsuite.h b/test/testsuite.h index b6e44090d..5a089e6fe 100644 --- a/test/testsuite.h +++ b/test/testsuite.h @@ -67,13 +67,11 @@ public: TestFixture(const std::string &_name); virtual ~TestFixture() { } - static void printTests(); static std::size_t runTests(const options& args); }; #define TEST_CASE( NAME ) if ( runTest(#NAME) ) { currentTest = classname + "::" + #NAME; if (quiet_tests) { REDIRECT; NAME(); } else { NAME ();} } #define ASSERT( CONDITION ) assert_(__FILE__, __LINE__, CONDITION) -#define TODO_ASSERT( CONDITION ) todoAssert(__FILE__, __LINE__, CONDITION) #define ASSERT_EQUALS( EXPECTED , ACTUAL ) assertEquals(__FILE__, __LINE__, EXPECTED, ACTUAL) #define ASSERT_EQUALS_DOUBLE( EXPECTED , ACTUAL ) assertEqualsDouble(__FILE__, __LINE__, EXPECTED, ACTUAL) #define ASSERT_EQUALS_MSG( EXPECTED , ACTUAL, MSG ) assertEquals(__FILE__, __LINE__, EXPECTED, ACTUAL, MSG) diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 5167aa2b8..fef686b15 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -194,6 +194,7 @@ private: TEST_CASE(symboldatabase29); // ticket #4442 (segmentation fault) TEST_CASE(symboldatabase30); TEST_CASE(symboldatabase31); + TEST_CASE(symboldatabase32); TEST_CASE(symboldatabase33); // ticket #4682 (false negatives) TEST_CASE(symboldatabase34); // ticket #4694 (segmentation fault) TEST_CASE(symboldatabase35); // ticket #4806 (segmentation fault)