summaryrefslogtreecommitdiffstats
path: root/tests/test_common/test_fixture.cpp
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-06-05 11:15:11 +0200
committerQMK Bot <hello@qmk.fm>2022-06-05 11:15:11 +0200
commitd6402fe9fb01efae5c4952c1a3c07cd128e81eea (patch)
tree810fef1fc2ce6c7067d5c0daa0d90a09ef94b223 /tests/test_common/test_fixture.cpp
parent08c556b78b9dc672a2aa2388bbd3fdf408e3ce98 (diff)
parent95d20e6d8bb1ffaf3024af793daf789ee0b75727 (diff)
Merge remote-tracking branch 'origin/master' into develop
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) {