early-access version 2847
This commit is contained in:
2
externals/SDL/src/test/SDL_test_common.c
vendored
2
externals/SDL/src/test/SDL_test_common.c
vendored
@@ -1464,12 +1464,10 @@ default: return "???";
|
||||
static void
|
||||
SDLTest_PrintEvent(SDL_Event * event)
|
||||
{
|
||||
#ifndef VERBOSE_MOTION_EVENTS
|
||||
if ((event->type == SDL_MOUSEMOTION) || (event->type == SDL_FINGERMOTION)) {
|
||||
/* Mouse and finger motion are really spammy */
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (event->type) {
|
||||
case SDL_DISPLAYEVENT:
|
||||
|
11
externals/SDL/src/test/SDL_test_harness.c
vendored
11
externals/SDL/src/test/SDL_test_harness.c
vendored
@@ -169,7 +169,7 @@ SDLTest_GenerateExecKey(const char *runSeed, const char *suiteName, const char *
|
||||
* \return Timer id or -1 on failure.
|
||||
*/
|
||||
static SDL_TimerID
|
||||
SDLTest_SetTestTimeout(int timeout, void (SDLCALL *callback)(void))
|
||||
SDLTest_SetTestTimeout(int timeout, void (*callback)(void))
|
||||
{
|
||||
Uint32 timeoutInMilliseconds;
|
||||
SDL_TimerID timerID;
|
||||
@@ -209,7 +209,7 @@ SDLTest_SetTestTimeout(int timeout, void (SDLCALL *callback)(void))
|
||||
#if defined(__WATCOMC__)
|
||||
#pragma aux SDLTest_BailOut aborts;
|
||||
#endif
|
||||
static SDL_NORETURN void SDLCALL
|
||||
static SDL_NORETURN void
|
||||
SDLTest_BailOut(void)
|
||||
{
|
||||
SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run.");
|
||||
@@ -349,7 +349,7 @@ static void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites)
|
||||
/* Gets a timer value in seconds */
|
||||
static float GetClock()
|
||||
{
|
||||
float currentClock = SDL_GetPerformanceCounter() / (float) SDL_GetPerformanceFrequency();
|
||||
float currentClock = clock() / (float) CLOCKS_PER_SEC;
|
||||
return currentClock;
|
||||
}
|
||||
|
||||
@@ -443,11 +443,6 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user
|
||||
}
|
||||
}
|
||||
|
||||
if (totalNumberOfTests == 0) {
|
||||
SDLTest_LogError("No tests to run?");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Pre-allocate an array for tracking failed tests (potentially all test cases) */
|
||||
failedTests = (const SDLTest_TestCaseReference **)SDL_malloc(totalNumberOfTests * sizeof(SDLTest_TestCaseReference *));
|
||||
if (failedTests == NULL) {
|
||||
|
2
externals/SDL/src/test/SDL_test_random.c
vendored
2
externals/SDL/src/test/SDL_test_random.c
vendored
@@ -70,7 +70,7 @@ void SDLTest_RandomInitTime(SDLTest_RandomContext * rndContext)
|
||||
|
||||
srand((unsigned int)time(NULL));
|
||||
a=rand();
|
||||
srand((unsigned int)SDL_GetPerformanceCounter());
|
||||
srand((unsigned int)clock());
|
||||
b=rand();
|
||||
SDLTest_RandomInit(rndContext, a, b);
|
||||
}
|
||||
|
Reference in New Issue
Block a user