Skip to content

test: cover ECS component API#256

Draft
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/missing-test-coverage-32bd
Draft

test: cover ECS component API#256
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/missing-test-coverage-32bd

Conversation

@cursor

@cursor cursor Bot commented Jun 12, 2026

Copy link
Copy Markdown

Summary

  • Adds a focused unit_ecs CTest binary for the new ECS C ABI.
  • Covers lifecycle safety, component defaults, setter auto-add behavior, bounded tag handling, motion stepping filters, ECS_Each component filtering, and component name lookup.

Risky behavior now covered

  • Shared ECS component state used by gameplay/scripting can regress in defaults, filters, or motion integration without requiring a full game-data runtime.

Test files added/updated

  • Added tests/unit/test_ecs.cpp
  • Updated CMakeLists.txt to register unit_ecs

Why this materially reduces regression risk

  • The ECS module is a shared C++ core behind a C ABI. These tests verify the public ABI contracts most likely to affect gameplay logic and Lua bindings while remaining deterministic and independent.

Validation

  • cmake --build build-test --target unit_ecs
  • ctest --test-dir build-test -R '^unit_ecs$' --output-on-failure
  • cmake --build build-test --target unit_macros unit_qmath unit_surfaceflags unit_qhelpers unit_crc unit_pathutil unit_msg unit_info unit_cm_bounds unit_parse unit_endian unit_vm_native_module unit_ecs && ctest --test-dir build-test -R '^unit_(macros|qmath|surfaceflags|qhelpers|crc|pathutil|msg|info|cm_bounds|parse|endian|vm_native_module|ecs)$' --output-on-failure
Open in Web View Automation 

Co-authored-by: Tim Fox <timfox@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant