diff options
| author | Ryan <fauxpark@gmail.com> | 2022-10-07 13:35:01 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-06 19:35:01 -0700 |
| commit | 6dbbeea46a0ac7527235982cb6406802df846805 (patch) | |
| tree | 55b2a71430ad3726ab098a53b581a69efdd1602d /tests/test_common | |
| parent | cbe1c22d468d64d7a3274061ce9c2073ecb208a4 (diff) | |
Refactor `send_extra` (#18615)
Diffstat (limited to 'tests/test_common')
| -rw-r--r-- | tests/test_common/test_driver.cpp | 4 | ||||
| -rw-r--r-- | tests/test_common/test_driver.hpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_common/test_driver.cpp b/tests/test_common/test_driver.cpp index 7ecd4931ed..f1c52cb7b6 100644 --- a/tests/test_common/test_driver.cpp +++ b/tests/test_common/test_driver.cpp | |||
| @@ -53,8 +53,8 @@ void TestDriver::send_mouse(report_mouse_t* report) { | |||
| 53 | m_this->send_mouse_mock(*report); | 53 | m_this->send_mouse_mock(*report); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | void TestDriver::send_extra(uint8_t report_id, uint16_t data) { | 56 | void TestDriver::send_extra(report_extra_t* report) { |
| 57 | m_this->send_extra_mock(report_id, data); | 57 | m_this->send_extra_mock(*report); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | namespace internal { | 60 | namespace internal { |
diff --git a/tests/test_common/test_driver.hpp b/tests/test_common/test_driver.hpp index 666bfb1fba..c97bda8bc5 100644 --- a/tests/test_common/test_driver.hpp +++ b/tests/test_common/test_driver.hpp | |||
| @@ -32,13 +32,13 @@ class TestDriver { | |||
| 32 | 32 | ||
| 33 | MOCK_METHOD1(send_keyboard_mock, void(report_keyboard_t&)); | 33 | MOCK_METHOD1(send_keyboard_mock, void(report_keyboard_t&)); |
| 34 | MOCK_METHOD1(send_mouse_mock, void(report_mouse_t&)); | 34 | MOCK_METHOD1(send_mouse_mock, void(report_mouse_t&)); |
| 35 | MOCK_METHOD2(send_extra_mock, void(uint8_t, uint16_t)); | 35 | MOCK_METHOD1(send_extra_mock, void(report_extra_t&)); |
| 36 | 36 | ||
| 37 | private: | 37 | private: |
| 38 | static uint8_t keyboard_leds(void); | 38 | static uint8_t keyboard_leds(void); |
| 39 | static void send_keyboard(report_keyboard_t* report); | 39 | static void send_keyboard(report_keyboard_t* report); |
| 40 | static void send_mouse(report_mouse_t* report); | 40 | static void send_mouse(report_mouse_t* report); |
| 41 | static void send_extra(uint8_t report_id, uint16_t data); | 41 | static void send_extra(report_extra_t* report); |
| 42 | host_driver_t m_driver; | 42 | host_driver_t m_driver; |
| 43 | uint8_t m_leds = 0; | 43 | uint8_t m_leds = 0; |
| 44 | static TestDriver* m_this; | 44 | static TestDriver* m_this; |
