From c0dc22035faf13fe106d463442f19cff46745f8e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 26 Nov 2006 00:11:27 +0000 Subject: [PATCH] mid-file seeking tests are optional; run them last --- stepmania/src/tests/test_audio_readers.cpp | 26 +++++++++------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/stepmania/src/tests/test_audio_readers.cpp b/stepmania/src/tests/test_audio_readers.cpp index 1e76404dd1..929557ee75 100644 --- a/stepmania/src/tests/test_audio_readers.cpp +++ b/stepmania/src/tests/test_audio_readers.cpp @@ -446,22 +446,6 @@ bool RunTests( SoundReader *snd, const TestFile &tf ) return false; } - /* Seek to 1ms and make sure it gives us the correct data. */ - snd->SetPosition_Accurate( 1 ); - if( !test_read( snd, data + one_second * 1/1000, one_second * 1/1000 ) ) - { - LOG->Warn("Fail: SetPosition_Accurate(1) didn't work"); - return false; - } - - /* Seek to 500ms and make sure it gives us the correct data. */ - snd->SetPosition_Accurate( 500 ); - if( !test_read( snd, data+one_second * 500/1000, one_second * 500/1000 ) ) - { - LOG->Warn("Fail: seek(500) didn't work"); - return false; - } - /* Make sure seeking past end of file returns 0. */ int ret2 = snd->SetPosition_Fast( 10000000 ); if( ret2 != 0 ) @@ -490,6 +474,16 @@ bool RunTests( SoundReader *snd, const TestFile &tf ) return false; } + /* Seek to 1ms and make sure it gives us the correct data. */ + snd->SetPosition_Accurate( 1 ); + if( !test_read( snd, data + one_second * 1/1000, one_second * 1/1000 ) ) + LOG->Warn("Fail: SetPosition_Accurate(1) didn't work"); + + /* Seek to 500ms and make sure it gives us the correct data. */ + snd->SetPosition_Accurate( 500 ); + if( !test_read( snd, data+one_second * 500/1000, one_second * 500/1000 ) ) + LOG->Warn("Fail: seek(500) didn't work"); + return true; }