summaryrefslogtreecommitdiff
path: root/tests/test_common
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_common')
-rw-r--r--tests/test_common/main.cpp2
-rw-r--r--tests/test_common/test_driver.cpp10
-rw-r--r--tests/test_common/test_driver.hpp8
3 files changed, 7 insertions, 13 deletions
diff --git a/tests/test_common/main.cpp b/tests/test_common/main.cpp
index 3e4b4c0f95..0f4e320b07 100644
--- a/tests/test_common/main.cpp
+++ b/tests/test_common/main.cpp
@@ -5,7 +5,7 @@ extern "C" {
#include "debug.h"
int8_t sendchar(uint8_t c) {
- fprintf(stderr, "%c", c);
+ fprintf(stdout, "%c", c);
return 0;
}
diff --git a/tests/test_common/test_driver.cpp b/tests/test_common/test_driver.cpp
index 86644ab6bd..f1c52cb7b6 100644
--- a/tests/test_common/test_driver.cpp
+++ b/tests/test_common/test_driver.cpp
@@ -31,7 +31,7 @@ uint8_t hex_digit_to_keycode(uint8_t digit) {
}
} // namespace
-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_extra} {
host_set_driver(&m_driver);
m_this = this;
}
@@ -53,12 +53,8 @@ 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_consumer(uint16_t data) {
- m_this->send_consumer(data);
+void TestDriver::send_extra(report_extra_t* report) {
+ m_this->send_extra_mock(*report);
}
namespace internal {
diff --git a/tests/test_common/test_driver.hpp b/tests/test_common/test_driver.hpp
index b58cfd1ebc..982aec6c83 100644
--- a/tests/test_common/test_driver.hpp
+++ b/tests/test_common/test_driver.hpp
@@ -32,15 +32,13 @@ class TestDriver {
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));
+ MOCK_METHOD1(send_extra_mock, void(report_extra_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);
+ static void send_extra(report_extra_t* report);
host_driver_t m_driver;
uint8_t m_leds = 0;
static TestDriver* m_this;
@@ -66,7 +64,7 @@ class TestDriver {
#define EXPECT_REPORT(driver, report) EXPECT_CALL((driver), send_keyboard_mock(KeyboardReport report))
/**
- * @brief Sets gmock expectation that Unicode `code_point` is sent with UC_LNX input
+ * @brief Sets gmock expectation that Unicode `code_point` is sent with UNICODE_MODE_LINUX input
* mode. For instance for U+2013,
*
* EXPECT_UNICODE(driver, 0x2013);