Add Lua-behavior and Game::Bake test suites#86
Merged
Conversation
Two engine-linked ctest binaries on top of the existing smoke / asset / ECS / EventBus suites: - OctarineLuaBehaviorTest — calls bound component methods from Lua and verifies the C++ side mutated: HealthComponent damage/heal round-trip, current_health clamping setter, PositionComponent.value write, registry has_/get_ accessors, and LuaBinding<HealthComponent>::fromLua defaults. Catches the "binding compiles but method does nothing" class that the drift check can't. - OctarineGameBakeTest — headless `Game game;` smoke (no window/renderer), Game::Bake end-to-end against tests/fixtures/bake-project, and SceneAssetScanner::CollectRefs provenance + cross-scene delta. Cleans up all bake artifacts (manifest + asset_bundle.pak + atlases/) so the source tree stays clean on CI. Both link octarine_engine (the per-layer engine lib), matching how LuaApiSmokeTest / AssetPipelineTest wire in. Shared Check/CheckEq/ ReportSummary helpers live in the existing tests/TestHarness.h, extended here with CheckEq + ReportSummary. The ECS and EventBus suites from the original branch are dropped — equivalent coverage already landed on main (EcsRegistryTest / EcsHierarchyTest / EventBusTest via the headless-test PR). Verified: editor-debug build clean; both suites green via ctest, every check exercised (bake end-to-end runs, not skipped).
5158e3a to
89a824a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebased onto current
mainand reduced to the two test suitesmaindoesn't already have. The original branch (cut at #60) also added ECS + EventBus suites and aTestHelpers.h, but equivalent coverage landed on main since then (EcsRegistryTest/EcsHierarchyTest/EventBusTest+TestHarness.hvia the headless-test PR), so those parts are dropped as redundant.Two engine-linked ctest binaries:
HealthComponentdamage/heal round-trip,current_healthclamping setter,PositionComponent.valuewrite,registry.has_/get_accessors, andLuaBinding<HealthComponent>::fromLuadefaults.Game game;smoke (no window/renderer),Game::Bakeend-to-end againsttests/fixtures/bake-project, andSceneAssetScanner::CollectRefsprovenance + cross-scene delta. Cleans up every bake artifact (manifest +asset_bundle.pak+atlases/) so the source tree stays clean on CI.Both link
octarine_engine, matching howLuaApiSmokeTest/AssetPipelineTestwire in. SharedCheck/CheckEq/ReportSummaryhelpers live in the existingtests/TestHarness.h, extended here withCheckEq+ReportSummary.Test plan
cmake --preset editor-debug -DOCTARINE_ENABLE_TESTS=ON+ build — cleanctest -R "LuaBehaviorTest|GameBakeTest"green; every check exercised (bake end-to-end runs, not skipped); fixture dir left clean