Skip to content

examples/CompileTest/ asserts platform invariants that have never been checked #3816

Closed

Description

@zackees

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:

void avr_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

  1. Decide: wire it up, or delete it. An assertion suite that cannot fail is worse than none, because it reads as coverage.
  2. 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.
  3. Add esp32_test.h / esp8266_test.h.
  4. 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.

Related: #743, #3815.

Activity

  1. added a commit that references this issue on Aug 18, 2026
    e9fff0e
  2. moved this from Triage to Done in FastLED Trackeron Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions