summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-06-22 23:50:35 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-07-04 11:17:21 -0400
commita35b2bbe29c477cc53d6ccd3b8b69dcb4b43ffb2 (patch)
tree0b4737ea22fb797c801744389f6be2dbae22e330
parentfd012e5f1f66c7e527b02aadca8bcd8025bc48ba (diff)
downloadpango-a35b2bbe29c477cc53d6ccd3b8b69dcb4b43ffb2.tar.gz
Clean up tests
Most tests don't require cairo apis.
-rw-r--r--tests/cxx-test.cpp2
-rw-r--r--tests/markup-parse.c2
-rw-r--r--tests/meson.build52
-rw-r--r--tests/test-break.c2
-rw-r--r--tests/test-font.c4
-rw-r--r--tests/test-layout.c2
-rw-r--r--tests/testcontext.c1
-rw-r--r--tests/testserialize.c2
8 files changed, 26 insertions, 41 deletions
diff --git a/tests/cxx-test.cpp b/tests/cxx-test.cpp
index 7facf135..ac72a8b3 100644
--- a/tests/cxx-test.cpp
+++ b/tests/cxx-test.cpp
@@ -4,7 +4,7 @@
#include <pango/pango.h>
-#ifdef HAVE_CAIRO
+#if PANGO_RENDERING_CAIRO
#include <pango/pangocairo.h>
#endif
diff --git a/tests/markup-parse.c b/tests/markup-parse.c
index eda62e97..3b63ac86 100644
--- a/tests/markup-parse.c
+++ b/tests/markup-parse.c
@@ -30,7 +30,7 @@
#include <locale.h>
-#include <pango/pangocairo.h>
+#include <pango/pango.h>
#include "test-common.h"
static void
diff --git a/tests/meson.build b/tests/meson.build
index ec344cc0..52f39ea1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,13 +1,3 @@
-test_cflags = [
- '-DSRCDIR=@0@'.format(meson.current_source_dir()),
-]
-
-if host_system == 'windows'
- test_cflags += '-DHAVE_WIN32'
-elif host_system == 'darwin'
- test_cflags += '-DHAVE_CARBON'
-endif
-
test_env = environment()
test_env.set('srcdir', meson.current_source_dir())
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
@@ -22,28 +12,28 @@ tests = [
[ 'testlanguage' ],
[ 'testmatrix' ],
[ 'testtabs' ],
+ [ 'test-bidi' ],
+ [ 'testcontext' ],
+ [ 'testiter' ],
+ [ 'test-ellipsize' ],
+ [ 'markup-parse' ],
+ [ 'test-itemize' ],
+ [ 'test-font' ],
+ [ 'testattributes' ],
+ [ 'cxx-test', [ 'cxx-test.cpp' ] ],
+ [ 'test-harfbuzz' ],
+ [ 'test-break', [ 'test-break.c', 'test-common.c', 'validate-log-attrs.c' ] ],
+ [ 'testserialize' ],
+ [ 'testhbfont' ],
+ [ 'test-layout' ],
+ [ 'test-fontsets' ],
+ [ 'testrandom' ],
]
if cairo_dep.found()
tests += [
- [ 'test-bidi', [ 'test-bidi.c' ] ],
- [ 'testcontext', [ 'testcontext.c' ] ],
- [ 'testiter', [ 'testiter.c' ] ],
- [ 'test-ellipsize', [ 'test-ellipsize.c' ] ],
- [ 'markup-parse', [ 'markup-parse.c' , 'test-common.c' ] ],
- [ 'test-itemize', [ 'test-itemize.c', 'test-common.c' ] ],
- [ 'test-font', [ 'test-font.c', 'test-common.c' ] ],
- [ 'testattributes', [ 'testattributes.c', 'test-common.c' ] ],
- [ 'cxx-test', [ 'cxx-test.cpp' ] ],
- [ 'test-harfbuzz', [ 'test-harfbuzz.c' ] ],
- [ 'test-break', [ 'test-break.c', 'test-common.c', 'validate-log-attrs.c' ] ],
- [ 'testmisc', [ 'testmisc.c' ] ],
- [ 'testserialize', [ 'testserialize.c', 'test-common.c' ] ],
- [ 'testhbfont', [ 'testhbfont.c' ] ],
- [ '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-common.c' ] ],
+ [ 'testmisc' ],
+ [ 'test-pangocairo-threads' ],
]
endif
@@ -242,7 +232,7 @@ custom_target('all-unicode',
foreach t: tests
name = t[0]
- src = t.get(1, [ '@0@.c'.format(name) ])
+ src = t.get(1, [ '@0@.c'.format(name), 'test-common.c' ])
deps = t.get(2, [ libpango_dep ])
custom_target(name + '.test',
@@ -259,8 +249,8 @@ foreach t: tests
bin = executable(name, src,
dependencies: deps + [ libpango_dep ],
include_directories: root_inc,
- c_args: common_cflags + pango_debug_cflags + test_cflags,
- cpp_args: common_cppflags + pango_debug_cflags + test_cflags,
+ c_args: common_cflags + pango_debug_cflags,
+ cpp_args: common_cppflags + pango_debug_cflags,
install: get_option('install-tests'),
install_dir: installed_test_bindir)
diff --git a/tests/test-break.c b/tests/test-break.c
index 74c8a4c6..cbec698b 100644
--- a/tests/test-break.c
+++ b/tests/test-break.c
@@ -28,7 +28,7 @@
#endif
#include "config.h"
-#include <pango/pangocairo.h>
+#include <pango/pango.h>
#include "test-common.h"
#include "validate-log-attrs.h"
diff --git a/tests/test-font.c b/tests/test-font.c
index 637dc367..9e1ad648 100644
--- a/tests/test-font.c
+++ b/tests/test-font.c
@@ -290,11 +290,7 @@ test_roundtrip_plain (void)
PangoFontDescription *desc, *desc2, *desc3;
PangoFont *font, *font2;
-#ifdef HAVE_CARBON
- desc = pango_font_description_from_string ("Helvetica 11");
-#else
desc = pango_font_description_from_string ("Cantarell 11");
-#endif
context = pango_context_new ();
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 54bfbfeb..53f2de46 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -27,7 +27,7 @@
#include <unistd.h>
#endif
-#include <pango/pangocairo.h>
+#include <pango/pango.h>
#include "test-common.h"
#include <hb-ot.h>
diff --git a/tests/testcontext.c b/tests/testcontext.c
index dcf5a2cc..9c9dcaef 100644
--- a/tests/testcontext.c
+++ b/tests/testcontext.c
@@ -21,7 +21,6 @@
#include <glib.h>
#include <pango/pango.h>
-#include <pango/pangocairo.h>
static void
test_set_language (void)
diff --git a/tests/testserialize.c b/tests/testserialize.c
index 0b8e7824..4317da42 100644
--- a/tests/testserialize.c
+++ b/tests/testserialize.c
@@ -21,7 +21,7 @@
#include "config.h"
#include <glib.h>
-#include <pango/pangocairo.h>
+#include <pango/pango.h>
#include <gio/gio.h>
#include "test-common.h"