In-language tests, compile-fail assertions, and CLI test runners (Phases 27–28).
Examples:
examples/basics/07_in_language_tests.sd— basictestblocksexamples/basics/12_compile_fail_tests.sd—expect_compile_error
test "clamp accepts in-range speed" {
assert(clamp_speed(0.5) <= 1.0);
}
Run from a project or single file:
spanda test
spanda test examples/basics/07_in_language_tests.sdValidate that inner statements fail type-checking:
test "rejects bad assignment" {
expect_compile_error {
let x: Int = "not an int";
}
assert(true);
}
The test passes when the nested block produces a compile error. If the block type-checks, the test fails.
Example:
examples/basics/12_compile_fail_tests.sd
| Flag | Purpose |
|---|---|
--json |
Machine-readable test report |
--filter <pattern> |
Run tests matching name substring |
--compile-fail |
Expect compile failure for negative tests |
spanda test tests/ --json
spanda test rover.sd --filter "health"my_robot/
├── spanda.toml
├── src/main.sd
└── tests/
└── smoke.sd
See packages.md and Spanda 101 Lesson 9.
Combine with verification and verify in pipelines:
spanda test
spanda check src/main.sd --verification-json
spanda verify src/main.sd --json --target RoverV1See ci-verify.md and verification-diagnostics.md.
- test-plan.md — coverage plan
- feature-status.md — test block stability tier