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.
The test has been through a major refactor, lifting out common parts, improving
comments, and naming.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
The new test case exercises a few corners of the system: we test that without
any layer changes, we start out on the right one. We also test that shifting to
another layer preserves the current caching behaviour. We test that the layers
are indeed looped through in activation order, rather than index order. And
finally, we test that explicitly turning off the single active layer will have
us fall back to layer 0.
We only test layer shifts, not locks and moves, because we only changed the
ordering, not how those behave otherwise.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Instead of running the tests right after compiling them, compile them all first,
then run them one after another. This way the test output is kept much closer
together, which is easier to glance over.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This adds a googletest-based test harness (with googletest pulled into
`testing/googletest`, so we have a fixed state of it), and a few test
cases that demonstrate its use.
Original work by Eric Paniagua in #898, with minor cleanups by Gergely
Nagy.
Signed-off-by: Eric Paniagua <epaniagua@google.com>
Signed-off-by: Gergely Nagy <algernon@keyboard.io>