Consistently use "unsigned" and "%u" in font unit test
Don't mix "size_t" and "unsigned" and don't use "%lu" for printing "size_t" values as this doesn't work under Win64 where sizeof(size_t) is 8 while sizeof(unsigned long) is still just 4.
This commit is contained in:
parent
bc100ff31e
commit
a68cb585cd
@ -242,7 +242,7 @@ void FontTestCase::NativeFontInfo()
|
||||
{
|
||||
unsigned numFonts;
|
||||
const wxFont *pf = GetTestFonts(numFonts);
|
||||
for ( size_t n = 0; n < numFonts; n++ )
|
||||
for ( unsigned n = 0; n < numFonts; n++ )
|
||||
{
|
||||
wxFont test(*pf++);
|
||||
|
||||
@ -254,7 +254,7 @@ void FontTestCase::NativeFontInfo()
|
||||
CPPUNIT_ASSERT( temp.SetNativeFontInfo(nid) );
|
||||
CPPUNIT_ASSERT( temp.IsOk() );
|
||||
WX_ASSERT_MESSAGE(
|
||||
("Test #%lu failed\ndump of test font: \"%s\"\ndump of temp font: \"%s\"", \
|
||||
("Test #%u failed\ndump of test font: \"%s\"\ndump of temp font: \"%s\"", \
|
||||
n, DumpFont(&test), DumpFont(&temp)),
|
||||
temp == test );
|
||||
}
|
||||
@ -296,7 +296,7 @@ void FontTestCase::NativeFontInfoUserDesc()
|
||||
{
|
||||
unsigned numFonts;
|
||||
const wxFont *pf = GetTestFonts(numFonts);
|
||||
for ( size_t n = 0; n < numFonts; n++ )
|
||||
for ( unsigned n = 0; n < numFonts; n++ )
|
||||
{
|
||||
wxFont test(*pf++);
|
||||
|
||||
@ -311,7 +311,7 @@ void FontTestCase::NativeFontInfoUserDesc()
|
||||
#ifdef __WXGTK__
|
||||
// Pango saves/restores all font info in the user-friendly string:
|
||||
WX_ASSERT_MESSAGE(
|
||||
("Test #%lu failed; native info user desc was \"%s\" for test and \"%s\" for temp2", \
|
||||
("Test #%u failed; native info user desc was \"%s\" for test and \"%s\" for temp2", \
|
||||
n, niud, temp2.GetNativeFontInfoUserDesc()),
|
||||
temp2 == test );
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user