]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/misc/settings.cpp
Setting eol-style property to CRLF for some project files.
[wxWidgets.git] / tests / misc / settings.cpp
index c87e8310ccdaa040ba80aaf55ce748adf9614d5d..0c01100932df36027636af012eca1c6f6df4c043 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "wx/settings.h"
 #include "wx/fontenum.h"
+#include "wx/brush.h"
+#include "wx/pen.h"
 
 // ----------------------------------------------------------------------------
 // test class
@@ -104,7 +106,7 @@ void SettingsTestCase::GlobalColours()
 
 void SettingsTestCase::GlobalFonts()
 {
-    wxFont font[] =
+    const wxFont font[] =
     {
         *wxNORMAL_FONT,
         *wxSMALL_FONT,
@@ -113,8 +115,13 @@ void SettingsTestCase::GlobalFonts()
     };
 
     for (unsigned int i=0; i < WXSIZEOF(font); i++)
-        CPPUNIT_ASSERT( font[i].IsOk() && 
-                        wxFontEnumerator::IsValidFacename(font[i].GetFaceName()) );
+    {
+        CPPUNIT_ASSERT( font[i].IsOk() );
+
+        const wxString facename = font[i].GetFaceName();
+        if ( !facename.empty() )
+            CPPUNIT_ASSERT( wxFontEnumerator::IsValidFacename(facename) );
+    }
 }
 
 void SettingsTestCase::GlobalBrushes()