When I build a test suite, I need to do something which is only done once in the test suite. I know in NUnit, there is a testFixtureSetUp() method which will do such job. Does cppunit provide similar methods? My cppunit version is 1.12.1. Thanks.
Roger
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are several ways to work around this; you could call a fixture setup method in the SetUp() method depending on a static variable which is then set by this method. In that way this method would only be called once.
However for a Fixture TearDown method I do not know any work arounds - except for using another framework.
Stefan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I build a test suite, I need to do something which is only done once in the test suite. I know in NUnit, there is a testFixtureSetUp() method which will do such job. Does cppunit provide similar methods? My cppunit version is 1.12.1. Thanks.
Roger
No cppunit does not provide this.
There are several ways to work around this; you could call a fixture setup method in the SetUp() method depending on a static variable which is then set by this method. In that way this method would only be called once.
However for a Fixture TearDown method I do not know any work arounds - except for using another framework.
Stefan.