[pango/pango2: 13/37] Use test font setup for the thread test




commit 42b9203328b1b0d4167088025b39f1a35dcf4582
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 18 12:29:45 2022 -0700

    Use test font setup for the thread test

 tests/meson.build               | 2 +-
 tests/test-pangocairo-threads.c | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index f6c40b37..ec344cc0 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -43,7 +43,7 @@ if cairo_dep.found()
     [ 'test-layout', [ 'test-layout.c', 'test-common.c' ] ],
     [ 'test-fontsets', [ 'test-fontsets.c', 'test-common.c' ] ],
     [ 'testrandom', [ 'testrandom.c' ] ],
-    [ 'test-pangocairo-threads', [ 'test-pangocairo-threads.c' ] ],
+    [ 'test-pangocairo-threads', [ 'test-pangocairo-threads.c', 'test-common.c' ] ],
   ]
 endif
 
diff --git a/tests/test-pangocairo-threads.c b/tests/test-pangocairo-threads.c
index 429e3011..0daa950a 100644
--- a/tests/test-pangocairo-threads.c
+++ b/tests/test-pangocairo-threads.c
@@ -3,6 +3,8 @@
 #include <pango/pango.h>
 #include <pango/pangocairo.h>
 
+#include "test-common.h"
+
 #define WIDTH 100
 #define HEIGHT 100
 const char *text = "Hamburgerfonts\nวิวิวิวิวิวิ\nبهداد";
@@ -55,6 +57,8 @@ thread_func (gpointer data)
   PangoLayout *layout;
   int i;
 
+  install_fonts ();
+
   cairo_t *cr = cairo_create (surface);
 
   layout = create_layout (cr);
@@ -147,6 +151,8 @@ main (int argc, char **argv)
 {
   g_test_init (&argc, &argv, NULL);
 
+  install_fonts ();
+
   if (argc > 1)
     num_threads = atoi (argv[1]);
   if (argc > 2)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]