From 4c48760558808bb42c99934a0e2c330679d6c6cf Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Sun, 5 Jun 2022 21:06:05 +0200 Subject: Apply EXPECT_REPORT and EXPECT_EMPTY_REPORT (#17311) ...convenience macros to test cases that where missed during #17284 --- .../default_mod_tap/test_tap_hold.cpp | 2 +- .../ignore_mod_tap_interrupt/test_tap_hold.cpp | 24 ++++++------- .../permissive_hold/test_one_shot_keys.cpp | 6 ++-- .../permissive_hold/test_tap_hold.cpp | 20 +++++------ .../test_tap_hold.cpp | 20 +++++------ .../retro_tapping/test_tap_hold.cpp | 8 ++--- .../retro_tapping/test_tapping.cpp | 28 +++++++-------- .../tapping_force_hold/test_action_layer.cpp | 4 +-- .../tapping_force_hold/test_tap_hold.cpp | 40 +++++++++++----------- 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) { EXPECT_REPORT(driver, (KC_P)); EXPECT_REPORT(driver, (KC_P, KC_A)); EXPECT_REPORT(driver, (KC_P)); - EXPECT_CALL(driver, send_keyboard_mock(_)); + EXPECT_EMPTY_REPORT(driver); layer_tap_hold_key.release(); run_one_scan_loop(); 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) { 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(KC_A, KC_P))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_REPORT(driver, (KC_A, KC_P)); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -89,10 +89,10 @@ TEST_F(IgnoreModTapInterrupt, 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_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(KeyboardReport())); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_REPORT(driver, (KC_A, KC_P)); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); first_mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -126,10 +126,10 @@ TEST_F(IgnoreModTapInterrupt, 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_P, regular_key.report_code))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_REPORT(driver, (KC_P, regular_key.report_code)); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); layer_tap_hold_key.release(); run_one_scan_loop(); 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 testing::Mock::VerifyAndClearExpectations(&driver); /* Release regular key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(osm_key.report_code))).Times(2); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(regular_key.report_code, osm_key.report_code))).Times(1); + EXPECT_REPORT(driver, (osm_key.report_code)).Times(2); + EXPECT_REPORT(driver, (regular_key.report_code, osm_key.report_code)).Times(1); regular_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Release OSM */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + EXPECT_EMPTY_REPORT(driver).Times(1); osm_key.release(); run_one_scan_loop(); 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) { testing::Mock::VerifyAndClearExpectations(&driver); /* Release regular key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT, regular_key.report_code))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + EXPECT_REPORT(driver, (KC_LSHIFT)); + EXPECT_REPORT(driver, (KC_LSHIFT, regular_key.report_code)); + EXPECT_REPORT(driver, (KC_LSHIFT)); regular_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Release mod-tap-hold key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_EMPTY_REPORT(driver); mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -81,15 +81,15 @@ TEST_F(PermissiveHold, tap_mod_tap_key_while_mod_tap_key_is_held) { testing::Mock::VerifyAndClearExpectations(&driver); /* Release second mod-tap-hold key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT, second_mod_tap_hold_key.report_code))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + EXPECT_REPORT(driver, (KC_LSHIFT)); + EXPECT_REPORT(driver, (KC_LSHIFT, second_mod_tap_hold_key.report_code)); + EXPECT_REPORT(driver, (KC_LSHIFT)); second_mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Release first mod-tap-hold key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_EMPTY_REPORT(driver); first_mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -117,8 +117,8 @@ TEST_F(PermissiveHold, tap_regular_key_while_layer_tap_key_is_held) { testing::Mock::VerifyAndClearExpectations(&driver); /* Release regular key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(layer_key.report_code))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_REPORT(driver, (layer_key.report_code)); + EXPECT_EMPTY_REPORT(driver); regular_key.release(); run_one_scan_loop(); 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 testing::Mock::VerifyAndClearExpectations(&driver); /* Release regular key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_LSFT)); regular_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Release mod-tap-hold key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_EMPTY_REPORT(driver); mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -83,15 +83,15 @@ TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_mod_tap_key_while_mod_tap_key_i testing::Mock::VerifyAndClearExpectations(&driver); /* Release second tap-hold key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_LSFT)); second_mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Release first mod-tap-hold key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_EMPTY_REPORT(driver); first_mod_tap_hold_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -119,8 +119,8 @@ TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_regular_key_while_layer_tap_key testing::Mock::VerifyAndClearExpectations(&driver); /* Release regular key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); regular_key.release(); run_one_scan_loop(); 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) { /* 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); 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); -- cgit v1.2.3