Re: [Cppunit-devel] toString() v.s. getName()
Brought to you by:
blep
From: Steve M. R. <ste...@vi...> - 2001-07-14 06:15:26
|
On Tue, Jul 10, 2001 at 05:25:51PM +0200, Baptiste Lepilleur wrote: > toString() and getName() have very different semantic. > > * getName(): give me the name of that test so I can identify it. > > * toString(): dump this object as a string so I can diagnose the problem (why > is not equal to that other one) without running the debugger. > > So, I would exterminate toString() from CppUnit, with the exception of > assertion_traits. OK, now I have found one place where the real name of the test is required, and not just the "diagnostic string". In TextTestRunner, there are findTestByName() and runTestByName() methods. Presumably, one doesn't want to resort to searching for "footest (suite)". Perhaps it is best to retain both getName() and toString(). -S -- 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 |