29 Aug
2003
29 Aug
'03
4:33 p.m.
--- 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