summaryrefslogtreecommitdiff
path: root/cmake/DemoTests.cmake
AgeCommit message (Collapse)Author
22 hoursRefactor: factorize WGPU init code for 3D testsskal
Extracted duplicate WGPU initialization boilerplate from test_3d_physics, test_3d_render, and test_mesh into shared helper (test_3d_helpers). **Changes:** - New: src/tests/common/test_3d_helpers.{h,cc} (~120 LOC) - Removed ~280 LOC of duplicate init_wgpu() implementations - Net savings: -141 LOC **Benefits:** - Single source of truth for surface+device initialization - Eliminates cross-compile #ifdef duplication - Easier maintenance for callback API changes All 34 tests pass. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
32 hoursFactor common test patterns into reusable utilitiesskal
Refactor duplicated test setup/teardown code into shared fixtures: - test_math_helpers.h: Float comparison (test_near, test_near_vec3) - AudioTestFixture: RAII wrapper for AudioEngine lifecycle - EffectTestFixture: Combined WebGPU + AudioEngine + MainSequence Migrated 9 test files (3 math, 6 audio) to use fixtures. Net reduction: 54 LOC (178 insertions, 232 deletions). All 34 tests passing. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
32 hoursRemove non-functional Gantt test scriptsskal
Tests failed due to missing assets/test_gantt.seq. Gantt output functionality still works via seq_compiler tool. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
4 daysfix: Guard cnn_test build with STRIP_ALL checkskal
cnn_test has compile-time guard requiring STRIP_ALL=OFF. Wrap target definition with conditional to prevent build errors when DEMO_BUILD_TESTS=ON and DEMO_STRIP_ALL=ON are both set. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
4 daysrefactor: Modularize CMake build system into 10 specialized modulesskal
Refactor monolithic 866-line CMakeLists.txt into 54-line orchestrator + 10 modules: - DemoOptions.cmake - Build option declarations - DemoConfig.cmake - Option implications and platform detection - DemoCommon.cmake - Shared macros (conditional sources, size opts, linking) - DemoDependencies.cmake - External library discovery (WGPU, GLFW) - DemoSourceLists.cmake - Conditional source file lists - DemoLibraries.cmake - Subsystem library targets - DemoTools.cmake - Build tools (asset_packer, compilers) - DemoCodegen.cmake - Code generation (assets, timeline, music) - DemoExecutables.cmake - Main binaries (demo64k, test_demo) - DemoTests.cmake - Test infrastructure (36 tests) - Validation.cmake - Uniform buffer validation Benefits: - 94% reduction in main file size (866 → 54 lines) - Conditional module inclusion (tests only parsed if DEMO_BUILD_TESTS=ON) - Shared macros eliminate 200+ lines of repetition - Clear separation of concerns All 36 tests passing. All build modes verified. Documentation: Created doc/CMAKE_MODULES.md with module architecture. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>