+
+ // Pango font description doesn't have 'underlined' and 'strikethrough'
+ // attributes, so wxNativeFontInfo implements these itself. Test if these
+ // are properly preserved by wxNativeFontInfo or its string description.
+ font.SetUnderlined(true);
+ font.SetStrikethrough(true);
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(font));
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(*font.GetNativeFontInfo()));
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(font.GetNativeFontInfoDesc()));
+ font.SetUnderlined(false);
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(font));
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(*font.GetNativeFontInfo()));
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(font.GetNativeFontInfoDesc()));
+ font.SetUnderlined(true);
+ font.SetStrikethrough(false);
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(font));
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(*font.GetNativeFontInfo()));
+ CPPUNIT_ASSERT_EQUAL(font, wxFont(font.GetNativeFontInfoDesc()));
+ // note: the GetNativeFontInfoUserDesc() doesn't preserve all attributes
+ // according to docs, so it is not tested.