[pango/asan-fixes: 2/4] tests: Make test-layout work standalone
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/asan-fixes: 2/4] tests: Make test-layout work standalone
- Date: Sat, 12 Sep 2020 18:03:01 +0000 (UTC)
commit a08172ea05b1ef3dbdfd3a35b66b802ee56a7473
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Sep 12 13:35:50 2020 -0400
tests: Make test-layout work standalone
This broke when I recently reshuffled things.
tests/test-layout.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 58ab46eb..2cbdc042 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -238,6 +238,9 @@ test_file (const gchar *filename, GString *string)
PangoWrapMode wrap = PANGO_WRAP_WORD;
PangoFontDescription *desc;
+ if (context == NULL)
+ context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
+
g_file_get_contents (filename, &contents, &length, &error);
g_assert_no_error (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]