[pango/pango2] Clean up tests
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2] Clean up tests
- Date: Thu, 23 Jun 2022 13:50:02 +0000 (UTC)
commit 23a3090b0a66f9f3fdb27a7379f84caa67b9aeae
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jun 22 23:50:35 2022 -0400
Clean up tests
Most tests don't require cairo apis.
tests/cxx-test.cpp | 2 +-
tests/markup-parse.c | 2 +-
tests/meson.build | 52 +++++++++++++++++++++------------------------------
tests/test-break.c | 2 +-
tests/test-font.c | 4 ----
tests/test-layout.c | 2 +-
tests/testcontext.c | 1 -
tests/testserialize.c | 2 +-
8 files changed, 26 insertions(+), 41 deletions(-)
---
diff --git a/tests/cxx-test.cpp b/tests/cxx-test.cpp
index 7facf1353..ac72a8b3b 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 eda62e97d..3b63ac866 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 ec344cc09..52f39ea11 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 74c8a4c65..cbec698b5 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 637dc3675..9e1ad6480 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 54bfbfeb3..53f2de46c 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 dcf5a2ccb..9c9dcaef8 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 0b8e78248..4317da424 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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]