diff --git a/include/wx/catch_cppunit.h b/include/wx/catch_cppunit.h index f9472b8446..22ebcf12f9 100644 --- a/include/wx/catch_cppunit.h +++ b/include/wx/catch_cppunit.h @@ -202,22 +202,24 @@ inline std::string wxGetCurrentTestName() public: \ void runTest() wxOVERRIDE \ { \ - struct EatNextSemicolon + using namespace wxPrivate; \ + TempStringAssign setClass(wxTheCurrentTestClass, #testclass) -#define CPPUNIT_TEST(testname) \ - SECTION(#testname) \ - { \ - setUp(); \ - try \ - { \ - testname(); \ - } \ - catch ( ... ) \ - { \ - tearDown(); \ - throw; \ - } \ - tearDown(); \ +#define CPPUNIT_TEST(testname) \ + SECTION(#testname) \ + { \ + TempStringAssign setMethod(wxTheCurrentTestMethod, #testname); \ + setUp(); \ + try \ + { \ + testname(); \ + } \ + catch ( ... ) \ + { \ + tearDown(); \ + throw; \ + } \ + tearDown(); \ } #define CPPUNIT_TEST_SUITE_END() \