From 8b865a9d6445e3bce6c991224f373d71c67e87e5 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Tue, 14 Dec 2021 19:40:18 +0100 Subject: [Core] Don't send keyboard reports that propagate no changes to the host (#14065) --- tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp | 3 +-- tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/tap_hold_configurations/tapping_force_hold') 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 02416eed73..54e7daa22c 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 @@ -31,9 +31,8 @@ TEST_F(ActionLayer, LayerTapToggleWithToggleWithKeypress) { set_keymap({layer_key, regular_key, KeymapKey{1, 1, 0, KC_B}}); /* Tap TT five times . */ - /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ /* TODO: Tapping Force Hold breaks TT */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(10); + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); layer_key.press(); run_one_scan_loop(); 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 cb68429617..3ae7c4ccfd 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 @@ -60,7 +60,6 @@ TEST_F(TappingForceHold, tap_regular_key_while_mod_tap_key_is_held) { testing::Mock::VerifyAndClearExpectations(&driver); /* Idle for tapping term of mod 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_CALL(driver, send_keyboard_mock(KeyboardReport())); @@ -101,7 +100,6 @@ TEST_F(TappingForceHold, tap_mod_tap_key_while_mod_tap_key_is_held) { testing::Mock::VerifyAndClearExpectations(&driver); /* Idle for tapping term of first mod 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_CALL(driver, send_keyboard_mock(KeyboardReport())); -- cgit v1.2.3