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/auto_shift/test_auto_shift.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto_shift') diff --git a/tests/auto_shift/test_auto_shift.cpp b/tests/auto_shift/test_auto_shift.cpp index a83f436c33..1d80634b2f 100644 --- a/tests/auto_shift/test_auto_shift.cpp +++ b/tests/auto_shift/test_auto_shift.cpp @@ -37,14 +37,14 @@ TEST_F(AutoShift, key_release_before_timeout) { EXPECT_NO_REPORT(driver); regular_key.press(); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); /* Release regular key */ EXPECT_REPORT(driver, (KC_A)); EXPECT_EMPTY_REPORT(driver); regular_key.release(); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } TEST_F(AutoShift, key_release_after_timeout) { @@ -58,7 +58,7 @@ TEST_F(AutoShift, key_release_after_timeout) { EXPECT_NO_REPORT(driver); regular_key.press(); idle_for(AUTO_SHIFT_TIMEOUT); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); /* Release regular key */ EXPECT_REPORT(driver, (KC_LSFT, KC_A)); @@ -66,5 +66,5 @@ TEST_F(AutoShift, key_release_after_timeout) { EXPECT_EMPTY_REPORT(driver); regular_key.release(); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } -- cgit v1.2.3