1
0
Fork 0

[Enhancement] Improvements for debounce test coverage + bug fixes for sym_defer_g and sym_eager_pr (#21667)

Co-authored-by: Nebuleon <2391500+Nebuleon@users.noreply.github.com>
This commit is contained in:
Andre Brait 2023-09-25 04:48:55 +02:00 committed by GitHub
parent dd94877ec6
commit 960d6e0d7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 458 additions and 23 deletions

View file

@ -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();
}