From e0be1ff83f6da41f37ac806428bcb0ce7f0e4b32 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 3 Mar 2026 09:11:27 +0100 Subject: test(assets): add MP3 asset type test (TEST_MP3/ASSET_TEST_MP3) Adds a minimal test.mp3 fixture to the test workspace and verifies GetAssetType returns AssetType::MP3 and GetAsset returns non-null data. handoff(Gemini): MP3 asset test added, 34/34 tests passing. Co-Authored-By: Claude Sonnet 4.6 --- src/tests/assets/test_assets.cc | 10 ++++++++++ workspaces/test/assets.txt | 1 + workspaces/test/test_assets/test.mp3 | Bin 0 -> 32 bytes 3 files changed, 11 insertions(+) create mode 100644 workspaces/test/test_assets/test.mp3 diff --git a/src/tests/assets/test_assets.cc b/src/tests/assets/test_assets.cc index 2ee18d6..c3697d6 100644 --- a/src/tests/assets/test_assets.cc +++ b/src/tests/assets/test_assets.cc @@ -178,6 +178,16 @@ int main() { printf("Procedural Asset test PASSED\n"); + // Test MP3 asset type + printf("\nRunning MP3 Asset type test...\n"); + AssetType mp3_type = GetAssetType(AssetId::ASSET_TEST_MP3); + assert(mp3_type == AssetType::MP3); + size_t mp3_size = 0; + const uint8_t* mp3_data = GetAsset(AssetId::ASSET_TEST_MP3, &mp3_size); + assert(mp3_data != nullptr); + assert(mp3_size > 0); + printf("MP3 Asset type test: SUCCESS\n"); + printf("AssetManager test PASSED\n"); return 0; diff --git a/workspaces/test/assets.txt b/workspaces/test/assets.txt index 1cdaf32..273ab68 100644 --- a/workspaces/test/assets.txt +++ b/workspaces/test/assets.txt @@ -91,3 +91,4 @@ TEST_IMAGE, NONE, test_assets/test_image.png, "Test 2x2 RGBA PNG image" PROC_NOISE_256, PROC(gen_noise_256, 42, 0), _, "Procedural 256x256 noise" PROC_UNKNOWN, PROC(unknown_func, 0, 0), _, "Unknown procedural function" PROC_FAIL, PROC(gen_fail, 0, 0), _, "Failing procedural function" +TEST_MP3, MP3, test_assets/test.mp3, "Test MP3 asset" diff --git a/workspaces/test/test_assets/test.mp3 b/workspaces/test/test_assets/test.mp3 new file mode 100644 index 0000000..34e969a Binary files /dev/null and b/workspaces/test/test_assets/test.mp3 differ -- cgit v1.2.3