summaryrefslogtreecommitdiffstats
path: root/tests/secure
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2022-12-18 21:55:14 +0100
committerGitHub <noreply@github.com>2022-12-18 21:55:14 +0100
commitc2b13bd77b71ea73db12a6cda64871565036a6dc (patch)
treee24c99abb8260a929b9fcc4cba21705475514c07 /tests/secure
parent7aa2d791f69244a5f17ec0d00908ec5a05d21103 (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/secure')
-rw-r--r--tests/secure/test_secure.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/secure/test_secure.cpp b/tests/secure/test_secure.cpp
index 6ca98d78f3..3162e9d5df 100644
--- a/tests/secure/test_secure.cpp
+++ b/tests/secure/test_secure.cpp
@@ -43,7 +43,7 @@ TEST_F(Secure, test_lock) {
secure_lock();
EXPECT_FALSE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_timeout) {
@@ -58,7 +58,7 @@ TEST_F(Secure, test_unlock_timeout) {
idle_for(SECURE_IDLE_TIMEOUT + 1);
EXPECT_FALSE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_request) {
@@ -80,7 +80,7 @@ TEST_F(Secure, test_unlock_request) {
tap_keys(key_a, key_b, key_c, key_d);
EXPECT_TRUE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_request_fail) {
@@ -108,7 +108,7 @@ TEST_F(Secure, test_unlock_request_fail) {
tap_keys(key_e, key_a, key_b, key_c, key_d);
EXPECT_FALSE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_request_timeout) {
@@ -124,7 +124,7 @@ TEST_F(Secure, test_unlock_request_timeout) {
EXPECT_FALSE(secure_is_unlocking());
EXPECT_FALSE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_request_fail_mid) {
@@ -151,7 +151,7 @@ TEST_F(Secure, test_unlock_request_fail_mid) {
EXPECT_FALSE(secure_is_unlocking());
EXPECT_FALSE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_request_fail_out_of_order) {
@@ -179,7 +179,7 @@ TEST_F(Secure, test_unlock_request_fail_out_of_order) {
EXPECT_FALSE(secure_is_unlocking());
EXPECT_FALSE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_request_on_layer) {
@@ -206,7 +206,7 @@ TEST_F(Secure, test_unlock_request_on_layer) {
EXPECT_TRUE(secure_is_unlocked());
EXPECT_FALSE(layer_state_is(1));
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_request_mid_stroke) {
@@ -231,7 +231,7 @@ TEST_F(Secure, test_unlock_request_mid_stroke) {
tap_keys(key_a, key_b, key_c, key_d);
EXPECT_TRUE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}
TEST_F(Secure, test_unlock_request_mods) {
@@ -256,5 +256,5 @@ TEST_F(Secure, test_unlock_request_mods) {
tap_keys(key_a, key_b, key_c, key_d);
EXPECT_TRUE(secure_is_unlocked());
- testing::Mock::VerifyAndClearExpectations(&driver);
+ VERIFY_AND_CLEAR(driver);
}