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/autocorrect | |
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/autocorrect')
-rw-r--r-- | tests/autocorrect/test_autocorrect.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/autocorrect/test_autocorrect.cpp b/tests/autocorrect/test_autocorrect.cpp index 509c1c9ea4..9b8db3d68d 100644 --- a/tests/autocorrect/test_autocorrect.cpp +++ b/tests/autocorrect/test_autocorrect.cpp @@ -51,7 +51,7 @@ TEST_F(AutoCorrect, OnOffToggle) { autocorrect_toggle(); EXPECT_EQ(autocorrect_is_enabled(), true); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } // Test that typing "fales" autocorrects to "false" @@ -80,7 +80,7 @@ TEST_F(AutoCorrect, fales_to_false_autocorrection) { TapKeys(key_f, key_a, key_l, key_e, key_s); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } // Test that typing "fales" doesn't autocorrect if disabled @@ -109,7 +109,7 @@ TEST_F(AutoCorrect, fales_disabled_autocorrect) { TapKeys(key_f, key_a, key_l, key_e, key_s); autocorrect_enable(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } // Test that typing "falsify" doesn't autocorrect if disabled @@ -139,7 +139,7 @@ TEST_F(AutoCorrect, falsify_should_not_autocorrect) { TapKeys(key_f, key_a, key_l, key_s, key_i, key_f, key_y); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } // Test that typing "ture" autocorrect to "true" @@ -169,7 +169,7 @@ TEST_F(AutoCorrect, ture_to_true_autocorrect) { TapKeys(key_space, key_t_code, key_u, key_r, key_e); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } // Test that typing "overture" does not autocorrect @@ -200,5 +200,5 @@ TEST_F(AutoCorrect, overture_should_not_autocorrect) { TapKeys(key_o, key_v, key_e, key_r, key_t_code, key_u, key_r, key_e); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } |