diff --git a/tests/test_common/keyboard_report_util.hpp b/tests/test_common/keyboard_report_util.hpp index 8a7d716869c..abd12c97024 100644 --- a/tests/test_common/keyboard_report_util.hpp +++ b/tests/test_common/keyboard_report_util.hpp @@ -19,21 +19,20 @@ #include #include "gmock/gmock.h" -bool operator==(const report_keyboard_t& lhs, const report_keyboard_t& rhs); +bool operator==(const report_keyboard_t& lhs, const report_keyboard_t& rhs); std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value); class KeyboardReportMatcher : public testing::MatcherInterface { - public: + public: KeyboardReportMatcher(const std::vector& keys); virtual bool MatchAndExplain(report_keyboard_t& report, testing::MatchResultListener* listener) const override; virtual void DescribeTo(::std::ostream* os) const override; virtual void DescribeNegationTo(::std::ostream* os) const override; - - private: + private: report_keyboard_t m_report; }; -template +template inline testing::Matcher KeyboardReport(Ts... keys) { return testing::MakeMatcher(new KeyboardReportMatcher(std::vector({keys...}))); } diff --git a/tmk_core/protocol/report.c b/tmk_core/protocol/report.c index c825ab67da3..0166bf654f2 100644 --- a/tmk_core/protocol/report.c +++ b/tmk_core/protocol/report.c @@ -97,7 +97,7 @@ bool is_key_pressed(uint8_t key) { } } #endif - for (int i = 0; i < NKRO_REPORT_BITS; i++) { + for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { if (keyboard_report->keys[i] == key) { return true; }