[pango/pango2: 274/301] Use test font setup for the thread test
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 274/301] Use test font setup for the thread test
- Date: Wed, 22 Jun 2022 15:53:43 +0000 (UTC)
commit f177f534910942d55cf4994eb5b8bc890db5a0e9
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 f6c40b376..ec344cc09 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 429e3011b..0daa950a9 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]