diff options
author | Stefan Kerkmann <[email protected]> | 2021-11-22 22:15:04 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-23 08:15:04 +1100 |
commit | b6054c0206609f3755f71d819643644d250288b0 (patch) | |
tree | 4f6f33040bb5184d47144090058eb089d2782b6c /tests/test_common/test_driver.hpp | |
parent | f4966a19d69a7f3bbefeea0537071d7d7c2abbdd (diff) | |
download | qmk_firmware-b6054c0206609f3755f71d819643644d250288b0.tar.gz qmk_firmware-b6054c0206609f3755f71d819643644d250288b0.zip |
[Tests] Increase QMK test coverage (#13789)
* Add per-test keymaps
* Add better trace and info logs for failed unit-tests
* Add layer state assertion with tracing message
* Use individual test binaries configuration options
* Add basic qmk functionality tests
* Add tap hold configurations tests
* Add auto shift tests
* `qmk format-c
* Fix tests
Co-authored-by: Nick Brassel <[email protected]>
Diffstat (limited to 'tests/test_common/test_driver.hpp')
-rw-r--r-- | tests/test_common/test_driver.hpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/test_common/test_driver.hpp b/tests/test_common/test_driver.hpp index f86308df95..f9197b3634 100644 --- a/tests/test_common/test_driver.hpp +++ b/tests/test_common/test_driver.hpp @@ -20,25 +20,26 @@ #include <stdint.h> #include "host.h" #include "keyboard_report_util.hpp" - +#include "test_logger.hpp" class TestDriver { -public: + 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; + 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; }; |