diff options
Diffstat (limited to 'src/tests/test_assets.cc')
| -rw-r--r-- | src/tests/test_assets.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/tests/test_assets.cc b/src/tests/test_assets.cc index dd77b73..c7d41e5 100644 --- a/src/tests/test_assets.cc +++ b/src/tests/test_assets.cc @@ -51,11 +51,13 @@ int main() { // Test procedural asset printf("\nRunning Procedural Asset test...\n"); size_t proc_size = 0; - const uint8_t* proc_data_1 = GetAsset(AssetId::ASSET_PROC_NOISE_256, &proc_size); + const uint8_t* proc_data_1 = + GetAsset(AssetId::ASSET_PROC_NOISE_256, &proc_size); assert(proc_data_1 != nullptr); assert(proc_size == 256 * 256 * 4); // 256x256 RGBA8 - - // Verify first few bytes are not all zero (noise should produce non-zero data) + + // Verify first few bytes are not all zero (noise should produce non-zero + // data) bool non_zero_data = false; for (size_t i = 0; i < 16; ++i) { // Check first 16 bytes if (proc_data_1[i] != 0) { @@ -69,10 +71,12 @@ int main() { // Test DropAsset for procedural asset and re-generation DropAsset(AssetId::ASSET_PROC_NOISE_256, proc_data_1); // After dropping, GetAsset should generate new data - const uint8_t* proc_data_2 = GetAsset(AssetId::ASSET_PROC_NOISE_256, &proc_size); + const uint8_t* proc_data_2 = + GetAsset(AssetId::ASSET_PROC_NOISE_256, &proc_size); assert(proc_data_2 != nullptr); - // assert(proc_data_1 != proc_data_2); // Removed: Allocator might reuse the same address - + // assert(proc_data_1 != proc_data_2); // Removed: Allocator might reuse the + // same address + // Verify content again to ensure it was re-generated correctly non_zero_data = false; for (size_t i = 0; i < 16; ++i) { |
