Add native unit tests for the Nano firmware

- New native environment: pio test -e native
- test/mocks: fake Arduino core, EEPROM and recording BROSE9323 driver
- test/test_nano: 25 tests covering every command, bitmaps, bad input,
  flip time storage and the periodic full redraw
- Board environments ignore tests so they are never uploaded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-13 00:24:13 +02:00
1 parent 80f3f78152
commit 8415dee347
8 files changed
+505 -4

No files matched your search

+8
View File
@@ -17,6 +17,14 @@ logic.
The display driver itself is in [lib/BROSE9323](../../lib/BROSE9323/README.md).
## Tests
`pio test -e native` runs the unit tests in [test/test_nano](../../test/test_nano/test_main.cpp)
on the PC. They feed serial data to the firmware and check what it asks the display to do:
every command, bitmaps, bad input, flip time storage and the full-redraw timing. The
Arduino core, EEPROM and the display driver are replaced by fakes in
[test/mocks](../../test/mocks).
## Behaviour
- **Boot:** the Nano loads the flip time from EEPROM, sets up the pins and sends `READY`.