Is there an existing implementation inside the CppUnit for traversing all the tests in a suite?
The TestSuite class seems to implement the Composite pattern, and I would be happy if there was a corresponding Visitor interface to enable the traversal. However, Visitor is not easily extensible to new subclasses of Test, so there may be a better option.
I looked at TreeHierarchyDialog, and it uses RTTI, which in my opinion is not the most elegant solution to the problem. Does anyone have a better view?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there an existing implementation inside the CppUnit for traversing all the tests in a suite?
The TestSuite class seems to implement the Composite pattern, and I would be happy if there was a corresponding Visitor interface to enable the traversal. However, Visitor is not easily extensible to new subclasses of Test, so there may be a better option.
I looked at TreeHierarchyDialog, and it uses RTTI, which in my opinion is not the most elegant solution to the problem. Does anyone have a better view?