You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
examples/CompileTest/ asserts platform invariants that have never been checked #3816
examples/CompileTest/ contains four headers of platform-invariant assertions:
apollo3_test.h
arm_test.h
avr_test.h
wasm_test.h
Each defines a function full of #error guards, e.g. avr_test.h:5-8:
voidavr_tests() {
#if FASTLED_USE_PROGMEM != 1
#error "FASTLED_USE_PROGMEM should be 1 for AVR"
#endif
None of them is compiled. There is no .ino in the directory, nothing in the tree #includes any of them, and a repo-wide grep for CompileTest across *.py, *.build, *.yml and *.toml returns nothing — no build rule, no CI job, no build-system target.
So every assertion in there is inert. avr_test.h has never verified anything about AVR.
Why this is worth fixing rather than deleting outright
The invariants are the right ones, and one of them would have caught a live inconsistency. FASTLED_USE_PROGMEM on ESP8266 has said 0 since the 2013 initial port while the platform in fact always uses PROGMEM — src/fastled_progmem.h:8 dispatches on defined(ESP8266) before the flag is ever tested, so the value moves nothing. See #743, where a user read that define and reasonably concluded their palettes were in RAM. A compiled esp8266_test.h asserting the value matched reality would have surfaced that years ago.
There is also no ESP test header at all, despite ESP being the most-used family.
Suggested scope
Decide: wire it up, or delete it. An assertion suite that cannot fail is worse than none, because it reads as coverage.
If wiring up: add a CompileTest.ino that dispatches to the right *_test.h per platform, and include the board(s) wherever examples get compiled in CI.
Add esp32_test.h / esp8266_test.h.
Reconcile the assertions against reality before enabling — at minimum the ESP8266 FASTLED_USE_PROGMEM value is currently wrong, so turning this on unmodified would fail the build.
Activity
test(spi): pin SPI chipset instantiation across the data-rate range (#…
fix(platforms): activate compile-time invariants (#3889)