Skip to content

Commit

Permalink
Partly fix the failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hupfdule committed May 24, 2024
1 parent 2a59e11 commit e9e0acc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 26 deletions.
34 changes: 16 additions & 18 deletions tests/plugins/LongPress/autoshift/test.ktest
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,53 @@ KEYSWITCH 1 2 0

# ==============================================================================
NAME LongPress AutoShift tap
## -mh- This test fails. Why?
## Expected equality of these values:
## observed_report.Timestamp()
## Which is: 35
## expected_report.Timestamp()
## Which is: 40
## Report timestamps don't match (i=6)
# This tests that short tapping any of the keys should always produce the
# normal key

RUN 4 ms
PRESS A
RUN 1 cycle
EXPECT keyboard-report Key_A # report: { 4 }

RUN 4 ms
RELEASE A
RUN 1 cycle
EXPECT keyboard-report Key_A # report: { 4 }
EXPECT keyboard-report empty

RUN 5 ms

RUN 4 ms
PRESS B
RUN 1 cycle
EXPECT keyboard-report Key_B # report: { 5 }

RUN 4 ms
RELEASE B
RUN 1 cycle
EXPECT keyboard-report Key_B # report: { 5 }
EXPECT keyboard-report empty

RUN 5 ms

RUN 4 ms
PRESS B2
RUN 1 cycle
EXPECT keyboard-report Key_B # report: { 5 }

RUN 4 ms
RELEASE B2
RUN 1 cycle
EXPECT keyboard-report Key_B # report: { 5 }
EXPECT keyboard-report empty

RUN 5 ms

RUN 4 ms
PRESS 1
RUN 1 cycle
EXPECT keyboard-report Key_1 # report: { 1e }

RUN 4 ms
RELEASE 1
RUN 1 cycle
EXPECT keyboard-report Key_1 # report: { 1e }
EXPECT keyboard-report empty

RUN 5 ms
Expand Down Expand Up @@ -121,21 +122,18 @@ RUN 5 ms

# ==============================================================================
NAME LongPress AutoShift no modification
# Test that long-pressing a number keys produces that number as no
# auto-shift was defined for number keys and no explicit long-press
# behaviour was configured for that key either
## -mh- This test fails. Why?
## Expected equality of these values:
## observed_report.Timestamp()
## Which is: 155
## expected_report.Timestamp()
## Which is: 175
## Report timestamps don't match (i=0)

RUN 4 ms
PRESS 1
RUN 1 cycle
EXPECT keyboard-report Key_1 # report: { 1e }

# Timeout is 20ms
RUN 20 ms
EXPECT keyboard-report Key_1 # report: { 1e }

RUN 4 ms
RELEASE 1
Expand Down
11 changes: 3 additions & 8 deletions tests/plugins/LongPress/basic/test.ktest
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,16 @@ RUN 5 ms

# ==============================================================================
NAME LongPress no modification
## -mh- This test fails. Why?
## Expected equality of these values:
## observed_report.Timestamp()
## Which is: 125
## expected_report.Timestamp()
## Which is: 145
## Report timestamps don't match (i=0)
# long-pressing a key for which no long-press behaviour was configured
# should only produce the normal key value

RUN 4 ms
PRESS C
RUN 1 cycle
EXPECT keyboard-report Key_C # report: { 6 }

# Timeout is 20ms
RUN 20 ms
EXPECT keyboard-report Key_C # report: { 6 }

RUN 4 ms
RELEASE C
Expand Down

0 comments on commit e9e0acc

Please sign in to comment.