RE: [Cppunit-devel] REQUEST: throw user-defined errors in setUp() and tearDown()
Brought to you by:
blep
From: Pedro F. <ped...@in...> - 2002-07-12 09:51:23
|
> -----Original Message----- > From: cpp...@li...=20 > [mailto:cpp...@li...] On Behalf=20 > Of Michel Armin > Sent: quinta-feira, 11 de Julho de 2002 8:23 > To: cpp...@li... > Subject: RE: [Cppunit-devel] REQUEST: throw user-defined=20 > errors in setUp() and tearDown() >=20 >=20 > Is there a reason why we do not support assertion in setUp()=20 > and tearDown()? The code could be easily modified to support this. >=20 > IMHO the general question is, what should be done in setUp()=20 > and tearDown() respectively. Personally, I use them to=20 > provide everything that is common to all test methods in a=20 > class. This also includes setting up a particular state of my=20 > (product code) environment that is a precondition for all the=20 > tests in a testcase class. And of course, this will lead to=20 > code that might fail (for whatever reason). Therefore I like=20 > the idea of being able to have asserts in the setUp() and=20 > tearDown() methods, because these would lead to a more=20 > precise error/failure message, why the test-methods couldn't=20 > be executed successfully. And locating bugs in our programs=20 > is the primary goal of this project, isn't it? >=20 > Any other opinions? Agreed. Cheers, Pedro _______________________________________________________ Pedro Alves Ferreira INESC Porto Campus da FEUP Tel: +351 22 209 42 52 Rua Dr. Roberto Frias, n=BA 378 Fax: +351 22 208 41 72 4200-465 PORTO http://www.inescporto.pt Portugal mailto:ped...@in... |