diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-09-30 13:45:33 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-09-30 13:45:33 +0000 |
| commit | c4d97b4d586fdae21a02aff7a02605ffd487b188 (patch) | |
| tree | 7da0ea8ed3bc5d751974f13f1d253d72726a3df3 /include/cppunit/extensions | |
| parent | 2478fb88dfc5c0e1673d094b4cbd3a7fdf21b95b (diff) | |
| download | cppunit-c4d97b4d586fdae21a02aff7a02605ffd487b188.tar.gz | |
Contrib/msvc/CppUnit.
contrib/msvc/CppUnit.WWTpl: added, template for WorkSpace Whiz! to
create new classes and unit tests.
* doc/FAQ:
* INSTALL-WIN32.txt: moved FAQ from install-WIN32 to that file. Added
a generic question to hint at the helper macros.
* include/cppunit/extensions/HelperMacros.h: bug #464844, moved
declaration of ThisTestCaseFactory from CPPUNIT_TEST_SUITE_END to
CPPUNIT_TEST_SUITE where the Fixture class name is available from
the macro parameter.
Diffstat (limited to 'include/cppunit/extensions')
| -rw-r--r-- | include/cppunit/extensions/HelperMacros.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/cppunit/extensions/HelperMacros.h b/include/cppunit/extensions/HelperMacros.h index fa38f12..ee3274b 100644 --- a/include/cppunit/extensions/HelperMacros.h +++ b/include/cppunit/extensions/HelperMacros.h @@ -101,6 +101,13 @@ #define CPPUNIT_TEST_SUITE( ATestCaseType ) \ private: \ typedef ATestCaseType __ThisTestCaseType; \ + class ThisTestCaseFactory : public CppUnit::TestFactory \ + { \ + virtual CppUnit::Test *makeTest() \ + { \ + return new ATestCaseType(); \ + } \ + }; \ public: \ static void \ registerTests( CppUnit::TestSuite *suite, \ @@ -175,14 +182,8 @@ __ThisTestCaseType::registerTests( builder.suite(), &factory ); \ return builder.takeSuite(); \ } \ - private: \ - class ThisTestCaseFactory : public CppUnit::TestFactory \ - { \ - virtual CppUnit::Test *makeTest() \ - { \ - return new __ThisTestCaseType(); \ - } \ - } + private: /* dummy typedef so that the macro can still end with ';'*/ \ + typedef ThisTestCaseFactory __ThisTestCaseFactory #define __CPPUNIT_CONCATENATE_DIRECT( s1, s2 ) s1##s2 #define __CPPUNIT_CONCATENATE( s1, s2 ) __CPPUNIT_CONCATENATE_DIRECT( s1, s2 ) |
