diff options
| author | Stefan Kerkmann | 2025-03-21 08:47:22 +0100 |
|---|---|---|
| committer | GitHub | 2025-03-21 08:47:22 +0100 |
| commit | c9d62ddc78e879053241202b288d0129073b07dc (patch) | |
| tree | 1e58dcea290874bf8af5ea7ca797fe3515885488 /tests/test_common/keyboard_report_util.cpp | |
| parent | d603fb09139a5a55e1efd910a3989e38f138446f (diff) | |
[Core] use `keycode_string` in unit tests (#25042)
* tests: use keycode_string feature
With a proper keycode to string implementation in qmk there is no need
to use the unit tests only implementation anymore.
Signed-off-by: Stefan Kerkmann <karlk90@pm.me>
* tests: remove keycode_util feature
This feature is no longer used as we switched the tests to the
keycode string implementation.
Signed-off-by: Stefan Kerkmann <karlk90@pm.me>
Diffstat (limited to 'tests/test_common/keyboard_report_util.cpp')
| -rw-r--r-- | tests/test_common/keyboard_report_util.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_common/keyboard_report_util.cpp b/tests/test_common/keyboard_report_util.cpp index 18e0574277..5e40323669 100644 --- a/tests/test_common/keyboard_report_util.cpp +++ b/tests/test_common/keyboard_report_util.cpp @@ -19,6 +19,10 @@ #include <vector> #include <algorithm> +extern "C" { +#include "keycode_string.h" +} + using namespace testing; extern std::map<uint16_t, std::string> KEYCODE_ID_TABLE; @@ -72,7 +76,7 @@ std::ostream& operator<<(std::ostream& os, const report_keyboard_t& report) { os << "("; for (auto key = keys.cbegin(); key != keys.cend();) { - os << KEYCODE_ID_TABLE.at(*key); + os << get_keycode_string(*key); key++; if (key != keys.cend()) { os << ", "; @@ -82,7 +86,7 @@ std::ostream& operator<<(std::ostream& os, const report_keyboard_t& report) { os << ") ["; for (auto mod = mods.cbegin(); mod != mods.cend();) { - os << KEYCODE_ID_TABLE.at(*mod); + os << get_keycode_string(*mod); mod++; if (mod != mods.cend()) { os << ", "; |