summaryrefslogtreecommitdiffstats
path: root/tests/test_common/test_fixture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_common/test_fixture.cpp')
-rw-r--r--tests/test_common/test_fixture.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_common/test_fixture.cpp b/tests/test_common/test_fixture.cpp
index c98a679554..5fc6964054 100644
--- a/tests/test_common/test_fixture.cpp
+++ b/tests/test_common/test_fixture.cpp
@@ -82,7 +82,7 @@ TestFixture::~TestFixture() {
testing::Mock::VerifyAndClearExpectations(&driver);
/* Verify that the matrix really is cleared */
- EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0);
+ EXPECT_NO_REPORT(driver);
idle_for(TAPPING_TERM * 10);
testing::Mock::VerifyAndClearExpectations(&driver);
@@ -101,6 +101,13 @@ void TestFixture::add_key(KeymapKey key) {
this->keymap.push_back(key);
}
+void TestFixture::tap_key(KeymapKey key, unsigned delay_ms) {
+ key.press();
+ idle_for(delay_ms);
+ key.release();
+ run_one_scan_loop();
+}
+
void TestFixture::set_keymap(std::initializer_list<KeymapKey> keys) {
this->keymap.clear();
for (auto& key : keys) {