summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-04-17 19:37:23 +0200
committerTimm Bäder <mail@baedert.org>2020-06-08 19:34:34 +0200
commitcc3d06b60c507ee1c75cd9c3677377cd30df0e44 (patch)
tree39e327b0197f506c79e92cb993f306f8c734e375 /tests
parentea6248f5195bcfb1f11a20c7edb5fae6ab85e64d (diff)
downloadpango-cc3d06b60c507ee1c75cd9c3677377cd30df0e44.tar.gz
testattributes: Test iter on empty attr list
Diffstat (limited to 'tests')
-rw-r--r--tests/testattributes.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/testattributes.c b/tests/testattributes.c
index eaca6663..6b5e849b 100644
--- a/tests/testattributes.c
+++ b/tests/testattributes.c
@@ -358,6 +358,15 @@ test_iter (void)
PangoAttrIterator *copy;
gint start, end;
+ /* Empty list */
+ list = pango_attr_list_new ();
+ iter = pango_attr_list_get_iterator (list);
+
+ g_assert_false (pango_attr_iterator_next (iter));
+ g_assert_null (pango_attr_iterator_get_attrs (iter));
+ pango_attr_iterator_destroy (iter);
+ pango_attr_list_unref (list);
+
list = pango_attr_list_new ();
attr = pango_attr_size_new (10);
pango_attr_list_insert (list, attr);