diff options
Diffstat (limited to 'tests/basic/test_keypress.cpp')
-rw-r--r-- | tests/basic/test_keypress.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/basic/test_keypress.cpp b/tests/basic/test_keypress.cpp index 6d5b502a00..34682654b0 100644 --- a/tests/basic/test_keypress.cpp +++ b/tests/basic/test_keypress.cpp @@ -175,23 +175,23 @@ TEST_F(KeyPress, PressPlusEqualReleaseBeforePress) { EXPECT_REPORT(driver, (KC_LEFT_SHIFT)); EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_EQUAL)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_plus.release(); EXPECT_REPORT(driver, (KC_LEFT_SHIFT)); EXPECT_EMPTY_REPORT(driver); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_eql.press(); EXPECT_REPORT(driver, (key_eql.report_code)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_eql.release(); EXPECT_EMPTY_REPORT(driver); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } TEST_F(KeyPress, PressPlusEqualDontReleaseBeforePress) { @@ -206,24 +206,24 @@ TEST_F(KeyPress, PressPlusEqualDontReleaseBeforePress) { EXPECT_REPORT(driver, (KC_LEFT_SHIFT)); EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_EQUAL)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_eql.press(); EXPECT_EMPTY_REPORT(driver); EXPECT_REPORT(driver, (KC_EQUAL)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_plus.release(); // BUG: Should really still return KC_EQUAL, but this is fine too EXPECT_EMPTY_REPORT(driver); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_eql.release(); EXPECT_NO_REPORT(driver); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } TEST_F(KeyPress, PressEqualPlusReleaseBeforePress) { @@ -237,24 +237,24 @@ TEST_F(KeyPress, PressEqualPlusReleaseBeforePress) { key_eql.press(); EXPECT_REPORT(driver, (KC_EQUAL)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_eql.release(); EXPECT_EMPTY_REPORT(driver); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_plus.press(); EXPECT_REPORT(driver, (KC_LEFT_SHIFT)); EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_EQUAL)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_plus.release(); EXPECT_REPORT(driver, (KC_LEFT_SHIFT)); EXPECT_EMPTY_REPORT(driver); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } TEST_F(KeyPress, PressEqualPlusDontReleaseBeforePress) { @@ -268,7 +268,7 @@ TEST_F(KeyPress, PressEqualPlusDontReleaseBeforePress) { key_eql.press(); EXPECT_REPORT(driver, (KC_EQUAL)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_plus.press(); // BUG: The sequence is a bit strange, but it works, the end result is that @@ -277,16 +277,16 @@ TEST_F(KeyPress, PressEqualPlusDontReleaseBeforePress) { EXPECT_REPORT(driver, (KC_LEFT_SHIFT)); EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_EQUAL)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_eql.release(); // I guess it's fine to still report shift here EXPECT_REPORT(driver, (KC_LEFT_SHIFT)); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); key_plus.release(); EXPECT_EMPTY_REPORT(driver); run_one_scan_loop(); - testing::Mock::VerifyAndClearExpectations(&driver); + VERIFY_AND_CLEAR(driver); } |