From fc4bfbe580c520caed5b6682790019658133f74e Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 1 Jul 2017 22:46:21 +0300 Subject: Rename tests to start with test_ --- tests/basic/test_keypress.cpp | 117 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 tests/basic/test_keypress.cpp (limited to 'tests/basic/test_keypress.cpp') diff --git a/tests/basic/test_keypress.cpp b/tests/basic/test_keypress.cpp new file mode 100644 index 000000000..2323b7cb4 --- /dev/null +++ b/tests/basic/test_keypress.cpp @@ -0,0 +1,117 @@ +/* Copyright 2017 Fred Sundvik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "test_common.h" + +using testing::_; +using testing::Return; + +class KeyPress : public TestFixture {}; + +TEST_F(KeyPress, SendKeyboardIsNotCalledWhenNoKeyIsPressed) { + TestDriver driver; + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + keyboard_task(); +} + +TEST_F(KeyPress, CorrectKeyIsReportedWhenPressed) { + TestDriver driver; + press_key(0, 0); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))); + keyboard_task(); + release_key(0, 0); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + keyboard_task(); +} + +TEST_F(KeyPress, CorrectKeysAreReportedWhenTwoKeysArePressed) { + TestDriver driver; + press_key(1, 0); + press_key(0, 3); + //Note that QMK only processes one key at a time + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))); + keyboard_task(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B, KC_C))); + keyboard_task(); + release_key(1, 0); + release_key(0, 3); + //Note that the first key released is the first one in the matrix order + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_C))); + keyboard_task(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + keyboard_task(); +} + +TEST_F(KeyPress, ANonMappedKeyDoesNothing) { + TestDriver driver; + press_key(2, 0); + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + keyboard_task(); + keyboard_task(); +} + +TEST_F(KeyPress, LeftShiftIsReportedCorrectly) { + TestDriver driver; + press_key(3, 0); + press_key(0, 0); + // Unfortunately modifiers are also processed in the wrong order + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))); + keyboard_task(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_LSFT))); + keyboard_task(); + release_key(0, 0); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + keyboard_task(); + release_key(3, 0); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + keyboard_task(); +} + +TEST_F(KeyPress, PressLeftShiftAndControl) { + TestDriver driver; + press_key(3, 0); + press_key(5, 0); + // Unfortunately modifiers are also processed in the wrong order + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + keyboard_task(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_LCTRL))); + keyboard_task(); +} + +TEST_F(KeyPress, LeftAndRightShiftCanBePressedAtTheSameTime) { + TestDriver driver; + press_key(3, 0); + press_key(4, 0); + // Unfortunately modifiers are also processed in the wrong order + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + keyboard_task(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_RSFT))); + keyboard_task(); +} + +TEST_F(KeyPress, RightShiftLeftControlAndCharWithTheSameKey) { + TestDriver driver; + press_key(6, 0); + // BUG: The press is split into two reports + // BUG: It reports RSFT instead of LSFT + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL, KC_O))); + keyboard_task(); + release_key(6, 0); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + keyboard_task(); +} \ No newline at end of file -- cgit v1.2.3 From 67f722c9c8cb077b946dfb2b6a3b538e37f3aa8c Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 2 Jul 2017 21:46:35 +0300 Subject: Configure vscode file associations, use hpp instead of h --- .vscode/settings.json | 6 ++++ tests/basic/test_keypress.cpp | 2 +- tests/basic/test_macro.cpp | 2 +- tests/basic/test_tapping.cpp | 2 +- tests/test_common/keyboard_report_util.cpp | 2 +- tests/test_common/keyboard_report_util.h | 39 ------------------------ tests/test_common/keyboard_report_util.hpp | 39 ++++++++++++++++++++++++ tests/test_common/test_common.h | 24 --------------- tests/test_common/test_common.hpp | 24 +++++++++++++++ tests/test_common/test_driver.cpp | 2 +- tests/test_common/test_driver.h | 48 ------------------------------ tests/test_common/test_driver.hpp | 48 ++++++++++++++++++++++++++++++ tests/test_common/test_fixture.cpp | 4 +-- tests/test_common/test_fixture.h | 30 ------------------- tests/test_common/test_fixture.hpp | 30 +++++++++++++++++++ 15 files changed, 154 insertions(+), 148 deletions(-) delete mode 100644 tests/test_common/keyboard_report_util.h create mode 100644 tests/test_common/keyboard_report_util.hpp delete mode 100644 tests/test_common/test_common.h create mode 100644 tests/test_common/test_common.hpp delete mode 100644 tests/test_common/test_driver.h create mode 100644 tests/test_common/test_driver.hpp delete mode 100644 tests/test_common/test_fixture.h create mode 100644 tests/test_common/test_fixture.hpp (limited to 'tests/basic/test_keypress.cpp') diff --git a/.vscode/settings.json b/.vscode/settings.json index f5d7a7602..be0b85b78 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,11 @@ "files.exclude": { "**/.build": true, "**/*.hex": true + }, + "files.associations": { + "*.h": "c", + "*.c": "c", + "*.cpp": "cpp", + "*.hpp": "cpp" } } \ No newline at end of file diff --git a/tests/basic/test_keypress.cpp b/tests/basic/test_keypress.cpp index 2323b7cb4..460c38385 100644 --- a/tests/basic/test_keypress.cpp +++ b/tests/basic/test_keypress.cpp @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "test_common.h" +#include "test_common.hpp" using testing::_; using testing::Return; diff --git a/tests/basic/test_macro.cpp b/tests/basic/test_macro.cpp index f1990bf6f..56ee5ad3e 100644 --- a/tests/basic/test_macro.cpp +++ b/tests/basic/test_macro.cpp @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "test_common.h" +#include "test_common.hpp" #include "time.h" using testing::InSequence; diff --git a/tests/basic/test_tapping.cpp b/tests/basic/test_tapping.cpp index c158e1718..75a1bcafb 100644 --- a/tests/basic/test_tapping.cpp +++ b/tests/basic/test_tapping.cpp @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "test_common.h" +#include "test_common.hpp" #include "action_tapping.h" using testing::_; diff --git a/tests/test_common/keyboard_report_util.cpp b/tests/test_common/keyboard_report_util.cpp index aa096e416..bf728b9a2 100644 --- a/tests/test_common/keyboard_report_util.cpp +++ b/tests/test_common/keyboard_report_util.cpp @@ -14,7 +14,7 @@ * along with this program. If not, see . */ - #include "keyboard_report_util.h" + #include "keyboard_report_util.hpp" #include #include using namespace testing; diff --git a/tests/test_common/keyboard_report_util.h b/tests/test_common/keyboard_report_util.h deleted file mode 100644 index 48543c205..000000000 --- a/tests/test_common/keyboard_report_util.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once -#include "report.h" -#include -#include "gmock/gmock.h" - -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: - 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: - report_keyboard_t m_report; -}; - - -template -inline testing::Matcher KeyboardReport(Ts... keys) { - return testing::MakeMatcher(new KeyboardReportMatcher(std::vector({keys...}))); -} \ No newline at end of file diff --git a/tests/test_common/keyboard_report_util.hpp b/tests/test_common/keyboard_report_util.hpp new file mode 100644 index 000000000..48543c205 --- /dev/null +++ b/tests/test_common/keyboard_report_util.hpp @@ -0,0 +1,39 @@ +/* Copyright 2017 Fred Sundvik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#include "report.h" +#include +#include "gmock/gmock.h" + +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: + 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: + report_keyboard_t m_report; +}; + + +template +inline testing::Matcher KeyboardReport(Ts... keys) { + return testing::MakeMatcher(new KeyboardReportMatcher(std::vector({keys...}))); +} \ No newline at end of file diff --git a/tests/test_common/test_common.h b/tests/test_common/test_common.h deleted file mode 100644 index 38eb0ed93..000000000 --- a/tests/test_common/test_common.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "gtest/gtest.h" -#include "gmock/gmock.h" - -#include "quantum.h" -#include "test_driver.h" -#include "test_matrix.h" -#include "keyboard_report_util.h" -#include "test_fixture.h" \ No newline at end of file diff --git a/tests/test_common/test_common.hpp b/tests/test_common/test_common.hpp new file mode 100644 index 000000000..239844633 --- /dev/null +++ b/tests/test_common/test_common.hpp @@ -0,0 +1,24 @@ +/* Copyright 2017 Fred Sundvik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" +#include "gmock/gmock.h" + +#include "quantum.h" +#include "test_driver.hpp" +#include "test_matrix.h" +#include "keyboard_report_util.hpp" +#include "test_fixture.hpp" \ No newline at end of file diff --git a/tests/test_common/test_driver.cpp b/tests/test_common/test_driver.cpp index feb80563a..511309969 100644 --- a/tests/test_common/test_driver.cpp +++ b/tests/test_common/test_driver.cpp @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "test_driver.h" +#include "test_driver.hpp" TestDriver* TestDriver::m_this = nullptr; diff --git a/tests/test_common/test_driver.h b/tests/test_common/test_driver.h deleted file mode 100644 index 0123fd539..000000000 --- a/tests/test_common/test_driver.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef TESTS_TEST_COMMON_TEST_DRIVER_H_ -#define TESTS_TEST_COMMON_TEST_DRIVER_H_ - -#include "gmock/gmock.h" -#include -#include "host.h" -#include "keyboard_report_util.h" - - -class TestDriver { -public: - TestDriver(); - ~TestDriver(); - void set_leds(uint8_t leds) { m_leds = leds; } - - MOCK_METHOD1(send_keyboard_mock, void (report_keyboard_t&)); - MOCK_METHOD1(send_mouse_mock, void (report_mouse_t&)); - MOCK_METHOD1(send_system_mock, void (uint16_t)); - MOCK_METHOD1(send_consumer_mock, void (uint16_t)); -private: - static uint8_t keyboard_leds(void); - static void send_keyboard(report_keyboard_t *report); - static void send_mouse(report_mouse_t* report); - static void send_system(uint16_t data); - static void send_consumer(uint16_t data); - host_driver_t m_driver; - uint8_t m_leds = 0; - static TestDriver* m_this; -}; - - -#endif /* TESTS_TEST_COMMON_TEST_DRIVER_H_ */ diff --git a/tests/test_common/test_driver.hpp b/tests/test_common/test_driver.hpp new file mode 100644 index 000000000..c3ae17b1a --- /dev/null +++ b/tests/test_common/test_driver.hpp @@ -0,0 +1,48 @@ +/* Copyright 2017 Fred Sundvik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef TESTS_TEST_COMMON_TEST_DRIVER_H_ +#define TESTS_TEST_COMMON_TEST_DRIVER_H_ + +#include "gmock/gmock.h" +#include +#include "host.h" +#include "keyboard_report_util.hpp" + + +class TestDriver { +public: + TestDriver(); + ~TestDriver(); + void set_leds(uint8_t leds) { m_leds = leds; } + + MOCK_METHOD1(send_keyboard_mock, void (report_keyboard_t&)); + MOCK_METHOD1(send_mouse_mock, void (report_mouse_t&)); + MOCK_METHOD1(send_system_mock, void (uint16_t)); + MOCK_METHOD1(send_consumer_mock, void (uint16_t)); +private: + static uint8_t keyboard_leds(void); + static void send_keyboard(report_keyboard_t *report); + static void send_mouse(report_mouse_t* report); + static void send_system(uint16_t data); + static void send_consumer(uint16_t data); + host_driver_t m_driver; + uint8_t m_leds = 0; + static TestDriver* m_this; +}; + + +#endif /* TESTS_TEST_COMMON_TEST_DRIVER_H_ */ diff --git a/tests/test_common/test_fixture.cpp b/tests/test_common/test_fixture.cpp index 5ca5247db..df57338df 100644 --- a/tests/test_common/test_fixture.cpp +++ b/tests/test_common/test_fixture.cpp @@ -1,6 +1,6 @@ -#include "test_fixture.h" +#include "test_fixture.hpp" #include "gmock/gmock.h" -#include "test_driver.h" +#include "test_driver.hpp" #include "test_matrix.h" #include "keyboard.h" #include "action.h" diff --git a/tests/test_common/test_fixture.h b/tests/test_common/test_fixture.h deleted file mode 100644 index 4146b682b..000000000 --- a/tests/test_common/test_fixture.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - - #pragma once - -#include "gtest/gtest.h" - -class TestFixture : public testing::Test { -public: - TestFixture(); - ~TestFixture(); - static void SetUpTestCase(); - static void TearDownTestCase(); - - void run_one_scan_loop(); - void idle_for(uint ms); -}; \ No newline at end of file diff --git a/tests/test_common/test_fixture.hpp b/tests/test_common/test_fixture.hpp new file mode 100644 index 000000000..4146b682b --- /dev/null +++ b/tests/test_common/test_fixture.hpp @@ -0,0 +1,30 @@ +/* Copyright 2017 Fred Sundvik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + #pragma once + +#include "gtest/gtest.h" + +class TestFixture : public testing::Test { +public: + TestFixture(); + ~TestFixture(); + static void SetUpTestCase(); + static void TearDownTestCase(); + + void run_one_scan_loop(); + void idle_for(uint ms); +}; \ No newline at end of file -- cgit v1.2.3 From 60b1880a6248b8d94da0d8d0db638af130557416 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 8 Jul 2017 19:23:39 +0300 Subject: Reference issue #1476 from the unit tests --- tests/basic/test_keypress.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/basic/test_keypress.cpp') diff --git a/tests/basic/test_keypress.cpp b/tests/basic/test_keypress.cpp index 460c38385..d85cba446 100644 --- a/tests/basic/test_keypress.cpp +++ b/tests/basic/test_keypress.cpp @@ -42,6 +42,7 @@ TEST_F(KeyPress, CorrectKeysAreReportedWhenTwoKeysArePressed) { press_key(1, 0); press_key(0, 3); //Note that QMK only processes one key at a time + //See issue #1476 for more information EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))); keyboard_task(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B, KC_C))); @@ -68,6 +69,7 @@ TEST_F(KeyPress, LeftShiftIsReportedCorrectly) { press_key(3, 0); press_key(0, 0); // Unfortunately modifiers are also processed in the wrong order + // See issue #1476 for more information EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))); keyboard_task(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_LSFT))); @@ -85,6 +87,7 @@ TEST_F(KeyPress, PressLeftShiftAndControl) { press_key(3, 0); press_key(5, 0); // Unfortunately modifiers are also processed in the wrong order + // See issue #1476 for more information EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); keyboard_task(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_LCTRL))); @@ -96,6 +99,7 @@ TEST_F(KeyPress, LeftAndRightShiftCanBePressedAtTheSameTime) { press_key(3, 0); press_key(4, 0); // Unfortunately modifiers are also processed in the wrong order + // See issue #1476 for more information EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); keyboard_task(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_RSFT))); -- cgit v1.2.3 From 41efcd6d73ca08774e680daa39c42b0437133387 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 8 Jul 2017 19:26:47 +0300 Subject: Reference issue #524 from the unit tests --- tests/basic/test_keypress.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/basic/test_keypress.cpp') diff --git a/tests/basic/test_keypress.cpp b/tests/basic/test_keypress.cpp index d85cba446..194b1745b 100644 --- a/tests/basic/test_keypress.cpp +++ b/tests/basic/test_keypress.cpp @@ -111,6 +111,9 @@ TEST_F(KeyPress, RightShiftLeftControlAndCharWithTheSameKey) { press_key(6, 0); // BUG: The press is split into two reports // BUG: It reports RSFT instead of LSFT + // See issue #524 for more information + // The underlying cause is that we use only one bit to represent the right hand + // modifiers. EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL, KC_O))); keyboard_task(); -- cgit v1.2.3