73aceec4d4c974ebe1ceb8dd30f1ed4137392eaf
8 new assertions covering v0.2 surface:
- set_tag adds entity to tag-index (assert 15)
- set_tag removes entity from tag-index (assert 16)
- set_tag is idempotent for both add and remove (asserts 17-18)
- set_tag loud-errors on non-composition entity (assert 19)
- define_template accepts container={kind="list"} (assert 20)
- define_template loud-errors on container={kind="grid"} (assert 21)
- define_template loud-errors on container with weight_max (assert 22)
- slots Loud-Error regression: still fires after v0.2 changes (assert 23)
Manifest version bumped to 0.2.0; composition dep bumped to 0.2.0.
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:
~/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).
Description
Languages
Lua
100%