Menu

#1 test_is_equal_stub template method never registers a failure

open
nobody
None
5
2004-02-18
2004-02-18
No

In test_case.h, the test_is_equal_stub template method
never registers a failure, since neither LINUX nor
WIN32 is defined (at least on my system: Debian woody
3.0r2 with g++-2.95).

Excerpting:

template< class T >void test_is_equal_stub( ... )
{
if ( actual == expected )
{
m_last_result.add_success();
}
else
{
#ifdef LINUX
...
m_last_result.add_failure( ... );
#endif // LINUX
#ifdef WIN32
...
m_last_result.add_failure( ... );
#endif // WIN32
}
};

This is a really bad bug for a test runner to have.

I've worked around it by deleting the #ifdefs and just
using the code from the WIN32 case. (The operator<<
reports work just great for me.)

Discussion


Log in to post a comment.