forked from mirrors/qmk_userspace
[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>
This commit is contained in:
parent
e20bc76a1e
commit
a24bdccee0
48 changed files with 2702 additions and 245 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue