From c9d62ddc78e879053241202b288d0129073b07dc Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Fri, 21 Mar 2025 08:47:22 +0100 Subject: [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 * 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 --- tests/test_common/keyboard_report_util.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/test_common/keyboard_report_util.cpp') 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 #include +extern "C" { +#include "keycode_string.h" +} + using namespace testing; extern std::map 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 << ", "; -- cgit v1.2.3