2020-05-21 05:54:15 +02:00
|
|
|
if conf.get('HAVE_GLIB', 0) == 0
|
|
|
|
message('You need to have glib support enabled to run test/api tests')
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2018-05-17 01:28:53 +02:00
|
|
|
|
2020-05-21 05:54:15 +02:00
|
|
|
tests = [
|
|
|
|
'test-aat-layout.c',
|
|
|
|
'test-baseline.c',
|
2022-02-14 22:02:31 +01:00
|
|
|
'test-be-glyph-advance.c',
|
2022-02-02 21:10:16 +01:00
|
|
|
'test-be-num-glyphs.c',
|
2020-05-21 05:54:15 +02:00
|
|
|
'test-blob.c',
|
|
|
|
'test-buffer.c',
|
|
|
|
'test-c.c',
|
|
|
|
'test-collect-unicodes.c',
|
|
|
|
'test-cplusplus.cc',
|
|
|
|
'test-common.c',
|
|
|
|
'test-draw.c',
|
|
|
|
'test-font.c',
|
2021-11-02 00:57:11 +01:00
|
|
|
'test-font-scale.c',
|
2020-05-21 05:54:15 +02:00
|
|
|
'test-map.c',
|
|
|
|
'test-object.c',
|
2020-06-17 03:05:16 +02:00
|
|
|
'test-ot-alternates.c',
|
2021-08-02 16:10:13 +02:00
|
|
|
'test-ot-collect-glyphs.c',
|
2020-05-21 05:54:15 +02:00
|
|
|
'test-ot-color.c',
|
|
|
|
'test-ot-face.c',
|
|
|
|
'test-ot-glyphname.c',
|
2021-08-11 22:54:30 +02:00
|
|
|
'test-ot-layout.c',
|
2020-05-21 05:54:15 +02:00
|
|
|
'test-ot-ligature-carets.c',
|
|
|
|
'test-ot-name.c',
|
|
|
|
'test-ot-meta.c',
|
|
|
|
'test-ot-metrics.c',
|
|
|
|
'test-ot-tag.c',
|
|
|
|
'test-ot-extents-cff.c',
|
|
|
|
'test-ot-metrics-tt-var.c',
|
2022-12-23 20:03:03 +01:00
|
|
|
'test-paint.c',
|
2022-02-02 19:30:34 +01:00
|
|
|
'test-subset-repacker.c',
|
2020-05-21 05:54:15 +02:00
|
|
|
'test-set.c',
|
|
|
|
'test-shape.c',
|
2020-04-21 14:03:50 +02:00
|
|
|
'test-style.c',
|
2020-05-21 05:54:15 +02:00
|
|
|
'test-subset.c',
|
|
|
|
'test-subset-cmap.c',
|
|
|
|
'test-subset-drop-tables.c',
|
|
|
|
'test-subset-glyf.c',
|
|
|
|
'test-subset-hdmx.c',
|
|
|
|
'test-subset-hmtx.c',
|
|
|
|
'test-subset-nameids.c',
|
|
|
|
'test-subset-os2.c',
|
|
|
|
'test-subset-post.c',
|
|
|
|
'test-subset-vmtx.c',
|
|
|
|
'test-subset-cff1.c',
|
|
|
|
'test-subset-cff2.c',
|
|
|
|
'test-subset-gvar.c',
|
|
|
|
'test-subset-hvar.c',
|
|
|
|
'test-subset-vvar.c',
|
|
|
|
'test-subset-sbix.c',
|
|
|
|
'test-subset-gpos.c',
|
|
|
|
'test-subset-colr.c',
|
|
|
|
'test-subset-cbdt.c',
|
|
|
|
'test-unicode.c',
|
|
|
|
'test-var-coords.c',
|
|
|
|
'test-version.c',
|
|
|
|
]
|
2018-05-17 01:28:53 +02:00
|
|
|
|
2020-05-21 05:54:15 +02:00
|
|
|
if conf.get('HAVE_FREETYPE', 0) == 1
|
2022-06-29 13:31:46 +02:00
|
|
|
tests += [
|
|
|
|
'test-ot-math.c',
|
|
|
|
'test-ft.c',
|
|
|
|
]
|
2020-05-21 05:54:15 +02:00
|
|
|
endif
|
2020-03-24 16:02:55 +01:00
|
|
|
|
2022-06-29 13:32:58 +02:00
|
|
|
if conf.get('HAVE_CORETEXT', 0) == 1
|
|
|
|
tests += [
|
|
|
|
'test-coretext.c',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2020-05-21 05:54:15 +02:00
|
|
|
if conf.get('HAVE_FREETYPE', 0) == 1 and conf.get('HAVE_PTHREAD', 0) == 1
|
|
|
|
tests += 'test-multithread.c'
|
|
|
|
endif
|
2018-05-17 01:28:53 +02:00
|
|
|
|
2020-05-21 05:54:15 +02:00
|
|
|
# Default test running environment
|
|
|
|
env = environment()
|
|
|
|
env.set('MALLOC_CHECK_', '2')
|
|
|
|
env.set('G_DEBUG', 'gc-friendly')
|
|
|
|
env.set('G_SLICE', 'always-malloc')
|
|
|
|
env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
|
|
|
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
2020-03-24 17:28:38 +01:00
|
|
|
|
2020-05-21 05:54:15 +02:00
|
|
|
foreach source : tests
|
|
|
|
test_name = source.split('.')[0]
|
2020-04-18 20:22:45 +02:00
|
|
|
|
2020-07-06 15:58:31 +02:00
|
|
|
deps = [glib_dep, freetype_dep, thread_dep, libharfbuzz_dep, libharfbuzz_icu_dep]
|
|
|
|
suite = ['api']
|
2020-05-21 05:54:15 +02:00
|
|
|
if test_name.contains('-subset')
|
2020-07-06 15:58:31 +02:00
|
|
|
deps += libharfbuzz_subset_dep
|
|
|
|
suite += 'subset'
|
2020-05-21 05:54:15 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
test(test_name, executable(test_name, source,
|
2020-07-06 15:58:31 +02:00
|
|
|
include_directories: [incconfig],
|
|
|
|
dependencies: deps,
|
2020-05-21 05:54:15 +02:00
|
|
|
install: false,
|
2020-07-06 15:58:31 +02:00
|
|
|
), env: env, suite: suite)
|
2020-05-21 05:54:15 +02:00
|
|
|
endforeach
|