CPPUNIT的ASSERT们
#define
CPPUNIT_ASSERT(condition)
Assertions that a condition is true
.
#define
CPPUNIT_ASSERT_MESSAGE(message, condition)
Assertion with a user specified message.
#define
CPPUNIT_FAIL(message)
Fails with the specified message.
#define
CPPUNIT_ASSERT_EQUAL(expected, actual)
Asserts that two values are equals.
#define
CPPUNIT_ASSERT_EQUAL_MESSAGE(message, expected, actual)
Asserts that two values are equals, provides additional messafe on failure.
#define
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected, actual, delta)
Macro for primitive value comparisons.
#define
CPPUNIT_ASSERT_THROW(expression, ExceptionType)
Asserts that the given expression throws an exception of the specified type.
#define
CPPUNIT_ASSERT_NO_THROW(expression)
Asserts that the given expression does not throw any exceptions.
#define
CPPUNIT_ASSERT_ASSERTION_FAIL(assertion) CPPUNIT_ASSERT_THROW( assertion, CPPUNIT_NS::Exception )
Asserts that an assertion fail.
#define
CPPUNIT_ASSERT_ASSERTION_PASS(assertion) CPPUNIT_ASSERT_NO_THROW( assertion )
Asserts that an assertion pass.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步