///////////////////////////////////////////////////////////////////// // ATest.cpp - abstract base class for self testing classes // #include "ATest.h" #ifdef TEST_ATEST #include class Foo { public: void doFoo() { std::cout << "\n doing Foo"; } }; class Tester : public ATest { bool test() { return true; } }; int main() { Tester tester; tester.testPackage(); Foo foo; tester.safeInvoke(foo, &Foo::doFoo); } #endif