2018-05-17 01:28:53 +02:00
|
|
|
tests = [
|
2018-11-14 23:25:41 +01:00
|
|
|
['test-baseline.c'],
|
2018-05-17 01:28:53 +02:00
|
|
|
['test-blob.c'],
|
|
|
|
['test-buffer.c'],
|
2018-11-14 23:25:41 +01:00
|
|
|
['test-c.c'],
|
|
|
|
['test-collect-unicodes.c'],
|
2018-05-17 01:28:53 +02:00
|
|
|
['test-common.c'],
|
2018-11-14 23:25:41 +01:00
|
|
|
['test-cplusplus.cc'],
|
2018-05-17 01:28:53 +02:00
|
|
|
['test-font.c'],
|
2018-11-14 23:25:41 +01:00
|
|
|
['test-map.c'],
|
2018-05-17 01:28:53 +02:00
|
|
|
['test-object.c'],
|
2018-11-14 23:25:41 +01:00
|
|
|
['test-ot-color.c'],
|
|
|
|
['test-ot-face.c'],
|
|
|
|
['test-ot-ligature-carets.c'],
|
|
|
|
['test-ot-name.c'],
|
|
|
|
['test-ot-tag.c'],
|
2018-05-17 01:28:53 +02:00
|
|
|
['test-set.c'],
|
|
|
|
['test-shape.c'],
|
|
|
|
['test-subset.c'],
|
|
|
|
['test-subset-cmap.c'],
|
|
|
|
['test-subset-glyf.c'],
|
|
|
|
['test-subset-hdmx.c'],
|
|
|
|
['test-subset-hmtx.c'],
|
|
|
|
['test-subset-os2.c'],
|
|
|
|
['test-subset-post.c'],
|
|
|
|
['test-subset-vmtx.c'],
|
|
|
|
['test-unicode.c'],
|
|
|
|
['test-version.c'],
|
|
|
|
]
|
|
|
|
|
|
|
|
if conf.get('HAVE_FREETYPE', 0) == 1
|
|
|
|
tests += [['test-ot-math.c']]
|
|
|
|
endif
|
|
|
|
|
2018-11-14 23:25:41 +01: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
|
|
|
if conf.get('HAVE_GLIB', 0) == 1
|
|
|
|
env = environment()
|
|
|
|
env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
|
|
|
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
|
|
|
|
|
|
|
foreach test_data : tests
|
|
|
|
fname = test_data[0]
|
|
|
|
opts = test_data.length() > 1 ? test_data[1] : {}
|
|
|
|
extra_c_args = opts.get('c_args', [])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test_name = fname.split('.')[0].underscorify()
|
|
|
|
exe = executable(test_name, fname,
|
|
|
|
cpp_args: cpp_args + extra_c_args,
|
2018-11-14 21:19:36 +01:00
|
|
|
include_directories: [incconfig, incsrc],
|
2018-05-17 01:28:53 +02:00
|
|
|
dependencies: deps,
|
|
|
|
link_with: [libharfbuzz, libharfbuzz_subset],
|
|
|
|
)
|
|
|
|
|
|
|
|
test(test_name, exe,
|
|
|
|
env: env)
|
|
|
|
endforeach
|
|
|
|
endif
|