summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-16 23:03:09 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-07-16 23:03:09 -0400
commit44261be416fe0ad973b7be47de9e78874baa1433 (patch)
tree5031bd7ca30c7f8a739d0739a231f78a4e3065fd
parent3e9751f21e4d4410f74f2f656b59fcc58d34cb09 (diff)
downloadpango-test-branch.tar.gz
More verbose outputtest-branch
-rw-r--r--tests/testiter.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/testiter.c b/tests/testiter.c
index a02ce062..9302a107 100644
--- a/tests/testiter.c
+++ b/tests/testiter.c
@@ -118,12 +118,20 @@ iter_char_test (PangoLayout *layout)
if (run)
{
+#ifdef VERBOSE
+ PangoFontDescription *desc = pango_font_describe (run->item->analysis.font);
+ char *str = pango_font_description_to_string (desc);
+#endif
/* Get needed data for the GlyphString */
pango_layout_iter_get_run_extents(iter, NULL, &run_extents);
offset = run->item->offset;
rtl = run->item->analysis.level%2;
- verbose (" (current run: offset=%d,x=%d,len=%d,rtl=%d)\n",
- offset, run_extents.x, run->item->length, rtl);
+ verbose (" (current run: offset=%d,x=%d,len=%d,rtl=%d,font=%s)\n",
+ offset, run_extents.x, run->item->length, rtl, str);
+#ifdef VERBOSE
+ g_free (str);
+ pango_font_description_free (desc);
+#endif
/* Calculate expected x result using index_to_x */
pango_glyph_string_index_to_x (run->glyphs,
@@ -141,8 +149,8 @@ iter_char_test (PangoLayout *layout)
verbose (" (index_to_x ind=%d: expected x=%d, width=%d)\n",
index - offset, x0, x1 - x0);
- g_assert (extents.x == x0);
- g_assert (extents.width == x1 - x0);
+ g_assert_cmpint (extents.x, ==, x0);
+ g_assert_cmpint (extents.width, ==, x1 - x0);
}
else
{