X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9e994615409e36d441135e4fa0761cf0398a2aa..3c01c5951189e13b8b4a5d7b288b54d4a57a30f8:/tests/fontmap/fontmaptest.cpp diff --git a/tests/fontmap/fontmaptest.cpp b/tests/fontmap/fontmaptest.cpp index b267f0d04e..05607a901c 100644 --- a/tests/fontmap/fontmaptest.cpp +++ b/tests/fontmap/fontmaptest.cpp @@ -5,13 +5,14 @@ // Created: 14.02.04 // RCS-ID: $Id$ // Copyright: (c) 2003 TT-Solutions +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- -#include "wx/wxprec.h" +#include "testprec.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -25,8 +26,6 @@ #include "wx/fontmap.h" -#include "wx/cppunit.h" - // ---------------------------------------------------------------------------- // test class // ---------------------------------------------------------------------------- @@ -93,7 +92,7 @@ void FontMapperTestCase::NamesAndDesc() static const wxChar *descriptions[] = { - // some vali charsets + // some valid charsets _T("Default encoding" ), _T("Western European (ISO-8859-1)" ), _T("Indian (ISO-8859-12)" ), @@ -109,11 +108,12 @@ void FontMapperTestCase::NamesAndDesc() _T("Unknown encoding (-1)" ), }; + wxFontMapperBase& fmap = *wxFontMapperBase::Get(); for ( size_t n = 0; n < WXSIZEOF(charsets); n++ ) { - wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(charsets[n]); - CPPUNIT_ASSERT( wxFontMapper::Get()->GetEncodingName(enc) == names[n] ); - CPPUNIT_ASSERT( wxFontMapper::Get()->GetEncodingDescription(enc) == descriptions[n] ); + wxFontEncoding enc = fmap.CharsetToEncoding(charsets[n]); + CPPUNIT_ASSERT_EQUAL( names[n], fmap.GetEncodingName(enc).Lower() ); + CPPUNIT_ASSERT_EQUAL( descriptions[n], fmap.GetEncodingDescription(enc) ); } }