Host tests¶
mise run test
From .mise/tasks/:
testbuilds the suites undertest/with the systemccand runs them on the Mac, oneokline per test.
mise run test alone also needs the system cc, unpinned.
It compiles with the SDK's warning flags as errors,
plus the address and undefined-behavior sanitizers the device cannot run,
and needs no device.
A failed assertion stops the task non-zero, naming its file and line,
after the ok lines of the tests before it.
Writing a test¶
The core, src/core/, includes no Flipper header, so it builds on the Mac.
A suite test/<name>_test.c is built with src/core/<name>.c and every test/*_fake.c:
- each test is a
static void test_…(void)function onassert; mainruns each throughtest_runfromtest/test.h, which printsok <name>;- code that sends keys gets a
Transportfromtransport_fake_allocintest/transport_fake.h, reads back each press and release withtransport_fake_countandtransport_fake_event.
A .c file under test/ builds into no package, and lint checks it.
What only the device checks¶
The platform layer, src/platform/, and the view, src/ui/, run only on the device:
the Bluetooth and USB links, the buttons, the screen, the options' file on the SD card, the buzz and the flash, the dolphin's XP,
and what the keys do in Claude Code.