summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5e6f681)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17117
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int wxSprintf( wxChar *str, const wxChar *format, ... );
#endif
int wxSprintf( wxChar *str, const wxChar *format, ... );
#endif
+#include "wx/longlong.h"
+
#include <float.h>
static void rfg1 (void);
#include <float.h>
static void rfg1 (void);
static void TestPrintf()
{
static wxChar shortstr[] = _T("Hi, Z.");
static void TestPrintf()
{
static wxChar shortstr[] = _T("Hi, Z.");
- static wxChar longstr[] = "Good morning, Doctor Chandra. This is Hal. \
-I am ready for my first lesson today.";
+ static wxChar longstr[] = _T("Good morning, Doctor Chandra. This is Hal. \
+I am ready for my first lesson today.");
int result = 0;
fmtchk(_T("%.4x"));
int result = 0;
fmtchk(_T("%.4x"));
wxPuts (result != 0 ? _T("Test failed!") : _T("Test ok."));
}
wxPuts (result != 0 ? _T("Test failed!") : _T("Test ok."));
}
- wxSprintf (buf, _T("%07Lo"), 040000000000ll);
- wxPrintf (_T("sprintf (buf, \"%%07Lo\", 040000000000ll) = %s"), buf);
+ wxSprintf (buf, _T("%07Lo"), (wxLongLong_t)040000000000);
+ wxPrintf (_T("sprintf (buf, \"%%07Lo\", 040000000000ll) = %s"), buf);
- if (wxStrcmp (buf, _T("40000000000")) != 0)
+ if (wxStrcmp (buf, _T("40000000000")) != 0)
- result = 1;
- wxPuts (_T("\tFAILED"));
+ result = 1;
+ wxPuts (_T("\tFAILED"));
wxPrintf (_T("printf (\"%%hhu\", %u) = %hhu\n"), UCHAR_MAX + 2, UCHAR_MAX + 2);
wxPrintf (_T("printf (\"%%hu\", %u) = %hu\n"), USHRT_MAX + 2, USHRT_MAX + 2);
wxPrintf (_T("printf (\"%%hhu\", %u) = %hhu\n"), UCHAR_MAX + 2, UCHAR_MAX + 2);
wxPrintf (_T("printf (\"%%hu\", %u) = %hu\n"), USHRT_MAX + 2, USHRT_MAX + 2);