Commit graph

34040 commits

Author SHA1 Message Date
Marc Durdin
b2d4cf98de
Merge pull request #15923 from keymanapp/chore/core/15913-unit-test-follow-on
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
chore(core): additional cleanup of unit tests 🎼
2026-05-08 21:48:01 +10:00
Marc Durdin
27de659890
Merge pull request #15904 from keymanapp/refactor/core/api-documentation
refactor(core): clean up API documentation 🎼
2026-05-08 21:47:49 +10:00
Marc Durdin
48e684e242
Merge branch 'epic/web-core' into refactor/core/api-documentation
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-08 19:18:57 +10:00
Marc Durdin
b35847ab78
Merge pull request #15903 from keymanapp/chore/developer/ldml-test-file-reader-error-handler
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
chore(developer): handle parse errors in loading LDML test files 🎼
2026-05-08 19:16:02 +10:00
Marc Durdin
e05a2cf637 chore(developer): mark methods as private in ldml-keyboard-xml-reader 2026-05-08 09:54:21 +02:00
Marc Durdin
f4e94fb3ef chore(core): Merge branch 'chore/core/15913-unit-test-follow-on' 2026-05-07 15:20:19 +02:00
Marc Durdin
e0fd08ca0f chore(core): cleanup leaks in tests and skipped tests 2026-05-07 15:19:27 +02:00
Marc Durdin
6ec106f827
Merge branch 'refactor/core/api-documentation' into chore/core/15913-unit-test-follow-on 2026-05-07 23:19:00 +10:00
Marc Durdin
82f4c954a5 chore(core): merge actions test data for unit tests
Merge actions test data struct and some of the data for the actions API
unit tests. actions_update_app_context_nfu.tests.cpp data has not been
merged because the expected results are different, as it does not do
normalization, unlike actions_get_api and actions_normalize.

Merging of that data could be done, but would require adding extra
fields to each test result, which would make the data considerably
harder to read! Thus I have left it alone for now, just merged the
struct, which is still a win.

Fixes: #15913
2026-05-07 12:31:19 +02:00
Marc Durdin
6a4fc1fd8a
Merge pull request #15891 from keymanapp/chore/core/test-cleanup-2
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
refactor(core): clean up unit tests 🎼
2026-05-06 23:35:41 +10:00
Marc Durdin
a3de441eda chore(core): add test for NFD context deleting one combining mark
Relates-to: #15913
2026-05-06 15:11:59 +02:00
Marc Durdin
40d36f8e2c chore(core): add cross-reference between ldml_test_source and kmx_test_source
Relates-to: #15913
2026-05-06 15:09:25 +02:00
Marc Durdin
f7e210beb0 chore(core): cleanup state_context_api.tests.cpp
* Rename citems and eliminate shadowed class member
* Cleanup is_identical_context and related helper functions and make
  consistent name and signature, to assert_identical_context.
* Use clearer variable names for expected and actual values.

Relates-to: #15913
2026-05-06 14:47:15 +02:00
Marc Durdin
86571de22f chore(core): cleanup compare_debug_items unit test helper
Relates-to: #15913
2026-05-06 14:27:51 +02:00
Marc Durdin
5da3b4effc chore(core): cleanup transforms.tests.cpp
1. Rename various shorthand variables
2. Split simple tests into separate Google Test cases (have not tackled
   the more complex tests which have loops and/or setup)
3. Remove redundant logging from simple tests

Relates-to: #15913
2026-05-06 14:19:05 +02:00
Marc Durdin
410a4824bc chore(core): use ASSERT_FALSE and ASSERT_TRUE where possible
Relates-to: #15913
Test-bot: skip
2026-05-06 14:01:18 +02:00
Marc Durdin
a8888ca7c7
Merge branch 'chore/developer/ldml-test-file-reader-error-handler' into refactor/core/api-documentation
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-06 21:48:55 +10:00
Marc Durdin
d428fb2622
Merge branch 'chore/core/test-cleanup-2' into chore/developer/ldml-test-file-reader-error-handler
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-06 21:48:47 +10:00
Marc Durdin
7591dc0bba chore(core): tidy up api-header-extractor 2026-05-06 13:28:03 +02:00
Marc Durdin
be26f58481 chore(core): Merge branch 'refactor/core/api-documentation' of https://github.com/keymanapp/keyman into refactor/core/api-documentation 2026-05-06 13:02:18 +02:00
Marc Durdin
33a4d4b09c chore(developer): reduce coverage threshold for kmc-ldml to 85% 2026-05-06 12:10:10 +02:00
Marc Durdin
08891bb3a2 chore(core): address review comments on unit tests
Test-bot: skip
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-05-06 12:09:19 +02:00
Marc Durdin
0f2f3c1009 refactor(core): clean up API documentation
Move all Keyman Core header API documentation to javadoc-style so that
we can get inline documentation and simplify the readability of the
header files.

Update api-header-extractor to support minimal javadoc formatting of the
comments.

Test-bot: skip
2026-05-05 16:29:53 +02:00
Marc Durdin
c78531dbc0 refactor(core): clean up API documentation
Move all Keyman Core header API documentation to javadoc-style so that
we can get inline documentation and simplify the readability of the
header files.

Update api-header-extractor to support minimal javadoc formatting of the
comments.

Test-bot: skip
2026-05-04 17:35:20 +02:00
Marc Durdin
ac56e72fa9 chore(developer): handle parse errors in loading LDML test files
Test-bot: skip
2026-05-04 13:54:34 +02:00
Eberhard Beilharz
d2fb11af90
Merge pull request #15898 from keymanapp/refactor/web/jstests
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
refactor(web): move context tests to typescript
2026-05-04 12:09:02 +02:00
Eberhard Beilharz
1b8f37ef3f
Merge pull request #15899 from keymanapp/chore/web/15894_test-index
chore(web): cleanup `web/src/app/browser/src/test-index.ts` exports

The exports of `test-index.ts` were intended to be used by tests only, but over time they contained also exports that were consumed elsewhere, e.g. in UI classes like `kmwuibutton.ts`. This change removes unused exports, moves test-only classes to a `unitTestEndPoints` container and marks test-only types with `@internal`.

Fixes: #15894
2026-05-04 12:07:32 +02:00
Eberhard Beilharz
90caa120f8
Merge pull request #15893 from keymanapp/refactor/web/kbdProcessor
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
refactor(web): move common code to abstract `KeyboardProcessor` base class

This change moves code that was implemented in both `JSKeyboardProcessor` and `CoreKeyboardProcessor` to the `AbstractKeyboardProcessor`. This got renamed from `KeyboardProcessor` and is now a generic abstract class.

Also removed some of the band-aids in `CoreKeyboardInterface` and `JSKeyboardInterface` that I put in before: Typescript allows implementations to have a slightly different method signature and still matches the interface as long as the used types are derived from the ones specified in the interface.

Follows: #15870
2026-04-30 19:07:23 +02:00
Eberhard Beilharz
925e68c182
refactor(web): move context tests to typescript
Build-bot: skip build:web
Test-bot: skip
2026-04-30 18:34:20 +02:00
Eberhard Beilharz
9c364d56e4
chore(web): use .d.ts instead of .d.js for types
The convention is to use the `.d.ts` extension for typescript types, and
that's what is used elsewhere in the `package.json` file. This change
fixes the two instances that had `.d.js`.
2026-04-30 17:58:19 +02:00
Eberhard Beilharz
1bc83f9fcf
chore(web): cleanup web/src/app/browser/src/test-index.ts exports
The export of `test-index.ts` were intended to be used by tests only,
but over time they contained also exports that were consumed else where,
e.g. in UI classes like `kmwuibutton.ts`. This change removes unused
exports, moves test-only classes to a `unitTestEndPoints` container and
marks test-only types with `@internal`.

Build-bot: skip build:web
Test-bot: skip
2026-04-30 17:46:55 +02:00
Eberhard Beilharz
7c460e9b34
Merge pull request #15890 from keymanapp/feat/web/getKbdDetailsType
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
feat(web): clarify return type of `KeymanEngine.getKeyboardDetails` 🧼 🎼

`getKeyboardDetails` can return `null` if `stub` is falsy. This PR changes the return type accordingly to improve type safety.

Follows: #15889
2026-04-28 20:11:26 +02:00
Eberhard Beilharz
c6abfa2af1
Merge pull request #15889 from keymanapp/feat/web/keyboardDetails
feat(web): implement getting keyboard details for KMX keyboards 🧼 🎼

Turns out that we can use `KeyboardStub` for both JS and KMX keyboards.

Follows: #15888
2026-04-28 20:10:09 +02:00
Eberhard Beilharz
16dcfaa0cc
chore(web): Merge branch 'epic/web-core' into feat/web/keyboardDetails 2026-04-28 19:03:16 +02:00
Eberhard Beilharz
10fcfe470a
refactor(web): move common code to abstract KeyboardProcessor base class
This change moves code that was implemented in both `JSKeyboardProcessor`
and `CoreKeyboardProcessor` to the `AbstractKeyboardProcessor`. This got
renamed from `KeyboardProcessor` and is now a generic abstract class.

