diff options
| author | Bastiaan Bakker <bastiaan.bakker@lifeline.nl> | 2001-04-29 13:09:16 +0000 |
|---|---|---|
| committer | Bastiaan Bakker <bastiaan.bakker@lifeline.nl> | 2001-04-29 13:09:16 +0000 |
| commit | b08ecaecc1e39b7b01e02b7b73559d8b34ff46a5 (patch) | |
| tree | bf1ed1e3680cb0256e73336e22fb70c692524fcb /include/cppunit/TestCaller.h | |
| parent | 5ce1a68589aa3ea4f9ee255cfecc94cc1730c6fa (diff) | |
| download | cppunit-b08ecaecc1e39b7b01e02b7b73559d8b34ff46a5.tar.gz | |
Merged Baptiste Lepilleurs CppUnitW 1.2.
Some differences:
TypeInfo stuff (in TestSuite) compiled in only if USE_TYPEINFO is set.
TestSuite.getTests now returns a const ref instead of taking a ref as param.
Removed auto_ptr stuff from TestFactoryRegistry: auto_ptr cannot be used in
containers.
Diffstat (limited to 'include/cppunit/TestCaller.h')
| -rw-r--r-- | include/cppunit/TestCaller.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/cppunit/TestCaller.h b/include/cppunit/TestCaller.h index 617ad56..ece31fa 100644 --- a/include/cppunit/TestCaller.h +++ b/include/cppunit/TestCaller.h @@ -87,6 +87,17 @@ namespace CppUnit { }; + /** Returns a TestCaller for the specified method. + * \param name Name for the TestCaller. + * \param testMethod Method called by the TestCaller. + * \return TestCaller for the specified method. + */ + template<class Fixture> + Test *makeTestCaller( std::string name, void (Fixture::*testMethod)() ) + { + return new TestCaller<Fixture>( name, testMethod ); + } + } // namespace CppUnit #endif // CPPUNIT_TESTCALLER_H |
