testsuite: remove function todoAssert() which is unused according to cppcheck.
This commit is contained in:
parent
d9ce61a9d6
commit
4f918e1c8c
|
@ -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) {
|
||||
|
|
|
@ -72,7 +72,6 @@ public:
|
|||
|
||||
#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)
|
||||
|
|
Loading…
Reference in New Issue