Move check for SDL_Delay upper bounds to testtimer

(cherry picked from commit f45761908a)
This commit is contained in:
Anonymous Maarten authored and Anonymous Maarten committed 2024-01-21 23:44:53 +01:00
1 parent 1737340978
commit 41fc398114
2 files changed
+71 -8

No files matched your search

+3
View File
@@ -94,7 +94,10 @@ int timer_delayAndGetTicks(void *arg)
SDLTest_AssertCheck(result2 > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result2);
difference = result2 - result;
SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay - marginOfError, difference);
#if 0
/* Disabled because this might fail on non-interactive systems. Moved to testtimer. */
SDLTest_AssertCheck(difference < (testDelay + marginOfError), "Check difference, expected: <%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay + marginOfError, difference);
#endif
return TEST_COMPLETED;
}