X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7315ad282deb20baf442db235048f3efc4e93e1e..4f2511d706e5274a34e1521e11c1b95fed735b42:/tests/strings/vsnprintf.cpp?ds=inline diff --git a/tests/strings/vsnprintf.cpp b/tests/strings/vsnprintf.cpp index 0d404d685e..015480e869 100644 --- a/tests/strings/vsnprintf.cpp +++ b/tests/strings/vsnprintf.cpp @@ -19,6 +19,10 @@ #pragma hdrstop #endif +#include "wx/crt.h" + +#if wxUSE_WXVSNPRINTF + #ifndef WX_PRECOMP #include "wx/wx.h" #include "wx/wxchar.h" @@ -376,7 +380,7 @@ void VsnprintfTestCase::LongLong() #ifdef __WXMSW__ CMP3("123456789", "%I64d", (wxLongLong_t)123456789); - CMP3("123456789abcdef", "%I64x", (wxLongLong_t)0x123456789abcdef); + CMP3("123456789abcdef", "%I64x", wxLL(0x123456789abcdef)); #endif } #endif @@ -463,18 +467,22 @@ void VsnprintfTestCase::WrongFormatStrings() void VsnprintfTestCase::BigToSmallBuffer() { + // VC6 can't compile this code +#if !defined(__VISUALC__) || (__VISUALC__ >= 1310) +#if wxUSE_UNICODE wchar_t bufw[1024], bufw2[16], bufw3[4], bufw4; - char bufa[1024], bufa2[16], bufa3[4], bufa4; - Misc(bufw, 1024); Misc(bufw2, 16); Misc(bufw3, 4); Misc(&bufw4, 1); +#endif // wxUSE_UNICODE + char bufa[1024], bufa2[16], bufa3[4], bufa4; Misc(bufa, 1024); Misc(bufa2, 16); Misc(bufa3, 4); Misc(&bufa4, 1); +#endif // !VC6 } void VsnprintfTestCase::DoMisc( @@ -545,3 +553,5 @@ void VsnprintfTestCase::Miscellaneous() DoMisc(5, wxT("%%%%%"), 6, wxT("%%%%%%%%%%")); DoMisc(6, wxT("%%%%12"), 7, wxT("%%%%%%%%%d"), 12); } + +#endif // wxUSE_WXVSNPRINTF