diff options
Diffstat (limited to 'quantum/debounce/tests/sym_eager_pk_tests.cpp')
-rw-r--r-- | quantum/debounce/tests/sym_eager_pk_tests.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/quantum/debounce/tests/sym_eager_pk_tests.cpp b/quantum/debounce/tests/sym_eager_pk_tests.cpp index d9a02fe33c..39d5b10d8e 100644 --- a/quantum/debounce/tests/sym_eager_pk_tests.cpp +++ b/quantum/debounce/tests/sym_eager_pk_tests.cpp @@ -251,3 +251,21 @@ TEST_F(DebounceTest, OneKeyDelayedScan6) { time_jumps_ = true; runEvents(); } + +TEST_F(DebounceTest, AsyncTickOneKeyShort1) { + addEvents({ + /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + /* + * Debounce implementations should never read the timer more than once per invocation + */ + async_time_jumps_ = DEBOUNCE; + runEvents(); +} |