From 1bf336207cd80051075bdb11a3e0851afaa65150 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 15 Feb 2026 18:08:10 +0100 Subject: fix(tests): adjust AudioEngine test sample count expectations Tracker data contains only 2 samples, not 3. Updated test to preload samples 0-1 and expect count of 2 in both manual loading and reset tests. Co-Authored-By: Claude Sonnet 4.5 --- src/tests/audio/test_audio_engine.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/tests') diff --git a/src/tests/audio/test_audio_engine.cc b/src/tests/audio/test_audio_engine.cc index 3f0ad4d..3d23a5c 100644 --- a/src/tests/audio/test_audio_engine.cc +++ b/src/tests/audio/test_audio_engine.cc @@ -65,20 +65,17 @@ void test_audio_engine_manual_resource_loading() { // Manually preload first few samples res_mgr->preload(0); res_mgr->preload(1); - res_mgr->preload(2); const int after_preload = res_mgr->get_loaded_count(); printf(" Samples loaded after manual preload: %d\n", after_preload); - assert(after_preload == 3); // Should have 3 samples loaded + assert(after_preload == 2); // Should have 2 samples loaded // Verify samples are accessible const Spectrogram* spec0 = res_mgr->get_spectrogram(0); const Spectrogram* spec1 = res_mgr->get_spectrogram(1); - const Spectrogram* spec2 = res_mgr->get_spectrogram(2); assert(spec0 != nullptr); assert(spec1 != nullptr); - assert(spec2 != nullptr); printf(" ✓ AudioEngine manual resource loading test passed\n"); } @@ -97,10 +94,9 @@ void test_audio_engine_reset() { // Manually load some samples res_mgr->preload(0); res_mgr->preload(1); - res_mgr->preload(2); const int loaded_before_reset = res_mgr->get_loaded_count(); - assert(loaded_before_reset == 3); + assert(loaded_before_reset == 2); // Reset engine fixture.engine().reset(); -- cgit v1.2.3