Hi,
During the exchange yesterday, it came out that the example code
is using assertImplementation() for no discernable reason.
Here's a quick patch that changes to the cleaner assert() macro.
-S
Index: examples/hierarchy/BoardGameTest.h
===================================================================
RCS file: /cvsroot/cppunit/cppunit/examples/hierarchy/BoardGameTest.h,v
retrieving revision 1.8
diff -u -b -B -r1.8 BoardGameTest.h
--- examples/hierarchy/BoardGameTest.h 2001/05/06 20:04:02 1.8
+++ examples/hierarchy/BoardGameTest.h 2001/05/18 14:23:25
@@ -42,13 +42,13 @@
void testReset ()
{
- assertImplementation (m_game->reset (),"m_game->reset ()",__LINE__,__FILE__);
+ assert( m_game->reset() );
}
void testResetShouldFail ()
{
std::cout << "The following test fails, this is intended:" << std::endl;
- assertImplementation (!m_game->reset (),"!m_game->reset ()",__LINE__,__FILE__);
+ assert( !m_game->reset() );
}
};
--
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants
|