mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 21:01:31 +00:00
Update test_auto_shift.cpp
This commit is contained in:
parent
2348892402
commit
397df6f874
@ -68,3 +68,31 @@ TEST_F(AutoShift, key_release_after_timeout) {
|
|||||||
run_one_scan_loop();
|
run_one_scan_loop();
|
||||||
VERIFY_AND_CLEAR(driver);
|
VERIFY_AND_CLEAR(driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// test auto shift and space cadet interaction
|
||||||
|
// press shift, press key, release shift, release key
|
||||||
|
// the right interaction is we only get the shifted key
|
||||||
|
// the wrong interaction is we get a bracket and a shifted key
|
||||||
|
TEST_F(AutoShift, key_release_after_timeout) {
|
||||||
|
TestDriver driver;
|
||||||
|
InSequence s;
|
||||||
|
auto left_shift = KeymapKey(0, 0, 0, SC_LSPO);
|
||||||
|
auto key_a = KeymapKey(0, 1, 0, KC_A);
|
||||||
|
|
||||||
|
set_keymap({regular_key});
|
||||||
|
|
||||||
|
/* Press regular key */
|
||||||
|
EXPECT_NO_REPORT(driver);
|
||||||
|
left_shift.press();
|
||||||
|
key_a.press();
|
||||||
|
left_shift.release();
|
||||||
|
key_a.release();
|
||||||
|
VERIFY_AND_CLEAR(driver);
|
||||||
|
|
||||||
|
/* Release regular key */
|
||||||
|
EXPECT_REPORT(driver, (KC_LSFT, KC_A));
|
||||||
|
EXPECT_EMPTY_REPORT(driver);
|
||||||
|
run_one_scan_loop();
|
||||||
|
VERIFY_AND_CLEAR(driver);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user