diff options
author | Stefan Kerkmann <karlk90@pm.me> | 2022-06-05 21:06:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-05 20:06:05 +0100 |
commit | 4c48760558808bb42c99934a0e2c330679d6c6cf (patch) | |
tree | 3b09b95dc6c4a71c94a9e0088120b41ea43ea903 /tests/tap_hold_configurations/retro_tapping | |
parent | 95d20e6d8bb1ffaf3024af793daf789ee0b75727 (diff) |
Apply EXPECT_REPORT and EXPECT_EMPTY_REPORT (#17311)
...convenience macros to test cases that where missed during #17284
Diffstat (limited to 'tests/tap_hold_configurations/retro_tapping')
-rw-r--r-- | tests/tap_hold_configurations/retro_tapping/test_tap_hold.cpp | 8 | ||||
-rw-r--r-- | tests/tap_hold_configurations/retro_tapping/test_tapping.cpp | 28 |
2 files changed, 18 insertions, 18 deletions
diff --git a/tests/tap_hold_configurations/retro_tapping/test_tap_hold.cpp b/tests/tap_hold_configurations/retro_tapping/test_tap_hold.cpp index b3d4e520f6..dc0de0e44d 100644 --- a/tests/tap_hold_configurations/retro_tapping/test_tap_hold.cpp +++ b/tests/tap_hold_configurations/retro_tapping/test_tap_hold.cpp @@ -42,10 +42,10 @@ TEST_F(RetroTapping, tap_and_hold_mod_tap_hold_key) { /* Release mod-tap-hold key. */ /* TODO: Why is LSHIFT send at all? */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_REPORT(driver, (KC_LSHIFT)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); diff --git a/tests/tap_hold_configurations/retro_tapping/test_tapping.cpp b/tests/tap_hold_configurations/retro_tapping/test_tapping.cpp index cd73f1e784..42139d50da 100644 --- a/tests/tap_hold_configurations/retro_tapping/test_tapping.cpp +++ b/tests/tap_hold_configurations/retro_tapping/test_tapping.cpp @@ -37,13 +37,13 @@ TEST_F(Tapping, HoldA_SHFT_T_KeyReportsShift) { idle_for(TAPPING_TERM); testing::Mock::VerifyAndClearExpectations(&driver); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_REPORT(driver, (KC_LSFT)); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -63,20 +63,20 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { testing::Mock::VerifyAndClearExpectations(&driver); /* Release mod_tap_hold key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); key_shift_hold_p_tap.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Press mod_tap_hold key again */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_REPORT(driver, (KC_P)); key_shift_hold_p_tap.press(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Release mod_tap_hold key again */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_EMPTY_REPORT(driver); key_shift_hold_p_tap.release(); idle_for(TAPPING_TERM + 1); testing::Mock::VerifyAndClearExpectations(&driver); @@ -88,8 +88,8 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { testing::Mock::VerifyAndClearExpectations(&driver); /* Release mod_tap_hold key again */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); key_shift_hold_p_tap.release(); idle_for(TAPPING_TERM + 1); testing::Mock::VerifyAndClearExpectations(&driver); @@ -102,10 +102,10 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { /* Release mod_tap_hold key again */ /* TODO: Why is KC_LSFT send? */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); key_shift_hold_p_tap.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); |