I'm not really sure how to use the TestSetUp class or any decorator. Does anybody have a real-life example with a newer version of CppUnit that he/she could share, please?
For example I want to pass some CLI parameters to my test via a TestSetUp sub-class. Of course I can make a TestSetUp sub-class and pass these parameters to it but then there is no generic mechanism to pass this on the the Test sub-class.
m_test in TestSetUp is a pointer to Test so I have to kind of use dynamic_cast to get a pointer on my specific Test sub-class. This would be necessary because I would have to add a specific setter method to that test class to pass something. The setUp() method does not get a parameter.
Thanks, Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm not really sure how to use the TestSetUp class or any decorator. Does anybody have a real-life example with a newer version of CppUnit that he/she could share, please?
For example I want to pass some CLI parameters to my test via a TestSetUp sub-class. Of course I can make a TestSetUp sub-class and pass these parameters to it but then there is no generic mechanism to pass this on the the Test sub-class.
m_test in TestSetUp is a pointer to Test so I have to kind of use dynamic_cast to get a pointer on my specific Test sub-class. This would be necessary because I would have to add a specific setter method to that test class to pass something. The setUp() method does not get a parameter.
Thanks, Peter