[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>
This commit is contained in:
parent
d603fb0913
commit
c9d62ddc78
15 changed files with 17 additions and 1009 deletions
|
@ -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 << ", ";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue