From 124899f27b6c1ec02bfa16a57a4e43ea2b7ebac0 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 3 Feb 2026 10:59:08 +0100 Subject: test(shader): Add ShaderComposer and WGSL asset validation tests (Task #26) Implemented comprehensive unit tests for ShaderComposer and a validation test for production WGSL shader assets. This ensures the shader asset pipeline is robust and that all shaders contain required entry points and snippets. Also improved InitShaderComposer to be more robust during testing. --- src/tests/test_assets.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tests/test_assets.cc') diff --git a/src/tests/test_assets.cc b/src/tests/test_assets.cc index 6f57d8f..7f26e71 100644 --- a/src/tests/test_assets.cc +++ b/src/tests/test_assets.cc @@ -16,7 +16,7 @@ int main() { printf("Running AssetManager test...\n"); size_t size = 0; - const uint8_t* data1 = GetAsset(AssetId::ASSET_TEST_ASSET, &size); + const uint8_t* data1 = GetAsset(AssetId::ASSET_TEST_ASSET_1, &size); assert(data1 != nullptr); assert(size > 0); @@ -33,7 +33,7 @@ int main() { // Test caching: request the same asset again and verify pointer is identical size_t size2 = 0; - const uint8_t* data2 = GetAsset(AssetId::ASSET_TEST_ASSET, &size2); + const uint8_t* data2 = GetAsset(AssetId::ASSET_TEST_ASSET_1, &size2); assert(data2 != nullptr); assert(size2 == size); assert(data1 == data2); // Pointers should be the same for cached static asset -- cgit v1.2.3