summaryrefslogtreecommitdiff
path: root/tests/test-break.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-05 22:00:21 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-06 14:45:48 -0400
commit4289ac335d05afd72eb8665f9d835382fe3e22e8 (patch)
tree12b3b6f79ba4413c004b6ed0ca91c76ceb4f1805 /tests/test-break.c
parentfcf5189f59098785540ceb751a2db2f8061c6fce (diff)
downloadpango-4289ac335d05afd72eb8665f9d835382fe3e22e8.tar.gz
tests: Check more layout properties
Allow setting more layout properties in test-layout, and check their values after setting them. Also print out directions and cursor positions. Update existing tests, and add more.
Diffstat (limited to 'tests/test-break.c')
-rw-r--r--tests/test-break.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-break.c b/tests/test-break.c
index b906a7e2..319805df 100644
--- a/tests/test-break.c
+++ b/tests/test-break.c
@@ -41,7 +41,9 @@ test_file (const gchar *filename, GString *string)
gsize length;
GError *error = NULL;
PangoLogAttr *attrs;
+ const PangoLogAttr *attrs2;
int len;
+ int len2;
char *p;
int i;
GString *s1, *s2, *s3, *s4;
@@ -84,6 +86,10 @@ test_file (const gchar *filename, GString *string)
}
pango_layout_get_log_attrs (layout, &attrs, &len);
+ attrs2 = pango_layout_get_log_attrs_readonly (layout, &len2);
+
+ g_assert_cmpint (len, ==, len2);
+ g_assert_true (memcmp (attrs, attrs2, sizeof (PangoLogAttr) * len) == 0);
layout2 = pango_layout_copy (layout);
attrs2 = pango_layout_get_log_attrs_readonly (layout2, &len2);