1 --- misc/cppunit-1.14.0/include/cppunit/TestAssert.h
2 +++ misc/build/cppunit-1.14.0/include/cppunit/TestAssert.h
9 +# define ANALYSIS_ASSUME(condition) __analysis_assume(condition)
11 +# define ANALYSIS_ASSUME(condition) static_cast<void>(0)
14 /* A set of macros which allow us to get the line number
15 * and file name at the point of an error.
16 * Just goes to show that preprocessors do have some
20 #define CPPUNIT_ASSERT(condition) \
21 - ( CPPUNIT_NS::Asserter::failIf( !(condition), \
22 + do { ( CPPUNIT_NS::Asserter::failIf( !(condition), \
23 CPPUNIT_NS::Message( "assertion failed", \
24 "Expression: " #condition), \
25 - CPPUNIT_SOURCELINE() ) )
26 + CPPUNIT_SOURCELINE() ) ); \
27 + ANALYSIS_ASSUME(condition); } while(0)
29 #define CPPUNIT_ASSERT(condition) \
30 - ( CPPUNIT_NS::Asserter::failIf( !(condition), \
31 + do { ( CPPUNIT_NS::Asserter::failIf( !(condition), \
32 CPPUNIT_NS::Message( "assertion failed" ), \
33 - CPPUNIT_SOURCELINE() ) )
34 + CPPUNIT_SOURCELINE() ) ); \
35 + ANALYSIS_ASSUME(condition); } while(0)
38 /** Assertion with a user specified message.
40 * \param condition If this condition evaluates to \c false then the
43 -#define CPPUNIT_ASSERT_MESSAGE(message,condition) \
44 - ( CPPUNIT_NS::Asserter::failIf( !(condition), \
45 - CPPUNIT_NS::Message( "assertion failed", \
48 - CPPUNIT_NS::message_to_string(message) ), \
49 - CPPUNIT_SOURCELINE() ) )
50 +#define CPPUNIT_ASSERT_MESSAGE(message,condition) \
51 + do { ( CPPUNIT_NS::Asserter::failIf( !(condition), \
52 + CPPUNIT_NS::Message( "assertion failed", \
55 + CPPUNIT_NS::message_to_string(message) ), \
56 + CPPUNIT_SOURCELINE() ) ); \
57 + ANALYSIS_ASSUME(condition); } while(0)
59 /** Fails with the specified message.