[pango/coretext-font-describe] testS: Test font roundtrips on MacOs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/coretext-font-describe] testS: Test font roundtrips on MacOs
- Date: Mon, 30 Aug 2021 21:06:51 +0000 (UTC)
commit dd5ad9ea4b4f849a057e13ffd0a9ec4f465760a8
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Aug 30 17:05:44 2021 -0400
testS: Test font roundtrips on MacOs
We were skipping the test that would have found
the brokenness in the previous fix. Lets see if
we can get the test working on MacOs.
tests/test-font.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/tests/test-font.c b/tests/test-font.c
index 1d3290c7..c3a1c29f 100644
--- a/tests/test-font.c
+++ b/tests/test-font.c
@@ -258,20 +258,19 @@ test_roundtrip_plain (void)
PangoFont *font;
#ifdef HAVE_CARBON
- /* We probably don't have the right fonts */
- g_test_skip ("Skipping font-dependent tests on OS X");
- return;
+ desc = pango_font_description_from_string ("Helvetica 11");
+#else
+ desc = pango_font_description_from_string ("Cantarell 11");
#endif
fontmap = pango_cairo_font_map_get_default ();
context = pango_font_map_create_context (fontmap);
- desc = pango_font_description_from_string ("Cantarell 11");
font = pango_context_load_font (context, desc);
desc2 = pango_font_describe (font);
- g_assert (pango_font_description_equal (desc2, desc));
+ g_assert_true (pango_font_description_equal (desc2, desc));
pango_font_description_free (desc2);
g_object_unref (font);
@@ -287,12 +286,6 @@ test_roundtrip_emoji (void)
PangoFontDescription *desc, *desc2;
PangoFont *font;
-#ifdef HAVE_CARBON
- /* We probably don't have the right fonts */
- g_test_skip ("Skipping font-dependent tests on OS X");
- return;
-#endif
-
fontmap = pango_cairo_font_map_get_default ();
context = pango_font_map_create_context (fontmap);
@@ -308,7 +301,7 @@ test_roundtrip_emoji (void)
*/
pango_font_description_unset_fields (desc, PANGO_FONT_MASK_FAMILY);
pango_font_description_unset_fields (desc2, PANGO_FONT_MASK_FAMILY);
- g_assert (pango_font_description_equal (desc2, desc));
+ g_assert_true (pango_font_description_equal (desc2, desc));
pango_font_description_free (desc2);
g_object_unref (font);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]