How ericksenagodinho/clut works
CLUT is a single-header C unit-testing framework. Developers define tests and assertions, register them in a runner and suite, and execute them to produce pass/fail/skip summaries; hooks support setup and teardown, and output modes include default, GitHub Actions, and TAP. An optional runner_generator CLI reads test files and emits a runner that uses the CLUT API. Internal state and message-building support execution and reporting. The excerpts are partial, so the graph omits uncertain internal call details.
Main entry points: clut.h Runner and suites · runner_generator.c Generator CLI
Components 15
Test framework
- Test definitions
clut.h - Assertions
clut.h - Runner and suites
clut.h - Lifecycle hooks
clut.h - Test output
clut.h
Runner generator
- Generator CLI
tools/runner_generator.c - Wildcard expansion
tools/runner_generator.c - Lexer and parser
tools/runner_generator.c - Runner emitter
tools/runner_generator.c
Execution internals
- Runner state
clut.h - Message builder
clut.h
Other components
- Developer
- Terminal
- Test source files
- Generated runner
Connections 19
- Developer → Test definitions: defines tests
- Developer → Assertions: writes assertions
- Developer → Runner and suites: registers tests
- Test definitions → Runner and suites: registers tests
- Runner and suites → Lifecycle hooks: runs hooks
- Runner and suites → Assertions: runs tests
- Assertions → Runner state: records failures
- Assertions → Message builder: formats messages
- Runner and suites → Runner state: updates results
- Runner and suites → Test output: reports results
- Test output → Terminal: writes output
- Developer → Generator CLI: runs optionally
- Generator CLI → Wildcard expansion: expands patterns
- Generator CLI → Lexer and parser: parses files
- Wildcard expansion → Test source files: selects files
- Lexer and parser → Test source files: reads source
- Generator CLI → Runner emitter: emits runner
- Runner emitter → Generated runner: writes code
- Generated runner → Runner and suites: uses API