summaryrefslogtreecommitdiff
path: root/src/tests/test_assets.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-03 10:59:08 +0100
committerskal <pascal.massimino@gmail.com>2026-02-03 10:59:08 +0100
commit124899f27b6c1ec02bfa16a57a4e43ea2b7ebac0 (patch)
treef96af35a888baee7be5b1a01849325653c5f7af1 /src/tests/test_assets.cc
parent4660ce3eec7c91a20d6d93fa3e142c1fd157e869 (diff)
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.
Diffstat (limited to 'src/tests/test_assets.cc')
-rw-r--r--src/tests/test_assets.cc4
1 files changed, 2 insertions, 2 deletions
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