diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-03 09:11:27 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-03 09:11:27 +0100 |
| commit | e0be1ff83f6da41f37ac806428bcb0ce7f0e4b32 (patch) | |
| tree | f6a49745b393448ac013ed5225d57c4b71a1edd7 | |
| parent | 1423c57065669328f04c6edf808440685bc16b30 (diff) | |
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 <noreply@anthropic.com>
| -rw-r--r-- | src/tests/assets/test_assets.cc | 10 | ||||
| -rw-r--r-- | workspaces/test/assets.txt | 1 | ||||
| -rw-r--r-- | workspaces/test/test_assets/test.mp3 | bin | 0 -> 32 bytes |
3 files changed, 11 insertions, 0 deletions
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 Binary files differnew file mode 100644 index 0000000..34e969a --- /dev/null +++ b/workspaces/test/test_assets/test.mp3 |
