summaryrefslogtreecommitdiffstats
path: root/tests/test_common/test_driver.hpp
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2021-11-23 03:31:01 +0100
committerGitHub <noreply@github.com>2021-11-23 13:31:01 +1100
commita24bdccee0580d1263733bc7e66e4e4f97713f19 (patch)
tree868cb12a436a87b39c936292f442bcc266ae0224 /tests/test_common/test_driver.hpp
parente20bc76a1e05d02c15a452e51fa76d9ec39b0369 (diff)
[Tests] Increase QMK test coverage take 2 (#15269)
* 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 Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'tests/test_common/test_driver.hpp')
-rw-r--r--tests/test_common/test_driver.hpp29
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;
};