From 43d8fa5bf1248ce5c1ce5f9cb0d238d794b4475d Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Mon, 19 Jun 2017 00:19:09 +0300 Subject: More natural interface for setting keyboard leds --- tests/test_common/test_driver.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/test_common/test_driver.h') diff --git a/tests/test_common/test_driver.h b/tests/test_common/test_driver.h index b1b95fbcc..0123fd539 100644 --- a/tests/test_common/test_driver.h +++ b/tests/test_common/test_driver.h @@ -27,7 +27,8 @@ class TestDriver { public: TestDriver(); ~TestDriver(); - MOCK_METHOD0(keyboard_leds_mock, uint8_t ()); + 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)); @@ -39,6 +40,7 @@ private: 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; }; -- cgit v1.2.3-24-g4f1b