Skip to content

Add ECS regression unit coverage#201

Draft
cursor[bot] wants to merge 3 commits into
next-gen-5from
cursor/missing-test-coverage-4724
Draft

Add ECS regression unit coverage#201
cursor[bot] wants to merge 3 commits into
next-gen-5from
cursor/missing-test-coverage-4724

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 8, 2026

Summary

  • Add unit_ecs coverage for the newly always-built ECS module.
  • Fix ECS_Count() to report live entities after destruction using the vendored EnTT entity storage live-list count.
  • Document the new unit target in tests/README.md.

Risky behavior now covered

  • ECS lifecycle before/after init and shutdown.
  • Component lookup, setters/getters, bounded tag handling, iteration filters, and motion integration.
  • Destroyed entities no longer remaining visible through ECS_Count().

Test files added/updated

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

Why this reduces regression risk

Recent feature-flag cleanup made ECS part of the default client build path, increasing blast radius for client frame motion and Lua-facing gameplay helpers. These tests pin down the core ECS API contracts without requiring renderer, game data, or runtime UI state.

Validation

  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=ON
  • cmake --build build-coverage-tests --target unit_ecs
  • ctest --test-dir build-coverage-tests -R unit_ecs --output-on-failure
Open in Web View Automation 

cursoragent and others added 3 commits May 8, 2026 10:04
Co-authored-by: Tim Fox <timfox@outlook.com>
Co-authored-by: Tim Fox <timfox@outlook.com>
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