2020-05-21 03:54:15 +00: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-16 23:28:53 +00:00
|
|
|
|
2020-05-21 03:54:15 +00:00
|
|
|
tests = [
|
|
|
|
'test-aat-layout.c',
|
|
|
|
'test-baseline.c',
|
|
|
|
'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',
|
|
|
|
'test-map.c',
|
|
|
|
'test-object.c',
|
|
|
|
'test-ot-color.c',
|
|
|
|
'test-ot-face.c',
|
|
|
|
'test-ot-glyphname.c',
|
|
|
|
'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',
|
|
|
|
'test-set.c',
|
|
|
|
'test-shape.c',
|
2020-04-21 12:03:50 +00:00
|
|
|
'test-style.c',
|
2020-05-21 03:54:15 +00: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-16 23:28:53 +00:00
|
|
|
|
2020-05-21 03:54:15 +00:00
|
|
|
if conf.get('HAVE_FREETYPE', 0) == 1
|
|
|
|
tests += 'test-ot-math.c'
|
|
|
|
endif
|
2020-03-24 15:02:55 +00:00
|
|
|
|
2020-05-21 03:54:15 +00:00
|
|
|
if conf.get('HAVE_FREETYPE', 0) == 1 and conf.get('HAVE_PTHREAD', 0) == 1
|
|
|
|
tests += 'test-multithread.c'
|
|
|
|
endif
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-05-21 03:54:15 +00: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 16:28:38 +00:00
|
|
|
|
2020-05-21 03:54:15 +00:00
|
|
|
foreach source : tests
|
|
|
|
test_name = source.split('.')[0]
|
2020-04-18 18:22:45 +00:00
|
|
|
|
2020-05-21 03:54:15 +00:00
|
|
|
link_withs = libharfbuzz
|
|
|
|
if test_name.contains('-subset')
|
|
|
|
link_withs = [libharfbuzz, libharfbuzz_subset]
|
|
|
|
elif test_name == 'test-unicode' and have_icu and not have_icu_builtin
|
|
|
|
link_withs = [libharfbuzz, libharfbuzz_icu]
|
|
|
|
endif
|
|
|
|
|
|
|
|
test(test_name, executable(test_name, source,
|
|
|
|
include_directories: [incconfig, incsrc],
|
2020-06-03 21:52:10 +00:00
|
|
|
dependencies: [glib_dep, freetype_dep, thread_dep],
|
2020-05-21 03:54:15 +00:00
|
|
|
link_with: link_withs,
|
|
|
|
install: false,
|
2020-05-30 09:47:56 +00:00
|
|
|
), env: env, suite: ['api'] + (test_name.contains('-subset') ? ['subset'] : []))
|
2020-05-21 03:54:15 +00:00
|
|
|
endforeach
|