[pango/more-test-coverage: 7/8] tests: Compare readonly attrs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/more-test-coverage: 7/8] tests: Compare readonly attrs
- Date: Tue, 6 Jul 2021 05:10:16 +0000 (UTC)
commit 90d967d3299340e30f2f237f305311a45a286784
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jul 6 01:07:11 2021 -0400
tests: Compare readonly attrs
Improves test coverage a little.
tests/test-break.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/tests/test-break.c b/tests/test-break.c
index 51074d80..e8661f26 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;
@@ -83,6 +85,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);
s1 = g_string_new ("Breaks: ");
s2 = g_string_new ("Whitespace: ");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]