sparkles:test-runner
sparkles:test-runner is the monorepo's general-purpose unittest runner (the successor of the third-party silly runner). It keeps silly's CLI (-i/-e/-v/-t/--no-colours, parallel execution, @("name") UDAs) and adds opt-in attributes that run tests in environments plain unittest blocks cannot reach:
import sparkles.test_runner.attributes : benchmark, betterC, ctfe, wasm;
@("readInteger.basic")
@betterC @safe pure nothrow @nogc
unittest { /* also compiled & run without druntime via --better-c */ }
@("levenshtein.ct")
@ctfe @safe
unittest { /* evaluated during compilation — a failure is a compile error */ }
@("sort.bench")
@benchmark @safe
unittest { /* measured with auto-scaling iterations via --bench */ }The whole runner on one page
New here, or want a single reference to keep open? The guide covers integration, writing tests, running and filtering, every attribute, and the full CLI — end to end, on one page.
How this documentation is organised
The rest of these docs follow the Diátaxis framework.
Tutorial
Learning-oriented. Wire the runner into a package and write one test of each kind.
How-to guides
Task-oriented. Short recipes for common jobs.
- Run and filter tests
- Write compile-time (
@ctfe) tests - Write
-betterC(@betterC) tests - Write WebAssembly (
@wasm) tests - Benchmark with
@benchmark - Skip tests at runtime
Reference
Information-oriented. Precise descriptions of the moving parts.
Explanation
Understanding-oriented. Why the runner is built the way it is.