diff options
Diffstat (limited to 'tests/test_common/test_driver.cpp')
-rw-r--r-- | tests/test_common/test_driver.cpp | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/tests/test_common/test_driver.cpp b/tests/test_common/test_driver.cpp index 511309969..84e249d83 100644 --- a/tests/test_common/test_driver.cpp +++ b/tests/test_common/test_driver.cpp @@ -18,40 +18,19 @@ TestDriver* TestDriver::m_this = nullptr; -TestDriver::TestDriver() - : m_driver{ - &TestDriver::keyboard_leds, - &TestDriver::send_keyboard, - &TestDriver::send_mouse, - &TestDriver::send_system, - &TestDriver::send_consumer - } -{ +TestDriver::TestDriver() : m_driver{&TestDriver::keyboard_leds, &TestDriver::send_keyboard, &TestDriver::send_mouse, &TestDriver::send_system, &TestDriver::send_consumer} { host_set_driver(&m_driver); m_this = this; } -TestDriver::~TestDriver() { - m_this = nullptr; -} +TestDriver::~TestDriver() { m_this = nullptr; } -uint8_t TestDriver::keyboard_leds(void) { - return m_this->m_leds; -} +uint8_t TestDriver::keyboard_leds(void) { return m_this->m_leds; } -void TestDriver::send_keyboard(report_keyboard_t* report) { - m_this->send_keyboard_mock(*report); +void TestDriver::send_keyboard(report_keyboard_t* report) { m_this->send_keyboard_mock(*report); } -} +void TestDriver::send_mouse(report_mouse_t* report) { m_this->send_mouse_mock(*report); } -void TestDriver::send_mouse(report_mouse_t* report) { - m_this->send_mouse_mock(*report); -} +void TestDriver::send_system(uint16_t data) { m_this->send_system_mock(data); } -void TestDriver::send_system(uint16_t data) { - m_this->send_system_mock(data); -} - -void TestDriver::send_consumer(uint16_t data) { - m_this->send_consumer(data); -} +void TestDriver::send_consumer(uint16_t data) { m_this->send_consumer(data); } |