Remove compiler support for `clearcontext`, `fix`, `switch` statements
and remove corresponding `CODE_` definitions, as well as `CODE_KEY`,
which was never used.
These four statements have never been documented and have either never
been implemented, or long been unsupported. An earlier change (#16445)
marked `clearcontext` and `fix` as deprecated for v19 onwards, but
deprecation for an undocumented language feature is an unnecessary step,
so have opted to remove altogether in v19 to reduce complexity. This
means that `VERSION_190` is used now only for compile target
deprecations.
Follows: #16445
Test-bot: skip
Per the spec, the `id` attribute is required for touch layers, and
`modifiers` attribute is required for hardware layers. There is
ambiguity in the spec at present as to whether they should be allowed
for the alternative type.
* Validate that the attributes are present where required.
* Tighten validation of `modifiers` attribute - it cannot be empty or
missing for hardware; "" != "none".
* Hint if the attribute is present when it probably shouldn't be (to be
potentially raised to warning or error after spec clarified).
* Fixup all keyboard3 xml files to conform to spec and eliminate hints.
* Add unit tests.
* Removed threshold warning for coverage as kmc-ldml is already > 90%.
Fixes: #12423
when vectors are resized the memory is realocated so all the option
pointers become invalid. Using a deque avoids this it has all the same
methods so it is straight replacement.
fixes: #15961
This commit update the state object to have a deep copy for the
action_struct member. The tests have been modified but have
a few issues however this branch is out of date with the refacted
master branch for unit tests. This commit gets the main change in
a future commit will update the 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
* 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
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
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
jsonpp was being used only in a single unit test, and so this was a lot
of overhead and complexity for very little benefit. We may want to add
some more unit tests in the future for state_api.tests.cpp to do a
deep comparison of the state?
Test-bot: skip