diff --git a/include/wx/cppunit.h b/include/wx/cppunit.h index 70ccd97784..b44bb92add 100644 --- a/include/wx/cppunit.h +++ b/include/wx/cppunit.h @@ -77,27 +77,6 @@ // Set of helpful test macros. // -// Base macro for wrapping CPPUNIT_TEST macros and so making them conditional -// tests, meaning that the test only get registered and thus run when a given -// runtime condition is true. -// In case the condition is evaluated as false a skip message is logged -// (the message will only be shown in verbose mode). -#define WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, anyTest) \ - if (Condition) \ - { anyTest; } \ - else \ - wxLogInfo(wxString::Format(wxT("skipping: %s.%s\n reason: %s equals false\n"), \ - wxString(suiteName, wxConvUTF8).c_str(), \ - wxString(#testMethod, wxConvUTF8).c_str(), \ - wxString(#Condition, wxConvUTF8).c_str())) - -// Conditional CPPUNIT_TEST macro. -#define WXTEST_WITH_CONDITION(suiteName, Condition, testMethod) \ - WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST(testMethod)) -// Conditional CPPUNIT_TEST_FAIL macro. -#define WXTEST_FAIL_WITH_CONDITION(suiteName, Condition, testMethod) \ - WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST_FAIL(testMethod)) - CPPUNIT_NS_BEGIN // provide an overload of cppunit assertEquals(T, T) which can be used to diff --git a/tests/streams/zlibstream.cpp b/tests/streams/zlibstream.cpp index 186e463f22..d11f1809d3 100644 --- a/tests/streams/zlibstream.cpp +++ b/tests/streams/zlibstream.cpp @@ -29,9 +29,6 @@ using std::string; -#define WXTEST_WITH_GZIP_CONDITION(testMethod) \ - WXTEST_WITH_CONDITION( COMPOSE_TEST_NAME(zlibStream), wxZlibInputStream::CanHandleGZip() && wxZlibOutputStream::CanHandleGZip(), testMethod ) - #define DATABUFFER_SIZE 1024 static const wxString FILENAME_GZ = wxT("zlibtest.gz"); @@ -76,16 +73,16 @@ public: CPPUNIT_TEST(TestStream_ZLib_NoComp); CPPUNIT_TEST(TestStream_ZLib_SpeedComp); CPPUNIT_TEST(TestStream_ZLib_BestComp); - WXTEST_WITH_GZIP_CONDITION(TestStream_GZip_Default); - WXTEST_WITH_GZIP_CONDITION(TestStream_GZip_NoComp); - WXTEST_WITH_GZIP_CONDITION(TestStream_GZip_SpeedComp); - WXTEST_WITH_GZIP_CONDITION(TestStream_GZip_BestComp); - WXTEST_WITH_GZIP_CONDITION(TestStream_GZip_Dictionary); - WXTEST_WITH_GZIP_CONDITION(TestStream_ZLibGZip); + CPPUNIT_TEST(TestStream_GZip_Default); + CPPUNIT_TEST(TestStream_GZip_NoComp); + CPPUNIT_TEST(TestStream_GZip_SpeedComp); + CPPUNIT_TEST(TestStream_GZip_BestComp); + CPPUNIT_TEST(TestStream_GZip_Dictionary); + CPPUNIT_TEST(TestStream_ZLibGZip); CPPUNIT_TEST(Decompress_BadData); CPPUNIT_TEST(Decompress_wx251_zlib114_Data_NoHeader); CPPUNIT_TEST(Decompress_wx251_zlib114_Data_ZLib); - WXTEST_WITH_GZIP_CONDITION(Decompress_gzip135Data); + CPPUNIT_TEST(Decompress_gzip135Data); CPPUNIT_TEST_SUITE_END(); protected: