Add testcases for Redial with rollover

I also simplified the Redial test suite sketch to make it easier to read.

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/987/head
Michael Richters 4 years ago
parent 10ebb0c942
commit 46736361b8
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -21,21 +21,19 @@
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G,
Key_PageDown, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Escape,
Key_LeftControl, Key_Backspace, Key_LeftGui, Key_LeftShift,
XXX,
Key_Redial, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip,
Key_Enter, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals,
Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote,
Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus,
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
XXX
Key_A, Key_Redial, Key_X, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___,
___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___,
___
),
)
// *INDENT-ON*

@ -1,74 +1,105 @@
VERSION 1
KEYSWITCH Redial 0 9
KEYSWITCH A 2 1
KEYSWITCH X 3 2
KEYSWITCH Redial 0 1
KEYSWITCH A 0 0
KEYSWITCH X 0 2
# ==============================================================================
NAME Redial with no prior keypress
RUN 10 ms
RUN 5 ms
PRESS Redial
RUN 25ms
RELEASE Redial
RUN 10 ms
RELEASE Redial
RUN 5 ms
EXPECT no keyboard-reports # There should be no HID report without a prior keypress"
# ==============================================================================
NAME RedialFirstKey
RUN 10 ms
RUN 5 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_A # Report should contain only an A
RUN 25 ms
RUN 10 ms
RELEASE A
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
RUN 10ms
RUN 10 ms
PRESS Redial
RUN 1 cycle
EXPECT keyboard-report Key_A # Report should contain only an A
RUN 25 ms
RUN 10 ms
RELEASE Redial
RUN 1 cycle
EXPECT keyboard-report empty # keyboard report should be empty
# ==============================================================================
NAME Redial next key
RUN 10 ms
PRESS X
RUN 1 cycle
EXPECT keyboard-report Key_X # Report should contain only an X
RUN 25 ms
RUN 10 ms
RELEASE X
RUN 1 cycle
EXPECT keyboard-report empty # keyboard report should be empty
RUN 10 ms
PRESS Redial
RUN 1 cycle
EXPECT keyboard-report Key_X # Report should contain only an X
RUN 10 ms
RELEASE Redial
RUN 1 cycle
EXPECT keyboard-report empty # keyboard report should be empty
# ==============================================================================
NAME Redial rollover
RUN 10 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_A # Report should contain only an A
RUN 10 ms
PRESS Redial
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
EXPECT keyboard-report Key_A # Report should contain only an A
RUN 10 ms
RELEASE A
RUN 10 ms
RELEASE Redial
RUN 1 cycle
EXPECT keyboard-report empty # keyboard report should be empty
# ==============================================================================
NAME Redial rollover right to left
RUN 10 ms
PRESS X
RUN 1 cycle
EXPECT keyboard-report Key_X # Report should contain only an X
RUN 25 ms
RELEASE Redial
RUN 10 ms
PRESS Redial
RUN 1 cycle
EXPECT keyboard-report empty # Report should be empty
EXPECT keyboard-report Key_X # Report should contain only an X
RUN 10 ms
RELEASE X
RUN 10 ms
RELEASE Redial
RUN 1 cycle
EXPECT keyboard-report empty # keyboard report should be empty

Loading…
Cancel
Save