From 0db11e3e66677ce9798a03453767306aa9a98f4e Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Sat, 21 Nov 2020 22:56:27 -0600 Subject: [PATCH] Update basic Escape-OneShot testcases Signed-off-by: Michael Richters --- tests/plugins/Escape-OneShot/basic/basic.ino | 6 +-- tests/plugins/Escape-OneShot/basic/test.ktest | 41 +++++++++---------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/tests/plugins/Escape-OneShot/basic/basic.ino b/tests/plugins/Escape-OneShot/basic/basic.ino index 372adca6..c963bf7f 100644 --- a/tests/plugins/Escape-OneShot/basic/basic.ino +++ b/tests/plugins/Escape-OneShot/basic/basic.ino @@ -45,9 +45,9 @@ KALEIDOSCOPE_INIT_PLUGINS(OneShot, EscapeOneShot); void setup() { Kaleidoscope.setup(); - OneShot.time_out = 50; - OneShot.hold_time_out = 20; - OneShot.double_tap_time_out = 20; + OneShot.setTimeout(50); + OneShot.setHoldTimeout(20); + OneShot.setDoubleTapTimeout(20); } void loop() { diff --git a/tests/plugins/Escape-OneShot/basic/test.ktest b/tests/plugins/Escape-OneShot/basic/test.ktest index 1ab61288..11822d25 100644 --- a/tests/plugins/Escape-OneShot/basic/test.ktest +++ b/tests/plugins/Escape-OneShot/basic/test.ktest @@ -15,34 +15,31 @@ RUN 5 ms RELEASE OSM_0 RUN 10 ms PRESS ESC -RUN 2 cycles +RUN 1 cycle EXPECT keyboard-report empty # Report should be empty RUN 5 ms RELEASE ESC RUN 1 cycle # ============================================================================== -# The testcases below are commented out because they are currently failing. - -# # ============================================================================== -# NAME EscapeOneShot cancel sticky +NAME EscapeOneShot cancel sticky -# RUN 5 ms -# PRESS OSM_0 -# RUN 1 cycle -# EXPECT keyboard-report Key_LeftShift # The report should contain `shift` -# RUN 5 ms -# RELEASE OSM_0 +RUN 5 ms +PRESS OSM_0 +RUN 1 cycle +EXPECT keyboard-report Key_LeftShift # The report should contain `shift` +RUN 5 ms +RELEASE OSM_0 -# RUN 5 ms -# PRESS OSM_0 -# RUN 5 ms -# RELEASE OSM_0 +RUN 5 ms +PRESS OSM_0 +RUN 5 ms +RELEASE OSM_0 -# RUN 50 ms -# PRESS ESC -# RUN 2 cycles -# EXPECT keyboard-report empty # Report should be empty -# RUN 5 ms -# RELEASE ESC -# RUN 1 cycle +RUN 50 ms +PRESS ESC +RUN 1 cycle +EXPECT keyboard-report empty # Report should be empty +RUN 5 ms +RELEASE ESC +RUN 1 cycle