Boost logo

Boost Users :

From: Anders Moe (yg-boost-users_at_[hidden])
Date: 2003-09-01 08:51:13


On Mon, 1 Sep 2003 07:27:28 -0600 (MDT), Dave Gomboc <dave_at_[hidden]>
wrote:

> On Mon, 1 Sep 2003, Anders Moe wrote:
>
>> Having given some thought to this during the weekend I have also
>> realized a significant difference between ctor/dtor and setup/teardown,
>> as was posted in another subthread of this thread, namely this :
>>
>> 1) the ctor(s) is called at test _setup_ time, while the setup(s) is
>> called at test _runtime_
>> 2) the dtor(s) is called at test suite exit time, while the teardown(s)
>> is called, again, at test runtime.
>
> I may just be missing something, I've been up all night :-), but it's not
> obvious to me why one cannot accomplish setup/teardown by appropriate use
> of RAII. Could someone post a concrete example?
>
If you mean RAII in each test method that is somewhat laborious and error
prone - the nice
thing about overloading setup/teardown is that the framework does the
calling. If you mean the ctor/dtor version of setup/teardown I was hoping
my previous post would provide
some arguments.

Anders.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net