----- Original Message -----
From: "Michel Armin" <Arm...@si...>
To: "'Baptiste Lepilleur'" <gai...@fr...>
Sent: Thursday, July 11, 2002 9:22 AM
Subject: RE: [Cppunit-devel] REQUEST: throw user-defined errors in setUp()
and tearDown()
> Is there a reason why we do not support assertion in setUp() and
tearDown()?
> The code could be easily modified to support this.
No, just never got around doing it.
>
> IMHO the general question is, what should be done in setUp() and
tearDown()
> respectively. Personally, I use them to provide everything that is common
to
> all test methods in a class. This also includes setting up a particular
As far as I know, that is the whole purpose of those methods.
> state of my (product code) environment that is a precondition for all the
> tests in a testcase class. And of course, this will lead to code that
might
> fail (for whatever reason). Therefore I like the idea of being able to
have
> asserts in the setUp() and tearDown() methods, because these would lead to
a
> more precise error/failure message, why the test-methods couldn't be
> executed successfully. And locating bugs in our programs is the primary
goal
> of this project, isn't it?
You can still use assertion, you just won't get the failure detail (at the
current time).
Baptiste.
|