summaryrefslogtreecommitdiff
path: root/src/gpu/texture_manager.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-07 10:01:03 +0100
committerskal <pascal.massimino@gmail.com>2026-02-07 10:01:03 +0100
commit9702ea06ced9585a705c41186f814700bc859dcd (patch)
treed45398e443d9b561991f820869e4f200d4d86ec0 /src/gpu/texture_manager.cc
parentdccbfe7f995db2e2bfe80fc611f6f053cafd9bb3 (diff)
test(gpu): Add automatic validation for effect test coverage
Problem: When new effects are added to demo_effects.h, developers might forget to update test_demo_effects.cc, leading to untested code. Solution: Added compile-time constants and runtime assertions to enforce test coverage: 1. Added EXPECTED_POST_PROCESS_COUNT = 8 2. Added EXPECTED_SCENE_COUNT = 6 3. Runtime validation in each test function 4. Fails with clear error message if counts don't match Error message when validation fails: ✗ COVERAGE ERROR: Expected N effects, but only tested M! ✗ Did you add a new effect without updating the test? ✗ Update EXPECTED_*_COUNT in test_demo_effects.cc Updated CONTRIBUTING.md with mandatory test update requirement: - Added step 3 to "Adding a New Visual Effect" workflow - Clear instructions on updating effect counts - Verification command examples This ensures no effect can be added without corresponding test coverage. Tested validation by intentionally breaking count - error caught correctly.
Diffstat (limited to 'src/gpu/texture_manager.cc')
0 files changed, 0 insertions, 0 deletions