diff options
| -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 |
