summaryrefslogtreecommitdiff
path: root/tests/tap_hold_configurations/tapping_force_hold
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2022-06-05 21:06:05 +0200
committerGitHub <noreply@github.com>2022-06-05 20:06:05 +0100
commit4c48760558808bb42c99934a0e2c330679d6c6cf (patch)
tree3b09b95dc6c4a71c94a9e0088120b41ea43ea903 /tests/tap_hold_configurations/tapping_force_hold
parent95d20e6d8bb1ffaf3024af793daf789ee0b75727 (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/tapping_force_hold')
-rw-r--r--tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp4
-rw-r--r--tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp40
2 files changed, 22 insertions, 22 deletions
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) {
testing::Mock::VerifyAndClearExpectations(&driver);
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))).Times(1);
+ EXPECT_REPORT(driver, (KC_A)).Times(1);
regular_key.press();
run_one_scan_loop();
expect_layer_state(0);
testing::Mock::VerifyAndClearExpectations(&driver);
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1);
+ EXPECT_EMPTY_REPORT(driver).Times(1);
regular_key.release();
run_one_scan_loop();
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) {
testing::Mock::VerifyAndClearExpectations(&driver);
/* Release mod-tap-hold key. */
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
+ EXPECT_REPORT(driver, (KC_LSFT));
mod_tap_hold_key.release();
run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver);
/* Idle for tapping term of mod tap hold key. */
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A)));
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
+ EXPECT_REPORT(driver, (KC_LSFT, KC_A));
+ EXPECT_REPORT(driver, (KC_LSFT));
+ EXPECT_EMPTY_REPORT(driver);
idle_for(TAPPING_TERM - 3);
testing::Mock::VerifyAndClearExpectations(&driver);
}
@@ -94,15 +94,15 @@ TEST_F(TappingForceHold, tap_mod_tap_key_while_mod_tap_key_is_held) {
testing::Mock::VerifyAndClearExpectations(&driver);
/* Release first mod-tap-hold key */
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
+ EXPECT_REPORT(driver, (KC_LSFT));
first_mod_tap_hold_key.release();
run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver);
/* Idle for tapping term of first mod tap hold key. */
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A)));
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
+ EXPECT_REPORT(driver, (KC_LSFT, KC_A));
+ EXPECT_REPORT(driver, (KC_LSFT));
+ EXPECT_EMPTY_REPORT(driver);
idle_for(TAPPING_TERM - 3);
testing::Mock::VerifyAndClearExpectations(&driver);
}
@@ -135,10 +135,10 @@ TEST_F(TappingForceHold, tap_regular_key_while_layer_tap_key_is_held) {
testing::Mock::VerifyAndClearExpectations(&driver);
/* Release layer-tap-hold key */
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P)));
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_P)));
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P)));
- EXPECT_CALL(driver, send_keyboard_mock(_));
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_A, KC_P));
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
layer_tap_hold_key.release();
run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver);
@@ -158,8 +158,8 @@ TEST_F(TappingForceHold, tap_mod_tap_hold_key_two_times) {
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);
mod_tap_hold_key.release();
run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver);
@@ -171,8 +171,8 @@ TEST_F(TappingForceHold, tap_mod_tap_hold_key_two_times) {
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);
mod_tap_hold_key.release();
run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver);
@@ -192,8 +192,8 @@ TEST_F(TappingForceHold, tap_mod_tap_hold_key_twice_and_hold_on_second_time) {
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);
mod_tap_hold_key.release();
run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver);
@@ -205,8 +205,8 @@ TEST_F(TappingForceHold, tap_mod_tap_hold_key_twice_and_hold_on_second_time) {
testing::Mock::VerifyAndClearExpectations(&driver);
/* Release mod-tap-hold key. */
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT)));
- EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
+ EXPECT_REPORT(driver, (KC_LSHIFT));
+ EXPECT_EMPTY_REPORT(driver);
mod_tap_hold_key.release();
run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver);