diff options
author | Stefan Kerkmann <karlk90@pm.me> | 2022-12-18 21:55:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-18 21:55:14 +0100 |
commit | c2b13bd77b71ea73db12a6cda64871565036a6dc (patch) | |
tree | e24c99abb8260a929b9fcc4cba21705475514c07 /tests/auto_shift | |
parent | 7aa2d791f69244a5f17ec0d00908ec5a05d21103 (diff) |
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/auto_shift')
-rw-r--r-- | tests/auto_shift/test_auto_shift.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |