From: Vadim Zeitlin Date: Sat, 4 Apr 2009 16:02:23 +0000 (+0000) Subject: fix VsnprintfTestCase::P() for mingw32 which may use MSVC CRT (closes #10679) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3879212eeea0078543086a28304d7eb5c98deae0 fix VsnprintfTestCase::P() for mingw32 which may use MSVC CRT (closes #10679) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/tests/strings/vsnprintf.cpp b/tests/strings/vsnprintf.cpp index 5f9a60796c..da30bb377f 100644 --- a/tests/strings/vsnprintf.cpp +++ b/tests/strings/vsnprintf.cpp @@ -235,7 +235,8 @@ void VsnprintfTestCase::P() // printed as '(nil)'. // MSVC always print them as %8X on 32 bit systems and as %16X // on 64 bit systems -#ifdef __VISUALC__ + // mingw32 uses MSVC CRT by default so uses the same rules +#if defined(__VISUALC__) || (defined(__MINGW32__) && !__USE_MINGW_ANSI_STDIO) #if SIZEOF_VOID_P == 4 CMP3("00ABCDEF", "%p", (void*)0xABCDEF); CMP3("00000000", "%p", (void*)NULL); @@ -243,6 +244,9 @@ void VsnprintfTestCase::P() CMP3("0000ABCDEFABCDEF", "%p", (void*)0xABCDEFABCDEF); CMP3("0000000000000000", "%p", (void*)NULL); #endif +#elif defined(__MINGW32__) + CMP3("0xabcdef", "%p", (void*)0xABCDEF); + CMP3("0", "%p", (void*)NULL); #elif defined(__GNUG__) CMP3("0xabcdef", "%p", (void*)0xABCDEF); CMP3("(nil)", "%p", (void*)NULL);