diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-07-08 00:49:56 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-07-08 00:49:56 +0000 |
commit | f3aec778e817f685498e949663c67b72f27e0308 (patch) | |
tree | dba40945c71b083a96f23eaa3665020c11ecf452 /tests/testiter.c | |
parent | cfbf6dc53a61e1665b69149bcc1e003760a49499 (diff) | |
parent | 21a90c02c40889e619c11101442d33ccf6f91e9a (diff) | |
download | pango-f3aec778e817f685498e949663c67b72f27e0308.tar.gz |
Merge branch 'tests-and-fixes' into 'master'
tests: Dump grapheme boundaries too
See merge request GNOME/pango!362
Diffstat (limited to 'tests/testiter.c')
-rw-r--r-- | tests/testiter.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/testiter.c b/tests/testiter.c index 653c4bec..c948c29f 100644 --- a/tests/testiter.c +++ b/tests/testiter.c @@ -278,7 +278,7 @@ test_glyphitem_iter (void) { PangoGlyphItemIter iter; gboolean have_cluster; - + PangoGlyphItemIter *iter2; for (have_cluster = direction ? pango_glyph_item_iter_init_start (&iter, run, text) : @@ -289,9 +289,18 @@ test_glyphitem_iter (void) pango_glyph_item_iter_prev_cluster (&iter)) { verbose ("start index %d end index %d\n", iter.start_index, iter.end_index); - g_assert (iter.start_index < iter.end_index); - g_assert (iter.start_index + 2 >= iter.end_index); - g_assert (iter.start_char + 1 == iter.end_char); + g_assert_true (iter.start_index < iter.end_index); + g_assert_true (iter.start_index + 2 >= iter.end_index); + g_assert_true (iter.start_char + 1 == iter.end_char); + + iter2 = pango_glyph_item_iter_copy (&iter); + g_assert_true (iter2->start_glyph == iter.start_glyph); + g_assert_true (iter2->start_index == iter.start_index); + g_assert_true (iter2->start_char == iter.start_char); + g_assert_true (iter2->end_glyph == iter.end_glyph); + g_assert_true (iter2->end_index == iter.end_index); + g_assert_true (iter2->end_char == iter.end_char); + pango_glyph_item_iter_free (iter2); } } } |