summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build77
1 files changed, 77 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..ce6d444
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,77 @@
+subdir('dummyatk')
+
+xmlloader = static_library('xmlloader', [ 'atk-object-xml-loader.c' ],
+ dependencies: [ glib_dep, gobject_dep, libxml_dep, atk_dep, dummyatk_dep ],
+ include_directories: [ root_inc, include_directories('.') ])
+xmlloader_dep = declare_dependency(link_with: xmlloader)
+
+testutils = static_library('testutils', [ 'atk_test_util.c' ],
+ dependencies: [ glib_dep, atspi_dep ],
+ include_directories: [ root_inc, include_directories('.') ])
+testutils_dep = declare_dependency(link_with: testutils)
+
+# tests:
+# - name
+# - sources
+# - dependencies
+tests = [
+ [
+ 'atk-test', [
+ 'atk_suite.c',
+ 'atk_test_accessible.c',
+ 'atk_test_action.c',
+ 'atk_test_component.c',
+ 'atk_test_collection.c',
+ 'atk_test_document.c',
+ 'atk_test_editable_text.c',
+ 'atk_test_hyperlink.c',
+ 'atk_test_hypertext.c',
+ 'atk_test_image.c',
+ 'atk_test_selection.c',
+ 'atk_test_state_set.c',
+ 'atk_test_table.c',
+ 'atk_test_table_cell.c',
+ 'atk_test_text.c',
+ 'atk_test_value.c',
+ ],
+ [
+ glib_dep,
+ atspi_dep,
+ xmlloader_dep,
+ testutils_dep,
+ dummyatk_dep,
+ ]
+ ],
+
+ [
+ 'app-test',
+ [
+ 'test-application.c',
+ ],
+ [
+ glib_dep,
+ atk_dep,
+ xmlloader_dep,
+ testutils_dep,
+ dummyatk_dep,
+ libatk_bridge_dep,
+ ]
+ ],
+]
+
+foreach t: tests
+ test_name = t[0]
+ test_sources = t[1]
+ test_deps = t[2]
+
+ test_bin = executable(test_name, test_sources,
+ dependencies: test_deps,
+ include_directories: root_inc,
+ c_args: [
+ '-DTESTS_BUILD_DIR="@0@"'.format(meson.current_build_dir()),
+ '-DTESTS_SRC_DIR="@0@"'.format(meson.current_source_dir()),
+ '-DTESTS_DATA_DIR="@0@"'.format(join_paths(meson.current_source_dir(), 'data')),
+ ])
+
+ test(test_name, test_bin)
+endforeach