Now that compile CI exists (#1), the higher-value testing layer is unit-testing the classes whose logic is hardware-independent. This naturally belongs in this repo rather than the arduino repo.
Candidates (no hardware needed)
MovingAverageFilter — sliding-window average, isWindowFull() behavior.
Shape / Circle / Rectangle / Ball — bounding-box & radial collision math, containment, boundary clamping.
ColorName — nearest-color (MSE) matching.
Decisions to make
- Framework: host build with GoogleTest + ArduinoFake to stub
Arduino.h, vs. AUnit on an emulator. Recommend GoogleTest + ArduinoFake for fast, hardware-free ubuntu-latest runs.
- Layout: a
test/ dir + CMake, wired into a new CI job.
Acceptance
- Tests run on push/PR in GitHub Actions (separate job from the compile workflow).
- Coverage for the three classes above.
Tracking follow-up from #1.
Now that compile CI exists (#1), the higher-value testing layer is unit-testing the classes whose logic is hardware-independent. This naturally belongs in this repo rather than the arduino repo.
Candidates (no hardware needed)
MovingAverageFilter— sliding-window average,isWindowFull()behavior.Shape/Circle/Rectangle/Ball— bounding-box & radial collision math, containment, boundary clamping.ColorName— nearest-color (MSE) matching.Decisions to make
Arduino.h, vs. AUnit on an emulator. Recommend GoogleTest + ArduinoFake for fast, hardware-freeubuntu-latestruns.test/dir + CMake, wired into a new CI job.Acceptance
Tracking follow-up from #1.