123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- if(!(_CONDITION_)) { \
- std::stringstream _MSG_; \
- _MSG_<<_STREAMABLE_<<std::endl; \
- CPPUNIT_NS::Asserter::fail(_MSG_.str() , CPPUNIT_SOURCELINE() ); }
- CPPUNIT_ASSERT_MESSAGE("Value is NaN", !NICE::isNaN(b));
- CPPUNIT_ASSERT_MESSAGE("Value is not NaN", NICE::isNaN(b));
- { \
- bool uaieuaieOK = true; \
- if (!isZero(double(a) - double(b), double(c)) || NICE::isNaN(b)) { \
- uaieuaieOK = false; \
- } \
- CPPUNIT_ASSERT_STREAMABLE(uaieuaieOK, \
- "equality assertion failed. " << s << std::endl \
- << "- Expected: " << (a) << std::endl \
- << "- Actual : " << (b) << std::endl); \
- }
- CPPUNIT_ASSERT_DOUBLES_EQUAL_NOT_NAN_STREAMABLE(a,b,c,"")
- CPPUNIT_ASSERT_NOT_NAN((b)); \
- CPPUNIT_ASSERT_DOUBLES_EQUAL((a),(b),fabs(a*c));
- { \
- std::ostringstream str_a, str_b; \
- str_a << a; \
- str_b << b; \
- CPPUNIT_ASSERT_EQUAL(str_a.str(), str_b.str()); \
- }
- CPPUNIT_ASSERT_STREAMABLE(_COND_,_STREAM_)
|