spiegel-keyman/core/tests/unit/meson.build
Eberhard Beilharz 3dc3f040de
feat(core): implement loading KMX from blob
- split keyboard loading into loading KMX file into blob and then
  loading the keyboard processor from the blob.
- deprecate `km_core_keyboard_load`
- move file access next to deprecated method. This is now the only place
  that loads a file in Core; unit tests have some more places that
  load files.
- introduce GTest and add unit tests for loading from blob

Cherry-picked from `epic/web-core` branch.

Cherry-Pick-Commit: 1deaa323ad
Cherry-Pick-Commit: 59019cc8b7
Cherry-Pick-Commit: bc46458368
Cherry-Pick-Commit: d06aa29956
Cherry-Pick-Commit: 1c88166f6e
Cherry-Pick-Commit: 069cd21ecd
Cherry-Pick-Commit: 052ae2ec35
Cherry-Pick-Commit: 11a2a3ba3a

Part-of: #11293
Part-of: #8093
2024-11-27 15:30:05 +01:00

43 lines
1.1 KiB
Meson

node = find_program('node', required: true)
gtest = subproject('gtest')
gtest_dep = gtest.get_variable('gtest_dep')
gmock_dep = gtest.get_variable('gmock_dep')
test_util_files = [
meson.current_source_dir() / 'emscripten_filesystem.cpp',
meson.current_source_dir() / 'load_kmx_file.cpp',
]
common_test_files = [
test_util_files,
meson.global_source_root() / '../common/include/test_color.cpp'
]
hextobin_root = meson.global_source_root() / '../common/tools/hextobin/build/hextobin.js'
hextobin_cmd = [node, hextobin_root]
if cpp_compiler.get_id() == 'emscripten'
extra_link_args = [ '-lnodefs.js' ]
else
extra_link_args = []
endif
kmcorekeyboardapitests = executable('km_core_keyboard_api.tests',
[
'km_core_keyboard_api.tests.cpp',
test_util_files,
],
include_directories: [inc, libsrc],
link_args: [ links, extra_link_args ],
dependencies: [icu_uc, icu_i18n, gtest_dep, gmock_dep],
objects: lib.extract_all_objects(recursive: false),
)
test('km-core-keyboard-api-tests', kmcorekeyboardapitests)
subdir('json')
subdir('utftest')
subdir('kmnkbd')
subdir('kmx')
subdir('ldml')