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:
@@ -242,7 +242,7 @@ void FontTestCase::NativeFontInfo()
|
|||||||
{
|
{
|
||||||
unsigned numFonts;
|
unsigned numFonts;
|
||||||
const wxFont *pf = GetTestFonts(numFonts);
|
const wxFont *pf = GetTestFonts(numFonts);
|
||||||
for ( size_t n = 0; n < numFonts; n++ )
|
for ( unsigned n = 0; n < numFonts; n++ )
|
||||||
{
|
{
|
||||||
wxFont test(*pf++);
|
wxFont test(*pf++);
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@ void FontTestCase::NativeFontInfo()
|
|||||||
CPPUNIT_ASSERT( temp.SetNativeFontInfo(nid) );
|
CPPUNIT_ASSERT( temp.SetNativeFontInfo(nid) );
|
||||||
CPPUNIT_ASSERT( temp.IsOk() );
|
CPPUNIT_ASSERT( temp.IsOk() );
|
||||||
WX_ASSERT_MESSAGE(
|
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)),
|
n, DumpFont(&test), DumpFont(&temp)),
|
||||||
temp == test );
|
temp == test );
|
||||||
}
|
}
|
||||||
@@ -296,7 +296,7 @@ void FontTestCase::NativeFontInfoUserDesc()
|
|||||||
{
|
{
|
||||||
unsigned numFonts;
|
unsigned numFonts;
|
||||||
const wxFont *pf = GetTestFonts(numFonts);
|
const wxFont *pf = GetTestFonts(numFonts);
|
||||||
for ( size_t n = 0; n < numFonts; n++ )
|
for ( unsigned n = 0; n < numFonts; n++ )
|
||||||
{
|
{
|
||||||
wxFont test(*pf++);
|
wxFont test(*pf++);
|
||||||
|
|
||||||
@@ -311,7 +311,7 @@ void FontTestCase::NativeFontInfoUserDesc()
|
|||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
// Pango saves/restores all font info in the user-friendly string:
|
// Pango saves/restores all font info in the user-friendly string:
|
||||||
WX_ASSERT_MESSAGE(
|
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()),
|
n, niud, temp2.GetNativeFontInfoUserDesc()),
|
||||||
temp2 == test );
|
temp2 == test );
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user