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.
Anders.
"Gennadiy E. Rozental"
Hi all. The boost unit test framework seems to lack the xUnit buildUp/tearDown (whatever) methods meant to faciliate the creation of fixtures. Does that mean there is an alternative idiom to achieve
--- In Boost-Users@yahoogroups.com, "Anders Moe"
wrote: the same effect ? Constructing new class-test-cases for each test seems a bit overkill.
Regards,
Anders.
No. At the moment there is no explicit notion of buildUp and TearDown methods. In in my list of things to consider. I am not sure we really need that. Could you provide an example of what and when should be done inside these function. If you just need a place to initialize set of test cases that share some data, you could at the moment use user test class based test cases. You create and initialize single instanse of test class and test cases are methods of that class. The instance will be shared and destroyed when testing is done.
HTH,
Gennadiy.
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/