diff options
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/test_assets.cc | 16 | ||||
| -rw-r--r-- | src/tests/test_sequence.cc | 4 |
2 files changed, 12 insertions, 8 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) { diff --git a/src/tests/test_sequence.cc b/src/tests/test_sequence.cc index a48c733..788e0b1 100644 --- a/src/tests/test_sequence.cc +++ b/src/tests/test_sequence.cc @@ -99,7 +99,7 @@ class DummyPostProcessEffect : public PostProcessEffect { void test_effect_lifecycle() { printf(" test_effect_lifecycle...\n"); MainSequence main_seq; - main_seq.init(dummy_device, dummy_queue, dummy_format, 320, 200); + main_seq.init_test(dummy_device, dummy_queue, dummy_format); auto effect1 = std::make_shared<DummyEffect>(dummy_device, dummy_queue); auto seq1 = std::make_shared<Sequence>(); @@ -145,7 +145,7 @@ void test_simulate_until() { #if !defined(STRIP_ALL) printf(" test_simulate_until...\n"); MainSequence main_seq; - main_seq.init(dummy_device, dummy_queue, dummy_format, 320, 240); + main_seq.init_test(dummy_device, dummy_queue, dummy_format); auto effect1 = std::make_shared<DummyEffect>(dummy_device, dummy_queue); auto seq1 = std::make_shared<Sequence>(); |
