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>
When starting up, we correctly set the active layer counter to one, and the
active layer stack will therefore correctly contain layer 0 as an active layer.
However, we weren't setting the `layer_state_` bitmap up properly, and as such,
`Layer.isActive(0)` was returning false, despite the layer being active as far
as lookups were concerned.
To fix this, we explicitly flip the 0th bit on in the newly introduced
`Layer.setup()` method, where the initial keymap cache update was moved to, too.
Fixes#951.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This adds a test to check that `Layer.isActive(0)` should return true, without
explicitly activating layer 0. At the moment, this is not the case, and the test
will fail.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
These are very rudimentary testcases, and already need to be rewritten, but
should serve as the first step in a process of developing better, more robust
testcases in the future.
- A single tap of a qukey alone
- A hold timeout test
- A full overlap test (subsequent key released first)
- A rollover test (subsequent key released late enough to produce primary qukey value)
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
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>
Because the Arduino build system doesn't -really- interface well with Makefiles, there's no other way to pick up Kaleidoscope or sketch changes from Make. This -does- slow down sim builds / test runs a bit.
Fixes#942
For now, this is just a wrapper around RunCycles(n), but the two could diverge
in the future. RunMillis(t) should always cause `t` milliseconds to elapse in
the simulator, regardless of how many cycles that takes.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
This test runs multiple keypresses in the same cycle, and checks to see that the
last report generated contains the correct active keycodes (and no others).
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
This commit adds versions of `SimHarness::Press()` and `SimHarness::Release()`
functions that use a `KeyAddr` parameter instead of row & column integers.
to build the test.