forked from Green-Sky/tomato
Merge commit '852f2a6343518919e5ca8d3c1bbcab9f493e3cd8'
This commit is contained in:
11
external/sdl/SDL/test/testautomation_timer.c
vendored
11
external/sdl/SDL/test/testautomation_timer.c
vendored
@ -30,7 +30,7 @@ static void timerSetUp(void *arg)
|
||||
/* Test case functions */
|
||||
|
||||
/**
|
||||
* \brief Call to SDL_GetPerformanceCounter
|
||||
* Call to SDL_GetPerformanceCounter
|
||||
*/
|
||||
static int timer_getPerformanceCounter(void *arg)
|
||||
{
|
||||
@ -44,7 +44,7 @@ static int timer_getPerformanceCounter(void *arg)
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Call to SDL_GetPerformanceFrequency
|
||||
* Call to SDL_GetPerformanceFrequency
|
||||
*/
|
||||
static int timer_getPerformanceFrequency(void *arg)
|
||||
{
|
||||
@ -58,7 +58,7 @@ static int timer_getPerformanceFrequency(void *arg)
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Call to SDL_Delay and SDL_GetTicks
|
||||
* Call to SDL_Delay and SDL_GetTicks
|
||||
*/
|
||||
static int timer_delayAndGetTicks(void *arg)
|
||||
{
|
||||
@ -92,7 +92,10 @@ static int timer_delayAndGetTicks(void *arg)
|
||||
SDLTest_AssertCheck(result2 > 0, "Check result value, expected: >0, got: %" SDL_PRIu64, result2);
|
||||
difference = result2 - result;
|
||||
SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%d, got: %" SDL_PRIu64, 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: <%d, got: %" SDL_PRIu64, testDelay + marginOfError, difference);
|
||||
#endif
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
@ -113,7 +116,7 @@ static Uint32 SDLCALL timerTestCallback(Uint32 interval, void *param)
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Call to SDL_AddTimer and SDL_RemoveTimer
|
||||
* Call to SDL_AddTimer and SDL_RemoveTimer
|
||||
*/
|
||||
static int timer_addRemoveTimer(void *arg)
|
||||
{
|
||||
|
Reference in New Issue
Block a user