+
+ // test Get/SetPointSize()
+
+ test.SetPointSize(30);
+ CPPUNIT_ASSERT( test.IsOk() );
+ CPPUNIT_ASSERT_EQUAL( 30, test.GetPointSize() );
+
+
+ // test Get/SetPixelSize()
+
+ test.SetPixelSize(wxSize(0,30));
+ CPPUNIT_ASSERT( test.IsOk() );
+ CPPUNIT_ASSERT( test.GetPixelSize().GetHeight() <= 30 );
+ // NOTE: the match found by SetPixelSize() may be not 100% precise; it
+ // only grants that a font smaller than the required height will
+ // be selected
+
+
+ // test Get/SetStyle()
+
+ test.SetStyle(wxFONTSTYLE_SLANT);
+ CPPUNIT_ASSERT( test.IsOk() );
+#ifdef __WXMSW__
+ // on wxMSW wxFONTSTYLE_SLANT==wxFONTSTYLE_ITALIC
+ CPPUNIT_ASSERT( wxFONTSTYLE_SLANT == test.GetStyle() ||
+ wxFONTSTYLE_ITALIC == test.GetStyle() );
+#else
+ CPPUNIT_ASSERT_EQUAL( wxFONTSTYLE_SLANT, test.GetStyle() );
+#endif
+
+ // test Get/SetUnderlined()
+
+ test.SetUnderlined(true);
+ CPPUNIT_ASSERT( test.IsOk() );
+ CPPUNIT_ASSERT_EQUAL( true, test.GetUnderlined() );
+
+
+ // test Get/SetWeight()
+
+ test.SetWeight(wxFONTWEIGHT_BOLD);
+ CPPUNIT_ASSERT( test.IsOk() );
+ CPPUNIT_ASSERT_EQUAL( wxFONTWEIGHT_BOLD, test.GetWeight() );
+ }
+}
+
+void FontTestCase::NativeFontInfo()
+{
+ unsigned numFonts;
+ const wxFont *pf = GetTestFonts(numFonts);
+ for ( size_t n = 0; n < numFonts; n++ )
+ {
+ wxFont test(*pf++);
+