aboutsummaryrefslogtreecommitdiff
path: root/tests/basic/test_tapping.cpp
diff options
context:
space:
mode:
authorStefan Kerkmann <[email protected]>2022-12-18 21:55:14 +0100
committerGitHub <[email protected]>2022-12-18 21:55:14 +0100
commitc2b13bd77b71ea73db12a6cda64871565036a6dc (patch)
treee24c99abb8260a929b9fcc4cba21705475514c07 /tests/basic/test_tapping.cpp
parent7aa2d791f69244a5f17ec0d00908ec5a05d21103 (diff)
downloadqmk_firmware-c2b13bd77b71ea73db12a6cda64871565036a6dc.tar.gz
qmk_firmware-c2b13bd77b71ea73db12a6cda64871565036a6dc.zip
Introduce VERIFY_AND_CLEAR shorthand (#19370)
Which is just a syntactic sugar for testing::Mock::VerifyAndClearExpectations to reduce the visual clutter in unit-tests.
Diffstat (limited to 'tests/basic/test_tapping.cpp')
-rw-r--r--tests/basic/test_tapping.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/basic/test_tapping.cpp b/tests/basic/test_tapping.cpp
index faf9b9fe91..3246f9cdfb 100644
--- a/tests/basic/test_tapping.cpp
+++ b/tests/basic/test_tapping.cpp
@@ -134,7 +134,7 @@ TEST_F(Tapping, TapA_CTL_T_KeyWhileReleasingShift) {
// Shift is reported
EXPECT_REPORT(driver, (KC_LSFT));
run_one_scan_loop();
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
mod_tap_hold_key.press();
// Tapping keys does nothing on press
@@ -145,7 +145,7 @@ TEST_F(Tapping, TapA_CTL_T_KeyWhileReleasingShift) {
// Releasing shift is delayed while tapping is in progress
EXPECT_NO_REPORT(driver);
run_one_scan_loop();
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
mod_tap_hold_key.release();
// Releasing mod-tap key reports the tap and releases shift
@@ -153,7 +153,7 @@ TEST_F(Tapping, TapA_CTL_T_KeyWhileReleasingShift) {
EXPECT_REPORT(driver, (KC_P));
EXPECT_EMPTY_REPORT(driver);
run_one_scan_loop();
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Tapping, TapA_CTL_T_KeyWhileReleasingLayer) {
@@ -180,7 +180,7 @@ TEST_F(Tapping, TapA_CTL_T_KeyWhileReleasingLayer) {
// Releasing layer is delayed while tapping is in progress
EXPECT_NO_REPORT(driver);
run_one_scan_loop();
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
mod_tap_hold_key1.release();
// Releasing mod-tap key reports the tap of the layer 1 key
@@ -188,5 +188,5 @@ TEST_F(Tapping, TapA_CTL_T_KeyWhileReleasingLayer) {
EXPECT_REPORT(driver, (KC_Q));
EXPECT_EMPTY_REPORT(driver);
run_one_scan_loop();
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}