mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-15 04:11:30 +00:00
Typo fix and revert formatting on untouched file
This commit is contained in:
parent
5d3f783c12
commit
f3132549d8
@ -19,21 +19,20 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include "gmock/gmock.h"
|
#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);
|
std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value);
|
||||||
|
|
||||||
class KeyboardReportMatcher : public testing::MatcherInterface<report_keyboard_t&> {
|
class KeyboardReportMatcher : public testing::MatcherInterface<report_keyboard_t&> {
|
||||||
public:
|
public:
|
||||||
KeyboardReportMatcher(const std::vector<uint8_t>& keys);
|
KeyboardReportMatcher(const std::vector<uint8_t>& keys);
|
||||||
virtual bool MatchAndExplain(report_keyboard_t& report, testing::MatchResultListener* listener) const override;
|
virtual bool MatchAndExplain(report_keyboard_t& report, testing::MatchResultListener* listener) const override;
|
||||||
virtual void DescribeTo(::std::ostream* os) const override;
|
virtual void DescribeTo(::std::ostream* os) const override;
|
||||||
virtual void DescribeNegationTo(::std::ostream* os) const override;
|
virtual void DescribeNegationTo(::std::ostream* os) const override;
|
||||||
|
private:
|
||||||
private:
|
|
||||||
report_keyboard_t m_report;
|
report_keyboard_t m_report;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename... Ts>
|
template<typename... Ts>
|
||||||
inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) {
|
inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) {
|
||||||
return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...})));
|
return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...})));
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ bool is_key_pressed(uint8_t key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#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) {
|
if (keyboard_report->keys[i] == key) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user