improve cppunit macros (#3025)
This commit is contained in:
parent
4b5aedbbab
commit
e931d609e7
|
@ -5,13 +5,13 @@
|
|||
<define name="CPPUNIT_TEST(test)" value=""/>
|
||||
<define name="CPPUNIT_TEST_SUITE_END()" value=""/>
|
||||
<!-- Macros see http://cppunit.sourceforge.net/doc/cvs/group___assertions.html -->
|
||||
<define name="CPPUNIT_ASSERT(condition)" value="if (!(condition)) throw false;"/>
|
||||
<define name="CPPUNIT_ASSERT_MESSAGE(message, condition)" value="if (!(condition)) throw message;"/>
|
||||
<define name="CPPUNIT_ASSERT(condition)" value="{if (!(condition)) throw false;}"/>
|
||||
<define name="CPPUNIT_ASSERT_MESSAGE(message, condition)" value="{if (!(condition)) throw message;}"/>
|
||||
<define name="CPPUNIT_FAIL(message)" value="throw message;"/>
|
||||
<define name="CPPUNIT_ASSERT_EQUAL(expected, actual)" value="if ((expected) != (actual)) throw false;"/>
|
||||
<define name="CPPUNIT_ASSERT_EQUAL_MESSAGE(message, expected, actual)" value="if ((expected) != (actual)) throw message;"/>
|
||||
<define name="CPPUNIT_ASSERT_DOUBLES_EQUAL(expected, actual, delta)" value="if (std::abs((expected) - (actual)) > delta) throw false;"/>
|
||||
<define name="CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(message, expected, actual, delta)" value="if (std::abs((expected) - (actual)) > delta) throw message;"/>
|
||||
<define name="CPPUNIT_ASSERT_EQUAL(expected, actual)" value="{if ((expected) != (actual)) throw false;}"/>
|
||||
<define name="CPPUNIT_ASSERT_EQUAL_MESSAGE(message, expected, actual)" value="{if ((expected) != (actual)) throw message;}"/>
|
||||
<define name="CPPUNIT_ASSERT_DOUBLES_EQUAL(expected, actual, delta)" value="{if (std::abs((expected) - (actual)) > delta) throw false;}"/>
|
||||
<define name="CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(message, expected, actual, delta)" value="{if (std::abs((expected) - (actual)) > delta) throw message;}"/>
|
||||
<define name="CPPUNIT_ASSERT_THROW(expression, ExceptionType)" value=""/>
|
||||
<define name="CPPUNIT_ASSERT_THROW_MESSAGE(message, expression, ExceptionType)" value=""/>
|
||||
<define name="CPPUNIT_ASSERT_NO_THROW(expression)" value=""/>
|
||||
|
|
Loading…
Reference in New Issue