How danielesavino/fastest works
fastest is a macro-based C testing framework with a Python extension and orchestration package. Its main workflow registers custom tests before main, executes them through the scheduler, and exposes results to C or Python callers. QUICKTEST is a separate immediate-result mode. Python adds repeated benchmark comparisons and optional plotting. The tree and excerpts show the Python-to-extension API and registration macros; scheduler implementation and several runtime details were not sampled, so those links rely on README statements.
Main entry points: runner.py Runner and comparisons · custom_tests.h Custom test macros · quick_tests.h Quick tests · pybind.cpp Python extension
Components 14
C test runtime
- Custom test macros
include/fastest/custom_tests.h - Quick tests
include/fastest/quick_tests.h - Test types and flags
include/fastest/tests.h - Test scheduler
src/test_list.c - C result logging
src/logging.c
Python API
- Python extension
bindings/pybind.cpp - Package facade
fastest_py/src/fastest/__init__.py - Python flags
fastest_py/src/fastest/flags.py - Python formatting
fastest_py/src/fastest/logging.py
Benchmarking
- Runner and comparisons
fastest_py/src/fastest/runner.py - Benchmark plotting
fastest_py/src/fastest/plotting.py
Other components
- C test author
- Python caller
- Matplotlib
Connections 16
- C test author → Custom test macros: declares tests
README.md - Custom test macros → Test scheduler: registers tests
include/fastest/custom_tests.h - C test author → Test scheduler: runs tests
README.md - C test author → Quick tests: runs expressions
README.md - Quick tests → Test types and flags: sets test output
include/fastest/quick_tests.h - Quick tests → C result logging: logs results
- Custom test macros → Test types and flags: creates outputs
include/fastest/custom_tests.h - Python caller → Package facade: calls package
README.md - Package facade → Runner and comparisons: delegates to
fastest_py/src/fastest/__init__.py - Runner and comparisons → Python extension: calls backend
README.md - Python extension → Test scheduler: queries and runs
bindings/pybind.cpp - Python extension → Test types and flags: serializes results
bindings/pybind.cpp - Runner and comparisons → Python flags: formats test status
fastest_py/src/fastest/runner.py - Python flags → Python formatting: colors status
fastest_py/src/fastest/flags.py - Runner and comparisons → Benchmark plotting: supplies comparisons
fastest_py/src/fastest/plotting.py - Benchmark plotting → Matplotlib: renders charts
fastest_py/src/fastest/plotting.py