From 89ff7e9fb1783b5229bdb18ecd097c38d6e9e62d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 Oct 2010 17:15:04 +0000 Subject: [PATCH] Remove redundant wxUSE_WXVSNPRINTF checks from the unit test. The entire VsnprintfTestCase is only used when using our own wxUSE_WXVSNPRINTF so remove the redundant tests for it inside the enclosing #if. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/strings/vsnprintf.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/strings/vsnprintf.cpp b/tests/strings/vsnprintf.cpp index 59e5ea60ab..48a297e8f4 100644 --- a/tests/strings/vsnprintf.cpp +++ b/tests/strings/vsnprintf.cpp @@ -139,9 +139,7 @@ private: #endif CPPUNIT_TEST( BigToSmallBuffer ); -#if wxUSE_WXVSNPRINTF CPPUNIT_TEST( WrongFormatStrings ); -#endif // wxUSE_WXVSNPRINTF CPPUNIT_TEST( Miscellaneous ); CPPUNIT_TEST( GlibcMisc1 ); CPPUNIT_TEST( GlibcMisc2 ); @@ -168,9 +166,7 @@ private: void DoBigToSmallBuffer(T *buffer, int size); void BigToSmallBuffer(); -#if wxUSE_WXVSNPRINTF void WrongFormatStrings(); -#endif // wxUSE_WXVSNPRINTF // compares the expectedString and the result of wxVsnprintf() char by char // for all its lenght (not only for first expectedLen chars) and also @@ -424,12 +420,6 @@ void VsnprintfTestCase::LongLong() } #endif -// this test is only for our own implementation, the system implementation -// doesn't always give errors for invalid format strings (e.g. glibc doesn't) -// and as it's not required too (the behaviour is "undefined" according to the -// spec), there is really no sense in testing for it -#if wxUSE_WXVSNPRINTF - void VsnprintfTestCase::WrongFormatStrings() { // test how wxVsnprintf() behaves with wrong format string: @@ -456,8 +446,6 @@ void VsnprintfTestCase::WrongFormatStrings() CPPUNIT_ASSERT_EQUAL(-1, r); } -#endif // wxUSE_WXVSNPRINTF - // BigToSmallBuffer() test case helper: template void VsnprintfTestCase::DoBigToSmallBuffer(T *buffer, int size) -- 2.45.2