Also removed some of the band-aids in `CoreKeyboardInterface` and
`JSKeyboardInterface` that I put in before: Typescript allows
implementations to have a slightly different method signature and still
matches the interface as long as the used types are derived from the ones
specified in the interface.

Follows: #15870
Build-bot: skip build:web
Test-bot: skip
2026-04-28 18:59:42 +02:00
Eberhard Beilharz
8c9628791a
feat(web): ignore keyboards without details
This change will ignore keyboards where `getKeyboardDetails` returns
`null` and will not push them to the `detailsForAllKeyboards` array.

Addresses a code review comment.
2026-04-28 18:26:13 +02:00
Eberhard Beilharz
602a740cd9
Merge pull request #15888 from keymanapp/refactor/web/kbdDetails
refactor(web): use `KeyboardDetails` type 🧼 🎼

PR #15856 introduced the `KeyboardDetails` type but overlooked the use in one file.

Follow-up-of: #15856
Follows: #15887
2026-04-28 18:18:46 +02:00
Eberhard Beilharz
f16d27ca4c
Merge pull request #15887 from keymanapp/refactor/web/renames
refactor(web): rename variables and parameter names in KeymanEngine 🧼 🎼
2026-04-28 17:59:38 +02:00
Eberhard Beilharz
09d2816085
refactor(web): address code review comment
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-04-28 16:52:22 +02:00
Eberhard Beilharz
85e3bf1e39
Merge pull request #15870 from keymanapp/feat/web/loadSerializedOpts
feat(web): get list of store names from stores defined in core

This implements `CoreKeyboardInterface.loadSerializedOptions` by getting the list of all variable store names from Core and then trying to load these.

Also change `VariableStoreSerializer.loadStore` signature so that it can return `undefined`. This allows to return only those options from `loadSerializedOptions` that have a non-default value, i.e. were serialized before.

Follow-up-of: #15470
2026-04-28 16:39:56 +02:00
Marc Durdin
63c2ed823f chore(core): avoid emitting control chars into junit.xml 2026-04-28 15:48:49 +02:00
Marc Durdin
9853f29046 chore(core): address memory leak for embedded_test_source 2026-04-28 14:47:33 +02:00
Marc Durdin
d61e5bbb18 refactor(core): clean up unit tests
Consolidate test frameworks and cleanup, including:
* all tests use Google Test
* reorganize folders, esp. kmnkbd -> api
* move all api tests into api folder
* replace references to test_assert or test_color with gtest equivalents
* leverage gtest patterns to remove boilerplate code
* dramatically simplify meson.build files and localize variables
* move shared helper code into helpers/ folder
* make test names unique and add gtest protocol for reporting back to
  teamcity

Fixes:
* CLDR test keyboards had invalid unicodeset escapes (needs to be raised
  upstream also) - was not failing tests because files were not loading
  but returning success

Test-bot: skip
2026-04-28 12:17:44 +02:00
Eberhard Beilharz
51283454d8
feat(web): clarify return type of KeymanEngine.getKeyboardDetails 🧼
`getKeyboardDetails` can return `null` if `stub` is falsy. This PR changes
the return type accordingly to improve type safety.

Follows: #15889
Build-bot: skip build:web
Test-bot: skip
2026-04-27 17:14:03 +02:00
Eberhard Beilharz
18408185d6
feat(web): implement getting keyboard details for KMX keyboards 🧼
Turns out that we can use `KeyboardStub` for both JS and KMX keyboards.

Follows: #15888
Build-bot: skip build:web
Test-bot: skip
2026-04-27 16:54:10 +02:00
Eberhard Beilharz
269ba67e89
refactor(web): use KeyboardDetails type 🧼
PR #15856 introduced the `KeyboardDetails` type but overlooked the use in
one file.

Follow-up-of: #15856
Follows: #15887
Build-bot: skip build:web
Test-bot: skip
2026-04-27 16:29:42 +02:00
Eberhard Beilharz
3b84867961
refactor(web): rename variables and parameter names in KeymanEngine 🧼
Build-bot: skip build:web
Test-bot: skip
2026-04-27 16:27:15 +02:00
Eberhard Beilharz
c613103b82
Merge pull request #15883 from keymanapp/docs/web/fileheader
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-24 18:38:36 +02:00
Eberhard Beilharz
8defa88bb9
docs(web): update file header
Having a file header that mentions an old version can be confusing, so
this change updates the file headers for the UI files with the current
header.

Build-bot: skip
Test-bot: skip
2026-04-24 15:51:52 +02:00
Keyman Server
a30d618445
Merge pull request #15882 from keymanapp/auto/A19S27-merge-master-into-web-core
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
auto: A19S27 merge master into web-core 🎼
2026-04-24 07:14:19 +02:00