Imported Upstream version 8.2.2
[platform/upstream/harfbuzz.git] / test / api / meson.build
index 6951773..64d7797 100644 (file)
@@ -6,6 +6,9 @@ endif
 tests = [
   'test-aat-layout.c',
   'test-baseline.c',
+  'test-base-minmax.c',
+  'test-be-glyph-advance.c',
+  'test-be-num-glyphs.c',
   'test-blob.c',
   'test-buffer.c',
   'test-c.c',
@@ -13,12 +16,19 @@ tests = [
   'test-cplusplus.cc',
   'test-common.c',
   'test-draw.c',
+  'test-extents.c',
   'test-font.c',
+  'test-font-scale.c',
+  'test-glyph-names.c',
+  'test-instance-cff2.c',
   'test-map.c',
   'test-object.c',
+  'test-ot-alternates.c',
+  'test-ot-collect-glyphs.c',
   'test-ot-color.c',
   'test-ot-face.c',
   'test-ot-glyphname.c',
+  'test-ot-layout.c',
   'test-ot-ligature-carets.c',
   'test-ot-name.c',
   'test-ot-meta.c',
@@ -26,8 +36,11 @@ tests = [
   'test-ot-tag.c',
   'test-ot-extents-cff.c',
   'test-ot-metrics-tt-var.c',
+  'test-paint.c',
+  'test-subset-repacker.c',
   'test-set.c',
   'test-shape.c',
+  'test-style.c',
   'test-subset.c',
   'test-subset-cmap.c',
   'test-subset-drop-tables.c',
@@ -53,7 +66,16 @@ tests = [
 ]
 
 if conf.get('HAVE_FREETYPE', 0) == 1
-  tests += 'test-ot-math.c'
+  tests += [
+    'test-ot-math.c',
+    'test-ft.c',
+  ]
+endif
+
+if conf.get('HAVE_CORETEXT', 0) == 1
+  tests += [
+    'test-coretext.c',
+  ]
 endif
 
 if conf.get('HAVE_FREETYPE', 0) == 1 and conf.get('HAVE_PTHREAD', 0) == 1
@@ -69,19 +91,24 @@ env.set('G_TEST_SRCDIR', meson.current_source_dir())
 env.set('G_TEST_BUILDDIR', meson.current_build_dir())
 
 foreach source : tests
+  cpp_args = []
   test_name = source.split('.')[0]
 
-  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]
+  deps = [glib_dep, freetype_dep, thread_dep, libharfbuzz_dep, libharfbuzz_icu_dep]
+  suite = ['api']
+  if test_name.contains('-subset') or test_name.contains('-instance')
+    deps += libharfbuzz_subset_dep
+    suite += 'subset'
+  endif
+
+  if test_name.contains('-instance')
+    cpp_args += '-DHB_EXPERIMENTAL_API'
   endif
 
   test(test_name, executable(test_name, source,
-    include_directories: [incconfig, incsrc],
+    cpp_args:  cpp_args,
+    include_directories: [incconfig],
     dependencies: deps,
-    link_with: link_withs,
     install: false,
-  ), env: env, suite: ['api'] + (test_name.contains('-subset') ? ['subset'] : []))
+  ), env: env, suite: suite)
 endforeach