mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-07 17:36:00 +00:00
- 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:1deaa323adCherry-Pick-Commit:59019cc8b7Cherry-Pick-Commit:bc46458368Cherry-Pick-Commit:d06aa29956Cherry-Pick-Commit:1c88166f6eCherry-Pick-Commit:069cd21ecdCherry-Pick-Commit:052ae2ec35Cherry-Pick-Commit:11a2a3ba3aPart-of: #11293 Part-of: #8093
43 lines
1.1 KiB
Meson
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')
|