1 if conf.get('HAVE_GLIB', 0) == 0
2 message('You need to have glib support enabled to run test/api tests')
12 'test-collect-unicodes.c',
21 'test-ot-glyphname.c',
22 'test-ot-ligature-carets.c',
27 'test-ot-extents-cff.c',
28 'test-ot-metrics-tt-var.c',
33 'test-subset-drop-tables.c',
37 'test-subset-nameids.c',
55 if conf.get('HAVE_FREETYPE', 0) == 1
56 tests += 'test-ot-math.c'
59 if conf.get('HAVE_FREETYPE', 0) == 1 and conf.get('HAVE_PTHREAD', 0) == 1
60 tests += 'test-multithread.c'
63 # Default test running environment
65 env.set('MALLOC_CHECK_', '2')
66 env.set('G_DEBUG', 'gc-friendly')
67 env.set('G_SLICE', 'always-malloc')
68 env.set('G_TEST_SRCDIR', meson.current_source_dir())
69 env.set('G_TEST_BUILDDIR', meson.current_build_dir())
71 foreach source : tests
72 test_name = source.split('.')[0]
74 link_withs = libharfbuzz
75 if test_name.contains('-subset')
76 link_withs = [libharfbuzz, libharfbuzz_subset]
77 elif test_name == 'test-unicode' and have_icu and not have_icu_builtin
78 link_withs = [libharfbuzz, libharfbuzz_icu]
81 test(test_name, executable(test_name, source,
82 include_directories: [incconfig, incsrc],
84 link_with: link_withs,
86 ), env: env, suite: ['api'] + (test_name.contains('-subset') ? ['subset'] : []))