It appears CppUnit is instantiating a new TestFixture instance for each test method at run time. I was hoping to be able to run setUp() once for all test methods, as in one of my cases it takes an hour of computation to construct the test fixture.
Right now I resort to class static variables (for holding the objects that took long to construct). But it doesn't look pretty.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-10-18
I also needed to do some setup for all tests in my testfixture derived class, so I used the constructor.
HTH,
Joe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It appears CppUnit is instantiating a new TestFixture instance for each test method at run time. I was hoping to be able to run setUp() once for all test methods, as in one of my cases it takes an hour of computation to construct the test fixture.
Right now I resort to class static variables (for holding the objects that took long to construct). But it doesn't look pretty.
I also needed to do some setup for all tests in my testfixture derived class, so I used the constructor.
HTH,
Joe