diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-07-07 00:09:01 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-07-07 00:09:01 -0400 |
commit | a83a9a76cf42a8fc7ada3d38cf214f0929c00ec8 (patch) | |
tree | 8a8d2412d3dc831de79315de1d70558c6c3aa73a /tests/testiter.c | |
parent | 4ab74a2914b19c5f202c221c391ec64d0254633c (diff) | |
download | pango-a83a9a76cf42a8fc7ada3d38cf214f0929c00ec8.tar.gz |
tests: Add more glyph item iter tests
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); } } } |