X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f1389d464a7570563c4037610e18bcffb96e50fa..59a944cb633f57f427fd16f0a8e65b15edf6dc1e:/samples/console/console.cpp diff --git a/samples/console/console.cpp b/samples/console/console.cpp index d63263979a..3b8ce77f15 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -2186,6 +2186,21 @@ static void TestLongLongPrint() wxPrintf(_T("-0x1234567887654321 = %s\n"), ll.ToString().c_str()); } +static void TestLongLongPrintf() +{ + wxPuts(_T("*** Testing wxLongLong printing ***\n")); + +#ifdef wxLongLongFmtSpec + wxLongLong ll = wxLL(0x1234567890abcdef); + wxString s = wxString::Format(_T("%") wxLongLongFmtSpec _T("x"), + ll.GetValue()); + wxPrintf(_T("0x1234567890abcdef -> %s (%s)\n"), + s.c_str(), s == _T("1234567890abcdef") ? _T("ok") : _T("ERROR")); +#else // !wxLongLongFmtSpec + #error "wxLongLongFmtSpec not defined for this compiler/platform" +#endif +} + #undef MAKE_LL #undef RAND_LL @@ -3156,7 +3171,7 @@ static void TestFtpWuFtpd() } else { - size_t size = in->StreamSize(); + size_t size = in->GetSize(); wxPrintf(_T("Reading file %s (%u bytes)..."), filename, size); wxChar *data = new wxChar[size]; @@ -3239,7 +3254,7 @@ static void TestFtpDownload() } else { - size_t size = in->StreamSize(); + size_t size = in->GetSize(); wxPrintf(_T("Reading file %s (%u bytes)..."), filename, size); fflush(stdout);