On 27.04.2017 09:42, Stephan Bergmann wrote:
>> CPPUNIT_ASSERT( aBitmapEx.GetAlpha() );
>
> and the condition is of type AlphaMask that has an overloaded operator !
> -- but no conversion to bool, which is probably a design bug of its own.)
well it's a design bug of C++, allowing and
In include/cppunit/TestAssert.h, CPPUNIT_ASSERT is effectively defined as
#define CPPUNIT_ASSERT(condition) CppUnit::Asserter::failIf(!(condition), ...)
So if the expression 'condition' is such that an overloaded operator !
applies, then that will be used instead of the expected(?) built-in