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 | |
| 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')
9 files changed, 76 insertions, 76 deletions
diff --git a/tests/tap_hold_configurations/default_mod_tap/test_tap_hold.cpp b/tests/tap_hold_configurations/default_mod_tap/test_tap_hold.cpp index ecb79c2560..687a4e0318 100644 --- a/tests/tap_hold_configurations/default_mod_tap/test_tap_hold.cpp +++ b/tests/tap_hold_configurations/default_mod_tap/test_tap_hold.cpp | |||
| @@ -133,7 +133,7 @@ TEST_F(DefaultTapHold, tap_regular_key_while_layer_tap_key_is_held) { | |||
| 133 | EXPECT_REPORT(driver, (KC_P)); | 133 | EXPECT_REPORT(driver, (KC_P)); |
| 134 | EXPECT_REPORT(driver, (KC_P, KC_A)); | 134 | EXPECT_REPORT(driver, (KC_P, KC_A)); |
| 135 | EXPECT_REPORT(driver, (KC_P)); | 135 | EXPECT_REPORT(driver, (KC_P)); |
| 136 | EXPECT_CALL(driver, send_keyboard_mock(_)); | 136 | EXPECT_EMPTY_REPORT(driver); |
| 137 | layer_tap_hold_key.release(); | 137 | layer_tap_hold_key.release(); |
| 138 | run_one_scan_loop(); | 138 | run_one_scan_loop(); |
| 139 | testing::Mock::VerifyAndClearExpectations(&driver); | 139 | testing::Mock::VerifyAndClearExpectations(&driver); |
diff --git a/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test_tap_hold.cpp b/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test_tap_hold.cpp index 5ece124c1d..319de61070 100644 --- a/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test_tap_hold.cpp +++ b/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test_tap_hold.cpp | |||
| @@ -53,10 +53,10 @@ TEST_F(IgnoreModTapInterrupt, tap_regular_key_while_mod_tap_key_is_held) { | |||
| 53 | testing::Mock::VerifyAndClearExpectations(&driver); | 53 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 54 | 54 | ||
| 55 | /* Release mod-tap-hold key */ | 55 | /* Release mod-tap-hold key */ |
| 56 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 56 | EXPECT_REPORT(driver, (KC_P)); |
| 57 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_P))); | 57 | EXPECT_REPORT(driver, (KC_A, KC_P)); |
| 58 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 58 | EXPECT_REPORT(driver, (KC_P)); |
| 59 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 59 | EXPECT_EMPTY_REPORT(driver); |
| 60 | mod_tap_hold_key.release(); | 60 | mod_tap_hold_key.release(); |
| 61 | run_one_scan_loop(); | 61 | run_one_scan_loop(); |
| 62 | testing::Mock::VerifyAndClearExpectations(&driver); | 62 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -89,10 +89,10 @@ TEST_F(IgnoreModTapInterrupt, tap_mod_tap_key_while_mod_tap_key_is_held) { | |||
| 89 | testing::Mock::VerifyAndClearExpectations(&driver); | 89 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 90 | 90 | ||
| 91 | /* Release first mod-tap-hold key */ | 91 | /* Release first mod-tap-hold key */ |
| 92 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 92 | EXPECT_REPORT(driver, (KC_P)); |
| 93 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_P))); | 93 | EXPECT_REPORT(driver, (KC_A, KC_P)); |
| 94 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 94 | EXPECT_REPORT(driver, (KC_P)); |
| 95 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 95 | EXPECT_EMPTY_REPORT(driver); |
| 96 | first_mod_tap_hold_key.release(); | 96 | first_mod_tap_hold_key.release(); |
| 97 | run_one_scan_loop(); | 97 | run_one_scan_loop(); |
| 98 | testing::Mock::VerifyAndClearExpectations(&driver); | 98 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -126,10 +126,10 @@ TEST_F(IgnoreModTapInterrupt, tap_regular_key_while_layer_tap_key_is_held) { | |||
| 126 | testing::Mock::VerifyAndClearExpectations(&driver); | 126 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 127 | 127 | ||
| 128 | /* Release layer-tap-hold key */ | 128 | /* Release layer-tap-hold key */ |
| 129 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 129 | EXPECT_REPORT(driver, (KC_P)); |
| 130 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P, regular_key.report_code))); | 130 | EXPECT_REPORT(driver, (KC_P, regular_key.report_code)); |
| 131 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 131 | EXPECT_REPORT(driver, (KC_P)); |
| 132 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 132 | EXPECT_EMPTY_REPORT(driver); |
| 133 | layer_tap_hold_key.release(); | 133 | layer_tap_hold_key.release(); |
| 134 | run_one_scan_loop(); | 134 | run_one_scan_loop(); |
| 135 | testing::Mock::VerifyAndClearExpectations(&driver); | 135 | testing::Mock::VerifyAndClearExpectations(&driver); |
diff --git a/tests/tap_hold_configurations/permissive_hold/test_one_shot_keys.cpp b/tests/tap_hold_configurations/permissive_hold/test_one_shot_keys.cpp index 64a6ff58e6..1328b5fc0f 100644 --- a/tests/tap_hold_configurations/permissive_hold/test_one_shot_keys.cpp +++ b/tests/tap_hold_configurations/permissive_hold/test_one_shot_keys.cpp | |||
| @@ -44,14 +44,14 @@ TEST_P(OneShotParametrizedTestFixture, OSMAsRegularModifierWithAdditionalKeypres | |||
| 44 | testing::Mock::VerifyAndClearExpectations(&driver); | 44 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 45 | 45 | ||
| 46 | /* Release regular key */ | 46 | /* Release regular key */ |
| 47 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(osm_key.report_code))).Times(2); | 47 | EXPECT_REPORT(driver, (osm_key.report_code)).Times(2); |
| 48 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(regular_key.report_code, osm_key.report_code))).Times(1); | 48 | EXPECT_REPORT(driver, (regular_key.report_code, osm_key.report_code)).Times(1); |
| 49 | regular_key.release(); | 49 | regular_key.release(); |
| 50 | run_one_scan_loop(); | 50 | run_one_scan_loop(); |
| 51 | testing::Mock::VerifyAndClearExpectations(&driver); | 51 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 52 | 52 | ||
| 53 | /* Release OSM */ | 53 | /* Release OSM */ |
| 54 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); | 54 | EXPECT_EMPTY_REPORT(driver).Times(1); |
| 55 | osm_key.release(); | 55 | osm_key.release(); |
| 56 | run_one_scan_loop(); | 56 | run_one_scan_loop(); |
| 57 | testing::Mock::VerifyAndClearExpectations(&driver); | 57 | testing::Mock::VerifyAndClearExpectations(&driver); |
diff --git a/tests/tap_hold_configurations/permissive_hold/test_tap_hold.cpp b/tests/tap_hold_configurations/permissive_hold/test_tap_hold.cpp index 28fb17ca66..ef8d9a9c7f 100644 --- a/tests/tap_hold_configurations/permissive_hold/test_tap_hold.cpp +++ b/tests/tap_hold_configurations/permissive_hold/test_tap_hold.cpp | |||
| @@ -46,15 +46,15 @@ TEST_F(PermissiveHold, tap_regular_key_while_mod_tap_key_is_held) { | |||
| 46 | testing::Mock::VerifyAndClearExpectations(&driver); | 46 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 47 | 47 | ||
| 48 | /* Release regular key */ | 48 | /* Release regular key */ |
| 49 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); | 49 | EXPECT_REPORT(driver, (KC_LSHIFT)); |
| 50 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT, regular_key.report_code))); | 50 | EXPECT_REPORT(driver, (KC_LSHIFT, regular_key.report_code)); |
| 51 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); | 51 | EXPECT_REPORT(driver, (KC_LSHIFT)); |
| 52 | regular_key.release(); | 52 | regular_key.release(); |
| 53 | run_one_scan_loop(); | 53 | run_one_scan_loop(); |
| 54 | testing::Mock::VerifyAndClearExpectations(&driver); | 54 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 55 | 55 | ||
| 56 | /* Release mod-tap-hold key */ | 56 | /* Release mod-tap-hold key */ |
| 57 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 57 | EXPECT_EMPTY_REPORT(driver); |
| 58 | mod_tap_hold_key.release(); | 58 | mod_tap_hold_key.release(); |
| 59 | run_one_scan_loop(); | 59 | run_one_scan_loop(); |
| 60 | testing::Mock::VerifyAndClearExpectations(&driver); | 60 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -81,15 +81,15 @@ TEST_F(PermissiveHold, tap_mod_tap_key_while_mod_tap_key_is_held) { | |||
| 81 | testing::Mock::VerifyAndClearExpectations(&driver); | 81 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 82 | 82 | ||
| 83 | /* Release second mod-tap-hold key */ | 83 | /* Release second mod-tap-hold key */ |
| 84 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); | 84 | EXPECT_REPORT(driver, (KC_LSHIFT)); |
| 85 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT, second_mod_tap_hold_key.report_code))); | 85 | EXPECT_REPORT(driver, (KC_LSHIFT, second_mod_tap_hold_key.report_code)); |
| 86 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); | 86 | EXPECT_REPORT(driver, (KC_LSHIFT)); |
| 87 | second_mod_tap_hold_key.release(); | 87 | second_mod_tap_hold_key.release(); |
| 88 | run_one_scan_loop(); | 88 | run_one_scan_loop(); |
| 89 | testing::Mock::VerifyAndClearExpectations(&driver); | 89 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 90 | 90 | ||
| 91 | /* Release first mod-tap-hold key */ | 91 | /* Release first mod-tap-hold key */ |
| 92 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 92 | EXPECT_EMPTY_REPORT(driver); |
| 93 | first_mod_tap_hold_key.release(); | 93 | first_mod_tap_hold_key.release(); |
| 94 | run_one_scan_loop(); | 94 | run_one_scan_loop(); |
| 95 | testing::Mock::VerifyAndClearExpectations(&driver); | 95 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -117,8 +117,8 @@ TEST_F(PermissiveHold, tap_regular_key_while_layer_tap_key_is_held) { | |||
| 117 | testing::Mock::VerifyAndClearExpectations(&driver); | 117 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 118 | 118 | ||
| 119 | /* Release regular key */ | 119 | /* Release regular key */ |
| 120 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(layer_key.report_code))); | 120 | EXPECT_REPORT(driver, (layer_key.report_code)); |
| 121 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 121 | EXPECT_EMPTY_REPORT(driver); |
| 122 | regular_key.release(); | 122 | regular_key.release(); |
| 123 | run_one_scan_loop(); | 123 | run_one_scan_loop(); |
| 124 | testing::Mock::VerifyAndClearExpectations(&driver); | 124 | testing::Mock::VerifyAndClearExpectations(&driver); |
diff --git a/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test_tap_hold.cpp b/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test_tap_hold.cpp index f2d576e875..ee7e707c94 100644 --- a/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test_tap_hold.cpp +++ b/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test_tap_hold.cpp | |||
| @@ -48,15 +48,15 @@ TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_regular_key_while_mod_tap_key_i | |||
| 48 | testing::Mock::VerifyAndClearExpectations(&driver); | 48 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 49 | 49 | ||
| 50 | /* Release regular key */ | 50 | /* Release regular key */ |
| 51 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 51 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 52 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); | 52 | EXPECT_REPORT(driver, (KC_LSFT, KC_A)); |
| 53 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 53 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 54 | regular_key.release(); | 54 | regular_key.release(); |
| 55 | run_one_scan_loop(); | 55 | run_one_scan_loop(); |
| 56 | testing::Mock::VerifyAndClearExpectations(&driver); | 56 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 57 | 57 | ||
| 58 | /* Release mod-tap-hold key */ | 58 | /* Release mod-tap-hold key */ |
| 59 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 59 | EXPECT_EMPTY_REPORT(driver); |
| 60 | mod_tap_hold_key.release(); | 60 | mod_tap_hold_key.release(); |
| 61 | run_one_scan_loop(); | 61 | run_one_scan_loop(); |
| 62 | testing::Mock::VerifyAndClearExpectations(&driver); | 62 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -83,15 +83,15 @@ TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_mod_tap_key_while_mod_tap_key_i | |||
| 83 | testing::Mock::VerifyAndClearExpectations(&driver); | 83 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 84 | 84 | ||
| 85 | /* Release second tap-hold key */ | 85 | /* Release second tap-hold key */ |
| 86 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 86 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 87 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); | 87 | EXPECT_REPORT(driver, (KC_LSFT, KC_A)); |
| 88 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 88 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 89 | second_mod_tap_hold_key.release(); | 89 | second_mod_tap_hold_key.release(); |
| 90 | run_one_scan_loop(); | 90 | run_one_scan_loop(); |
| 91 | testing::Mock::VerifyAndClearExpectations(&driver); | 91 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 92 | 92 | ||
| 93 | /* Release first mod-tap-hold key */ | 93 | /* Release first mod-tap-hold key */ |
| 94 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 94 | EXPECT_EMPTY_REPORT(driver); |
| 95 | first_mod_tap_hold_key.release(); | 95 | first_mod_tap_hold_key.release(); |
| 96 | run_one_scan_loop(); | 96 | run_one_scan_loop(); |
| 97 | testing::Mock::VerifyAndClearExpectations(&driver); | 97 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -119,8 +119,8 @@ TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_regular_key_while_layer_tap_key | |||
| 119 | testing::Mock::VerifyAndClearExpectations(&driver); | 119 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 120 | 120 | ||
| 121 | /* Release regular key */ | 121 | /* Release regular key */ |
| 122 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))); | 122 | EXPECT_REPORT(driver, (KC_B)); |
| 123 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 123 | EXPECT_EMPTY_REPORT(driver); |
| 124 | regular_key.release(); | 124 | regular_key.release(); |
| 125 | run_one_scan_loop(); | 125 | run_one_scan_loop(); |
| 126 | testing::Mock::VerifyAndClearExpectations(&driver); | 126 | testing::Mock::VerifyAndClearExpectations(&driver); |
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) { | |||
| 42 | 42 | ||
| 43 | /* Release mod-tap-hold key. */ | 43 | /* Release mod-tap-hold key. */ |
| 44 | /* TODO: Why is LSHIFT send at all? */ | 44 | /* TODO: Why is LSHIFT send at all? */ |
| 45 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); | 45 | EXPECT_REPORT(driver, (KC_LSHIFT)); |
| 46 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 46 | EXPECT_EMPTY_REPORT(driver); |
| 47 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 47 | EXPECT_REPORT(driver, (KC_P)); |
| 48 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 48 | EXPECT_EMPTY_REPORT(driver); |
| 49 | mod_tap_hold_key.release(); | 49 | mod_tap_hold_key.release(); |
| 50 | run_one_scan_loop(); | 50 | run_one_scan_loop(); |
| 51 | testing::Mock::VerifyAndClearExpectations(&driver); | 51 | 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) { | |||
| 37 | idle_for(TAPPING_TERM); | 37 | idle_for(TAPPING_TERM); |
| 38 | testing::Mock::VerifyAndClearExpectations(&driver); | 38 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 39 | 39 | ||
| 40 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 40 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 41 | run_one_scan_loop(); | 41 | run_one_scan_loop(); |
| 42 | testing::Mock::VerifyAndClearExpectations(&driver); | 42 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 43 | 43 | ||
| 44 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 44 | EXPECT_EMPTY_REPORT(driver); |
| 45 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 45 | EXPECT_REPORT(driver, (KC_P)); |
| 46 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 46 | EXPECT_EMPTY_REPORT(driver); |
| 47 | mod_tap_hold_key.release(); | 47 | mod_tap_hold_key.release(); |
| 48 | run_one_scan_loop(); | 48 | run_one_scan_loop(); |
| 49 | testing::Mock::VerifyAndClearExpectations(&driver); | 49 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -63,20 +63,20 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { | |||
| 63 | testing::Mock::VerifyAndClearExpectations(&driver); | 63 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 64 | 64 | ||
| 65 | /* Release mod_tap_hold key */ | 65 | /* Release mod_tap_hold key */ |
| 66 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 66 | EXPECT_REPORT(driver, (KC_P)); |
| 67 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 67 | EXPECT_EMPTY_REPORT(driver); |
| 68 | key_shift_hold_p_tap.release(); | 68 | key_shift_hold_p_tap.release(); |
| 69 | run_one_scan_loop(); | 69 | run_one_scan_loop(); |
| 70 | testing::Mock::VerifyAndClearExpectations(&driver); | 70 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 71 | 71 | ||
| 72 | /* Press mod_tap_hold key again */ | 72 | /* Press mod_tap_hold key again */ |
| 73 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 73 | EXPECT_REPORT(driver, (KC_P)); |
| 74 | key_shift_hold_p_tap.press(); | 74 | key_shift_hold_p_tap.press(); |
| 75 | run_one_scan_loop(); | 75 | run_one_scan_loop(); |
| 76 | testing::Mock::VerifyAndClearExpectations(&driver); | 76 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 77 | 77 | ||
| 78 | /* Release mod_tap_hold key again */ | 78 | /* Release mod_tap_hold key again */ |
| 79 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 79 | EXPECT_EMPTY_REPORT(driver); |
| 80 | key_shift_hold_p_tap.release(); | 80 | key_shift_hold_p_tap.release(); |
| 81 | idle_for(TAPPING_TERM + 1); | 81 | idle_for(TAPPING_TERM + 1); |
| 82 | testing::Mock::VerifyAndClearExpectations(&driver); | 82 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -88,8 +88,8 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { | |||
| 88 | testing::Mock::VerifyAndClearExpectations(&driver); | 88 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 89 | 89 | ||
| 90 | /* Release mod_tap_hold key again */ | 90 | /* Release mod_tap_hold key again */ |
| 91 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 91 | EXPECT_REPORT(driver, (KC_P)); |
| 92 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 92 | EXPECT_EMPTY_REPORT(driver); |
| 93 | key_shift_hold_p_tap.release(); | 93 | key_shift_hold_p_tap.release(); |
| 94 | idle_for(TAPPING_TERM + 1); | 94 | idle_for(TAPPING_TERM + 1); |
| 95 | testing::Mock::VerifyAndClearExpectations(&driver); | 95 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -102,10 +102,10 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { | |||
| 102 | 102 | ||
| 103 | /* Release mod_tap_hold key again */ | 103 | /* Release mod_tap_hold key again */ |
| 104 | /* TODO: Why is KC_LSFT send? */ | 104 | /* TODO: Why is KC_LSFT send? */ |
| 105 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 105 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 106 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 106 | EXPECT_EMPTY_REPORT(driver); |
| 107 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 107 | EXPECT_REPORT(driver, (KC_P)); |
| 108 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 108 | EXPECT_EMPTY_REPORT(driver); |
| 109 | key_shift_hold_p_tap.release(); | 109 | key_shift_hold_p_tap.release(); |
| 110 | run_one_scan_loop(); | 110 | run_one_scan_loop(); |
| 111 | testing::Mock::VerifyAndClearExpectations(&driver); | 111 | testing::Mock::VerifyAndClearExpectations(&driver); |
diff --git a/tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp b/tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp index a67c6629e0..965c702d7a 100644 --- a/tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp +++ b/tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp | |||
| @@ -66,13 +66,13 @@ TEST_F(ActionLayer, LayerTapToggleWithToggleWithKeypress) { | |||
| 66 | 66 | ||
| 67 | testing::Mock::VerifyAndClearExpectations(&driver); | 67 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 68 | 68 | ||
| 69 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))).Times(1); | 69 | EXPECT_REPORT(driver, (KC_A)).Times(1); |
| 70 | regular_key.press(); | 70 | regular_key.press(); |
| 71 | run_one_scan_loop(); | 71 | run_one_scan_loop(); |
| 72 | expect_layer_state(0); | 72 | expect_layer_state(0); |
| 73 | testing::Mock::VerifyAndClearExpectations(&driver); | 73 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 74 | 74 | ||
| 75 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); | 75 | EXPECT_EMPTY_REPORT(driver).Times(1); |
| 76 | regular_key.release(); | 76 | regular_key.release(); |
| 77 | run_one_scan_loop(); | 77 | run_one_scan_loop(); |
| 78 | expect_layer_state(0); | 78 | expect_layer_state(0); |
diff --git a/tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp b/tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp index 04e66a02d9..2671862f2d 100644 --- a/tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp +++ b/tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp | |||
| @@ -54,15 +54,15 @@ TEST_F(TappingForceHold, tap_regular_key_while_mod_tap_key_is_held) { | |||
| 54 | testing::Mock::VerifyAndClearExpectations(&driver); | 54 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 55 | 55 | ||
| 56 | /* Release mod-tap-hold key. */ | 56 | /* Release mod-tap-hold key. */ |
| 57 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 57 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 58 | mod_tap_hold_key.release(); | 58 | mod_tap_hold_key.release(); |
| 59 | run_one_scan_loop(); | 59 | run_one_scan_loop(); |
| 60 | testing::Mock::VerifyAndClearExpectations(&driver); | 60 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 61 | 61 | ||
| 62 | /* Idle for tapping term of mod tap hold key. */ | 62 | /* Idle for tapping term of mod tap hold key. */ |
| 63 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); | 63 | EXPECT_REPORT(driver, (KC_LSFT, KC_A)); |
| 64 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 64 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 65 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 65 | EXPECT_EMPTY_REPORT(driver); |
| 66 | idle_for(TAPPING_TERM - 3); | 66 | idle_for(TAPPING_TERM - 3); |
| 67 | testing::Mock::VerifyAndClearExpectations(&driver); | 67 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 68 | } | 68 | } |
| @@ -94,15 +94,15 @@ TEST_F(TappingForceHold, tap_mod_tap_key_while_mod_tap_key_is_held) { | |||
| 94 | testing::Mock::VerifyAndClearExpectations(&driver); | 94 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 95 | 95 | ||
| 96 | /* Release first mod-tap-hold key */ | 96 | /* Release first mod-tap-hold key */ |
| 97 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 97 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 98 | first_mod_tap_hold_key.release(); | 98 | first_mod_tap_hold_key.release(); |
| 99 | run_one_scan_loop(); | 99 | run_one_scan_loop(); |
| 100 | testing::Mock::VerifyAndClearExpectations(&driver); | 100 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 101 | 101 | ||
| 102 | /* Idle for tapping term of first mod tap hold key. */ | 102 | /* Idle for tapping term of first mod tap hold key. */ |
| 103 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); | 103 | EXPECT_REPORT(driver, (KC_LSFT, KC_A)); |
| 104 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); | 104 | EXPECT_REPORT(driver, (KC_LSFT)); |
| 105 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 105 | EXPECT_EMPTY_REPORT(driver); |
| 106 | idle_for(TAPPING_TERM - 3); | 106 | idle_for(TAPPING_TERM - 3); |
| 107 | testing::Mock::VerifyAndClearExpectations(&driver); | 107 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 108 | } | 108 | } |
| @@ -135,10 +135,10 @@ TEST_F(TappingForceHold, tap_regular_key_while_layer_tap_key_is_held) { | |||
| 135 | testing::Mock::VerifyAndClearExpectations(&driver); | 135 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 136 | 136 | ||
| 137 | /* Release layer-tap-hold key */ | 137 | /* Release layer-tap-hold key */ |
| 138 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 138 | EXPECT_REPORT(driver, (KC_P)); |
| 139 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_P))); | 139 | EXPECT_REPORT(driver, (KC_A, KC_P)); |
| 140 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 140 | EXPECT_REPORT(driver, (KC_P)); |
| 141 | EXPECT_CALL(driver, send_keyboard_mock(_)); | 141 | EXPECT_EMPTY_REPORT(driver); |
| 142 | layer_tap_hold_key.release(); | 142 | layer_tap_hold_key.release(); |
| 143 | run_one_scan_loop(); | 143 | run_one_scan_loop(); |
| 144 | testing::Mock::VerifyAndClearExpectations(&driver); | 144 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -158,8 +158,8 @@ TEST_F(TappingForceHold, tap_mod_tap_hold_key_two_times) { | |||
| 158 | testing::Mock::VerifyAndClearExpectations(&driver); | 158 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 159 | 159 | ||
| 160 | /* Release mod-tap-hold key. */ | 160 | /* Release mod-tap-hold key. */ |
| 161 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 161 | EXPECT_REPORT(driver, (KC_P)); |
| 162 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 162 | EXPECT_EMPTY_REPORT(driver); |
| 163 | mod_tap_hold_key.release(); | 163 | mod_tap_hold_key.release(); |
| 164 | run_one_scan_loop(); | 164 | run_one_scan_loop(); |
| 165 | testing::Mock::VerifyAndClearExpectations(&driver); | 165 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -171,8 +171,8 @@ TEST_F(TappingForceHold, tap_mod_tap_hold_key_two_times) { | |||
| 171 | testing::Mock::VerifyAndClearExpectations(&driver); | 171 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 172 | 172 | ||
| 173 | /* Release mod-tap-hold key. */ | 173 | /* Release mod-tap-hold key. */ |
| 174 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 174 | EXPECT_REPORT(driver, (KC_P)); |
| 175 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 175 | EXPECT_EMPTY_REPORT(driver); |
| 176 | mod_tap_hold_key.release(); | 176 | mod_tap_hold_key.release(); |
| 177 | run_one_scan_loop(); | 177 | run_one_scan_loop(); |
| 178 | testing::Mock::VerifyAndClearExpectations(&driver); | 178 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -192,8 +192,8 @@ TEST_F(TappingForceHold, tap_mod_tap_hold_key_twice_and_hold_on_second_time) { | |||
| 192 | testing::Mock::VerifyAndClearExpectations(&driver); | 192 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 193 | 193 | ||
| 194 | /* Release mod-tap-hold key. */ | 194 | /* Release mod-tap-hold key. */ |
| 195 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); | 195 | EXPECT_REPORT(driver, (KC_P)); |
| 196 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 196 | EXPECT_EMPTY_REPORT(driver); |
| 197 | mod_tap_hold_key.release(); | 197 | mod_tap_hold_key.release(); |
| 198 | run_one_scan_loop(); | 198 | run_one_scan_loop(); |
| 199 | testing::Mock::VerifyAndClearExpectations(&driver); | 199 | testing::Mock::VerifyAndClearExpectations(&driver); |
| @@ -205,8 +205,8 @@ TEST_F(TappingForceHold, tap_mod_tap_hold_key_twice_and_hold_on_second_time) { | |||
| 205 | testing::Mock::VerifyAndClearExpectations(&driver); | 205 | testing::Mock::VerifyAndClearExpectations(&driver); |
| 206 | 206 | ||
| 207 | /* Release mod-tap-hold key. */ | 207 | /* Release mod-tap-hold key. */ |
| 208 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); | 208 | EXPECT_REPORT(driver, (KC_LSHIFT)); |
| 209 | EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); | 209 | EXPECT_EMPTY_REPORT(driver); |
| 210 | mod_tap_hold_key.release(); | 210 | mod_tap_hold_key.release(); |
| 211 | run_one_scan_loop(); | 211 | run_one_scan_loop(); |
| 212 | testing::Mock::VerifyAndClearExpectations(&driver); | 212 | testing::Mock::VerifyAndClearExpectations(&driver); |
