initial: composition-test v0.1.0 — 14 assertions
Phase-A.1 test-lib for lib-core.composition. Covers define_template, create, list_by_template, list_by_tag, destroy, list_templates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
33
README.md
Normal file
33
README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# lib-core.composition-test
|
||||
|
||||
Test-lib for `lib-core.composition` v0.1.0. Follows the P.2.4
|
||||
Test-Module-Pattern: exports `run_tests(ctx)` invoked by the engine's
|
||||
`--test-libs` runner; uses `engine.test.*` for TAP-style output.
|
||||
|
||||
**Version:** 0.1.0
|
||||
**Lib-ID:** lib-core.composition-test
|
||||
**Role:** test
|
||||
**Requires:** lib-core.composition v0.1.0
|
||||
**Tags:** test, composition
|
||||
|
||||
## Coverage (14 assertions)
|
||||
|
||||
| Group | Count | What |
|
||||
|---|---|---|
|
||||
| `define_template` | 4 | happy-path register, missing-id error, duplicate error, slot-block error (Phase-D trigger) |
|
||||
| `create` | 4 | returns non-nil handle, override applies, nested-flatten works, template-default survives |
|
||||
| `list_by_*` | 3 | template-list count, tag-list count, unknown-template empty |
|
||||
| `destroy` | 2 | template-index grows on second create, shrinks on destroy |
|
||||
| `list_templates` | 1 | non-empty after define |
|
||||
|
||||
## Run
|
||||
|
||||
Headless via the engine's test-libs orchestrator:
|
||||
|
||||
```bash
|
||||
~/Projects/Sporel/sporel-engine/build/sporel \
|
||||
--test-libs=lib-core.composition-test
|
||||
```
|
||||
|
||||
(or however the local dev convention runs `engine.test.*` lib-tests —
|
||||
see `engine/scripts/run-tests.sh` for the canonical invocation).
|
||||
Reference in New Issue
Block a user