In preparation for validation of report types other than just Keyboard, rename
these keyboard-specific functions (and variables) to have appropriately
keyboard-specific names.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
This adds a way to add a delay (advancing the virtual clock) in a simulator test
script without running Kaleidoscope cycles.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
This makes it possible for a testcase to include source files from plugin
directories. When the plugins got pulled out of the main Kaleidoscope source
dir, plugin header files became unavailable to testcases, but these files are
useful in some instances.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
The greedy match was including whitespace if more than one space character
separated the "keyswitch" token and the first coordinate.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
Even if a testcase shouldn't generate any HID reports, we should verify that it
didn't. If it does generate a report when there are none expected, that test
should fail.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
This replaces the `CHECK_EXPECTED_REPORTS()` macro with a new `CheckReports()`
method. The new method verifies both the content and timestamps of expected
keyboard reports, and provides more output on failures (including details of any
unexpected reports).
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
class for each generated test file. removing
this makes test definitions simpler
Also, grow support for multiple tests within a script
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
This change adds a set of functions to the `VirtualDeviceTest` class to make it
possible to write simpler testcases involving timed keyswitch press and release
events along with corresponding keyboard HID reports.
Other outputs (Consumer & System Control HID reports, LEDs, et cetera) are
not yet included.
Instead of ignoring the return value of RUN_ALL_TESTS, exit with the same status
code. This will make failing tests actually fail the build, instead of logging
the error, and then exiting successfully.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This change adds the keycodes for keyboard modifier keys to the vector returned
by KeyboardReport::ActiveKeycodes(). Also, a simple method for getting the
modifiers byte from a keyboard hid report.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>