From 718881a027eea8479b94d4376196eeca9b884ea8 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Tue, 26 Nov 2024 17:46:59 +0100 Subject: [PATCH] chore(core): rename test files This change rename the test files for Core according to the discussion at the Keyman conference in November 2024. --- .../{action_api.cpp => action_api.tests.cpp} | 0 ...n_set_api.cpp => action_set_api.tests.cpp} | 0 ..._get_api.cpp => actions_get_api.tests.cpp} | 0 ...malize.cpp => actions_normalize.tests.cpp} | 0 ...{context_api.cpp => context_api.tests.cpp} | 0 .../{debug_api.cpp => debug_api.tests.cpp} | 0 ...eyboard_api.cpp => keyboard_api.tests.cpp} | 0 ..._kmx_context.cpp => kmx_context.tests.cpp} | 0 ..._kmx_xstring.cpp => kmx_xstring.tests.cpp} | 0 core/tests/unit/kmnkbd/meson.build | 24 ++++++++--------- ...{options_api.cpp => options_api.tests.cpp} | 0 .../{state_api.cpp => state_api.tests.cpp} | 0 ...xt_api.cpp => state_context_api.tests.cpp} | 0 ...event.cpp => kmx_external_event.tests.cpp} | 0 .../kmx/{kmx_imx.cpp => kmx_imx.tests.cpp} | 0 ...mx_key_list.cpp => kmx_key_list.tests.cpp} | 0 core/tests/unit/kmx/meson.build | 6 ++--- ...on.cpp => context_normalization.tests.cpp} | 0 ...e_ldml_min.cpp => core_ldml_min.tests.cpp} | 0 .../{test_kmx_plus.cpp => kmx_plus.tests.cpp} | 0 core/tests/unit/ldml/meson.build | 26 +++++++++---------- ...st_transforms.cpp => transforms.tests.cpp} | 0 .../{test_unicode.cpp => unicode.tests.cpp} | 0 core/tests/unit/utftest/meson.build | 2 +- .../{utftest.cpp => utftest.tests.cpp} | 0 25 files changed, 29 insertions(+), 29 deletions(-) rename core/tests/unit/kmnkbd/{action_api.cpp => action_api.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{action_set_api.cpp => action_set_api.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{test_actions_get_api.cpp => actions_get_api.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{test_actions_normalize.cpp => actions_normalize.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{context_api.cpp => context_api.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{debug_api.cpp => debug_api.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{keyboard_api.cpp => keyboard_api.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{test_kmx_context.cpp => kmx_context.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{test_kmx_xstring.cpp => kmx_xstring.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{options_api.cpp => options_api.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{state_api.cpp => state_api.tests.cpp} (100%) rename core/tests/unit/kmnkbd/{state_context_api.cpp => state_context_api.tests.cpp} (100%) rename core/tests/unit/kmx/{kmx_external_event.cpp => kmx_external_event.tests.cpp} (100%) rename core/tests/unit/kmx/{kmx_imx.cpp => kmx_imx.tests.cpp} (100%) rename core/tests/unit/kmx/{kmx_key_list.cpp => kmx_key_list.tests.cpp} (100%) rename core/tests/unit/ldml/{test_context_normalization.cpp => context_normalization.tests.cpp} (100%) rename core/tests/unit/ldml/{core_ldml_min.cpp => core_ldml_min.tests.cpp} (100%) rename core/tests/unit/ldml/{test_kmx_plus.cpp => kmx_plus.tests.cpp} (100%) rename core/tests/unit/ldml/{test_transforms.cpp => transforms.tests.cpp} (100%) rename core/tests/unit/ldml/{test_unicode.cpp => unicode.tests.cpp} (100%) rename core/tests/unit/utftest/{utftest.cpp => utftest.tests.cpp} (100%) diff --git a/core/tests/unit/kmnkbd/action_api.cpp b/core/tests/unit/kmnkbd/action_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/action_api.cpp rename to core/tests/unit/kmnkbd/action_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/action_set_api.cpp b/core/tests/unit/kmnkbd/action_set_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/action_set_api.cpp rename to core/tests/unit/kmnkbd/action_set_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/test_actions_get_api.cpp b/core/tests/unit/kmnkbd/actions_get_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/test_actions_get_api.cpp rename to core/tests/unit/kmnkbd/actions_get_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/test_actions_normalize.cpp b/core/tests/unit/kmnkbd/actions_normalize.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/test_actions_normalize.cpp rename to core/tests/unit/kmnkbd/actions_normalize.tests.cpp diff --git a/core/tests/unit/kmnkbd/context_api.cpp b/core/tests/unit/kmnkbd/context_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/context_api.cpp rename to core/tests/unit/kmnkbd/context_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/debug_api.cpp b/core/tests/unit/kmnkbd/debug_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/debug_api.cpp rename to core/tests/unit/kmnkbd/debug_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/keyboard_api.cpp b/core/tests/unit/kmnkbd/keyboard_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/keyboard_api.cpp rename to core/tests/unit/kmnkbd/keyboard_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/test_kmx_context.cpp b/core/tests/unit/kmnkbd/kmx_context.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/test_kmx_context.cpp rename to core/tests/unit/kmnkbd/kmx_context.tests.cpp diff --git a/core/tests/unit/kmnkbd/test_kmx_xstring.cpp b/core/tests/unit/kmnkbd/kmx_xstring.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/test_kmx_xstring.cpp rename to core/tests/unit/kmnkbd/kmx_xstring.tests.cpp diff --git a/core/tests/unit/kmnkbd/meson.build b/core/tests/unit/kmnkbd/meson.build index 7285b9bf117..c108ae5b83d 100644 --- a/core/tests/unit/kmnkbd/meson.build +++ b/core/tests/unit/kmnkbd/meson.build @@ -16,18 +16,18 @@ endif local_defns = ['-DKM_CORE_LIBRARY_STATIC'] tests = [ - ['action-api', 'action_api.cpp'], - ['action-set-api', 'action_set_api.cpp'], - ['context-api', 'context_api.cpp'], - ['keyboard-api', 'keyboard_api.cpp'], - ['options-api', 'options_api.cpp'], - ['state-api', 'state_api.cpp'], - ['state-context-api', 'state_context_api.cpp'], - ['debug-api', 'debug_api.cpp'], - ['kmx_xstring', 'test_kmx_xstring.cpp'], - ['kmx_context', 'test_kmx_context.cpp'], - ['test_actions_normalize', 'test_actions_normalize.cpp'], - ['test_actions_get_api', 'test_actions_get_api.cpp'], + ['action-api-tests', 'action_api.tests.cpp'], + ['action-set-api-tests', 'action_set_api.tests.cpp'], + ['context-api-tests', 'context_api.tests.cpp'], + ['keyboard-api-tests', 'keyboard_api.tests.cpp'], + ['options-api-tests', 'options_api.tests.cpp'], + ['state-api-tests', 'state_api.tests.cpp'], + ['state-context-api-tests', 'state_context_api.tests.cpp'], + ['debug-api-tests', 'debug_api.tests.cpp'], + ['kmx_xstring-tests', 'kmx_xstring.tests.cpp'], + ['kmx_context-tests', 'kmx_context.tests.cpp'], + ['actions_normalize-tests', 'actions_normalize.tests.cpp'], + ['actions_get_api-tests', 'actions_get_api.tests.cpp'], ] test_path = join_paths(meson.current_build_dir(), '..', 'kmx') diff --git a/core/tests/unit/kmnkbd/options_api.cpp b/core/tests/unit/kmnkbd/options_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/options_api.cpp rename to core/tests/unit/kmnkbd/options_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/state_api.cpp b/core/tests/unit/kmnkbd/state_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/state_api.cpp rename to core/tests/unit/kmnkbd/state_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/state_context_api.cpp b/core/tests/unit/kmnkbd/state_context_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/state_context_api.cpp rename to core/tests/unit/kmnkbd/state_context_api.tests.cpp diff --git a/core/tests/unit/kmx/kmx_external_event.cpp b/core/tests/unit/kmx/kmx_external_event.tests.cpp similarity index 100% rename from core/tests/unit/kmx/kmx_external_event.cpp rename to core/tests/unit/kmx/kmx_external_event.tests.cpp diff --git a/core/tests/unit/kmx/kmx_imx.cpp b/core/tests/unit/kmx/kmx_imx.tests.cpp similarity index 100% rename from core/tests/unit/kmx/kmx_imx.cpp rename to core/tests/unit/kmx/kmx_imx.tests.cpp diff --git a/core/tests/unit/kmx/kmx_key_list.cpp b/core/tests/unit/kmx/kmx_key_list.tests.cpp similarity index 100% rename from core/tests/unit/kmx/kmx_key_list.cpp rename to core/tests/unit/kmx/kmx_key_list.tests.cpp diff --git a/core/tests/unit/kmx/meson.build b/core/tests/unit/kmx/meson.build index 548ab895229..a7a69079e4a 100644 --- a/core/tests/unit/kmx/meson.build +++ b/core/tests/unit/kmx/meson.build @@ -174,7 +174,7 @@ subdir('fixtures') # should work for Linux, macOS, and WASM. test_path = source_path -key_e = executable('key_list', ['kmx_key_list.cpp', common_test_files], +key_e = executable('key_list_tests', ['kmx_key_list.tests.cpp', common_test_files], cpp_args: defns + warns, include_directories: [inc, libsrc], link_args: links + tests_flags, @@ -193,7 +193,7 @@ test('key_list', key_e, depends: kbd_log, args: [kbd_obj] ) # test for imx list -imx_e = executable('imx_list', ['kmx_imx.cpp', common_test_files], +imx_e = executable('imx_list_tests', ['kmx_imx.tests.cpp', common_test_files], cpp_args: defns + warns, include_directories: [inc, libsrc], link_args: links + tests_flags, @@ -211,7 +211,7 @@ kbd_log = custom_target(test_kbd + '.kmx'.underscorify(), ) test('imx_list', imx_e, depends: kbd_log, args: [kbd_obj] ) -external_e = executable('ext_event', ['kmx_external_event.cpp', common_test_files], +external_e = executable('ext_event_tests', ['kmx_external_event.tests.cpp', common_test_files], cpp_args: defns + warns, include_directories: [inc, libsrc], link_args: links + tests_flags, diff --git a/core/tests/unit/ldml/test_context_normalization.cpp b/core/tests/unit/ldml/context_normalization.tests.cpp similarity index 100% rename from core/tests/unit/ldml/test_context_normalization.cpp rename to core/tests/unit/ldml/context_normalization.tests.cpp diff --git a/core/tests/unit/ldml/core_ldml_min.cpp b/core/tests/unit/ldml/core_ldml_min.tests.cpp similarity index 100% rename from core/tests/unit/ldml/core_ldml_min.cpp rename to core/tests/unit/ldml/core_ldml_min.tests.cpp diff --git a/core/tests/unit/ldml/test_kmx_plus.cpp b/core/tests/unit/ldml/kmx_plus.tests.cpp similarity index 100% rename from core/tests/unit/ldml/test_kmx_plus.cpp rename to core/tests/unit/ldml/kmx_plus.tests.cpp diff --git a/core/tests/unit/ldml/meson.build b/core/tests/unit/ldml/meson.build index 20ad621b506..f46b08b4b3f 100644 --- a/core/tests/unit/ldml/meson.build +++ b/core/tests/unit/ldml/meson.build @@ -82,8 +82,8 @@ ldml = executable('ldml', objects: lib.extract_all_objects(recursive: false), ) -core_ldml_min = executable('core_ldml_min', - ['core_ldml_min.cpp'], +core_ldml_min = executable('core_ldml_min_tests', + ['core_ldml_min.tests.cpp'], cpp_args: defns + warns, include_directories: [inc, libsrc], link_args: links, @@ -91,12 +91,12 @@ core_ldml_min = executable('core_ldml_min', link_with: [lib], # objects: lib.extract_all_objects(recursive: false), ) -test('core_ldml_min', core_ldml_min, suite: 'ldml', should_fail: true) +test('core_ldml_min_tests', core_ldml_min, suite: 'ldml', should_fail: true) # Build and run additional test_kmx_plus test -e = executable('test_kmx_plus', 'test_kmx_plus.cpp', +e = executable('kmx_plus_tests', 'kmx_plus.tests.cpp', 'ldml_test_utils.cpp', common_test_files, cpp_args: defns + warns, @@ -104,18 +104,18 @@ e = executable('test_kmx_plus', 'test_kmx_plus.cpp', link_args: links + tests_flags, dependencies: [icu_uc, icu_i18n], objects: lib.extract_all_objects(recursive: false)) -test('test_kmx_plus', e, suite: 'ldml') +test('kmx_plus_tests', e, suite: 'ldml') # run transforms / ldml utilities unit test -t = executable('test_transforms', 'test_transforms.cpp', +t = executable('transforms_tests', 'transforms.tests.cpp', common_test_files, cpp_args: defns + warns, include_directories: [inc, libsrc, '../../../../developer/src/ext/json'], link_args: links + tests_flags, dependencies: [icu_uc, icu_i18n], objects: lib.extract_all_objects(recursive: false)) -test('test_transforms', t, suite: 'ldml') +test('transforms_tests', t, suite: 'ldml') # run test_context_normalization ldml unit test @@ -125,19 +125,19 @@ if cpp_compiler.get_id() == 'emscripten' normalization_tests_flags += ['-lnodefs.js', wasm_exported_runtime_methods] endif -test_context_normalization = executable('test_context_normalization', - ['test_context_normalization.cpp', common_test_files], +test_context_normalization = executable('context_normalization_tests', + ['context_normalization.tests.cpp', common_test_files], cpp_args: defns + warns, include_directories: [inc, libsrc, '../../../../developer/src/ext/json'], link_args: links + normalization_tests_flags, dependencies: [icu_uc, icu_i18n], objects: lib.extract_all_objects(recursive: false)) -test('test_context_normalization', test_context_normalization, suite: 'ldml') +test('context_normalization_tests', test_context_normalization, suite: 'ldml') # Build and run additional test_unicode test -test_unicode = executable('test_unicode', 'test_unicode.cpp', - ['test_unicode.cpp', common_test_files, generated_headers], +test_unicode = executable('unicode_tests', 'unicode.tests.cpp', + ['unicode.tests.cpp', common_test_files, generated_headers], cpp_args: defns + warns, include_directories: [inc, libsrc, '../../../../developer/src/ext/json'], link_args: links + tests_flags, @@ -146,7 +146,7 @@ test_unicode = executable('test_unicode', 'test_unicode.cpp', ) -test('test_unicode', test_unicode, suite: 'ldml', +test('unicode_tests', test_unicode, suite: 'ldml', args: [ test_unicode_path / 'nodeversions.json', test_unicode_path / 'package.json', diff --git a/core/tests/unit/ldml/test_transforms.cpp b/core/tests/unit/ldml/transforms.tests.cpp similarity index 100% rename from core/tests/unit/ldml/test_transforms.cpp rename to core/tests/unit/ldml/transforms.tests.cpp diff --git a/core/tests/unit/ldml/test_unicode.cpp b/core/tests/unit/ldml/unicode.tests.cpp similarity index 100% rename from core/tests/unit/ldml/test_unicode.cpp rename to core/tests/unit/ldml/unicode.tests.cpp diff --git a/core/tests/unit/utftest/meson.build b/core/tests/unit/utftest/meson.build index 4ab6cb74ca0..c82b6f98c55 100644 --- a/core/tests/unit/utftest/meson.build +++ b/core/tests/unit/utftest/meson.build @@ -4,7 +4,7 @@ # Authors: Tim Eves (TSE) # -e = executable('utftest', 'utftest.cpp', +e = executable('utftest', 'utftest.tests.cpp', objects: lib.extract_objects('../../common/cpp/utfcodec.cpp'), include_directories: [libsrc]) test('utftest', e) diff --git a/core/tests/unit/utftest/utftest.cpp b/core/tests/unit/utftest/utftest.tests.cpp similarity index 100% rename from core/tests/unit/utftest/utftest.cpp rename to core/tests/unit/utftest/utftest.tests.cpp