1
0
Fork 0

Introduce VERIFY_AND_CLEAR shorthand (#19370)

Which is just a syntactic sugar for
testing::Mock::VerifyAndClearExpectations to reduce the visual clutter
in unit-tests.
This commit is contained in:
Stefan Kerkmann 2022-12-18 21:55:14 +01:00 committed by GitHub
parent 7aa2d791f6
commit c2b13bd77b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 257 additions and 251 deletions

View file

@ -102,7 +102,7 @@ TEST_P(CapsWord, SingleCombo) {
EXPECT_TRUE(is_caps_word_on());
caps_word_off();
testing::Mock::VerifyAndClearExpectations(&driver);
VERIFY_AND_CLEAR(driver);
}
// Test a longer 4-key combo.
@ -123,7 +123,7 @@ TEST_P(CapsWord, LongerCombo) {
EXPECT_TRUE(is_caps_word_on());
caps_word_off();
testing::Mock::VerifyAndClearExpectations(&driver);
VERIFY_AND_CLEAR(driver);
}
// Test with two overlapping combos on regular keys:
@ -161,7 +161,7 @@ TEST_P(CapsWord, ComboRegularKeys) {
tap_key(key_a);
EXPECT_FALSE(is_caps_word_on());
testing::Mock::VerifyAndClearExpectations(&driver);
VERIFY_AND_CLEAR(driver);
}
// Test where combo chords involve tap-hold keys:
@ -194,7 +194,7 @@ TEST_P(CapsWord, ComboModTapKey) {
EXPECT_TRUE(is_caps_word_on());
caps_word_off();
testing::Mock::VerifyAndClearExpectations(&driver);
VERIFY_AND_CLEAR(driver);
}
// clang-format off