Re: [Cppunit-devel] toString() v.s. getName()
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2001-07-10 15:25:57
|
Quoting "Steve M. Robbins" <ste...@vi...>: > Hi, > > With respect to the toString/getName controversy: I realized yesterday > that the "assertion_traits" class also has a toString() method. In > this case one is converting an arbitrary type T to a string > representation, so "toString()" fits better than "getName()". > > I'm starting to wonder whether it is better to eliminate getName() > on the Test classes, and stick with toString() universally. Or, > we could go ahead with the initial plan, and leave assertion_traits > to be an exception. > > I'm leaning towards the first option. > Thoughts? 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. Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Language: English, French |