23 Jul
2008
23 Jul
'08
5:23 p.m.
Bruce Trask
Hi,
Does the boost test framework provide facilities out of the box for the Abstract Test Pattern? http://c2.com/cgi/wiki?AbstractTest
Not sure I follow 100%, but I do not see a need for any direct support per say. If you are testing some kind of class hierarchy you can do something like: void test_base_API( Base const& base ) { // do tests against Base interface } BOOST_AUTO_TEST_CASE( test_concrete_class_1 ) { ConcreteClass1 obj(...); test_base_API( obj ); // tests specific to ConcreteTest1 // ... } BOOST_AUTO_TEST_CASE( test_concrete_class_2 ) { ConcreteClass2 obj(...); test_base_API( obj ); // tests specific to ConcreteTest2 // ... } Gennadiy