From c2b13bd77b71ea73db12a6cda64871565036a6dc Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Sun, 18 Dec 2022 21:55:14 +0100 Subject: Introduce VERIFY_AND_CLEAR shorthand (#19370) Which is just a syntactic sugar for testing::Mock::VerifyAndClearExpectations to reduce the visual clutter in unit-tests. --- tests/basic/test_tapping.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/basic/test_tapping.cpp') 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); } -- cgit v1.2.3