Boost logo

Boost Users :

From: Duane Murphy (duanemurphy_at_[hidden])
Date: 2003-08-29 11:33:58


--- At Fri, 29 Aug 2003 11:02:51 +0200, Anders Moe wrote:

>Hi again and thanks for your reply.
>
>
>If I understand you correctly you suggest using the ctor/dtor in the
>class-test-case to do the job of build_up/tear_down. I suppose that would be
>equivalent to setup/teardown. This works, ofcourse, because a C++
>programmer can rely on the dtor being executed, unlike the Java finalizer.

Having worked some with CppUnit, I have wondered similarly. It's hard to
judge when a particular "feature" is put in to work around limitations or
differences in the language. When I studied JUnit, I didnt fully grasp
the need for setUp and tearDown. This explaination makes some sense. The
equivalent is simply member variables or something similar in C++.

 ...Duane


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