early-access version 2835
This commit is contained in:
2
externals/SDL/src/test/SDL_test_assert.c
vendored
2
externals/SDL/src/test/SDL_test_assert.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
11
externals/SDL/src/test/SDL_test_common.c
vendored
11
externals/SDL/src/test/SDL_test_common.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -249,7 +249,7 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index)
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--windows") == 0) {
|
||||
++index;
|
||||
if (!argv[index] || !SDL_isdigit(*argv[index])) {
|
||||
if (!argv[index] || !SDL_isdigit((unsigned char) *argv[index])) {
|
||||
return -1;
|
||||
}
|
||||
if (!(state->window_flags & SDL_WINDOW_FULLSCREEN)) {
|
||||
@@ -1331,8 +1331,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
|
||||
n = SDL_GetNumRenderDrivers();
|
||||
for (j = 0; j < n; ++j) {
|
||||
SDL_GetRenderDriverInfo(j, &info);
|
||||
if (SDL_strcasecmp(info.name, state->renderdriver) ==
|
||||
0) {
|
||||
if (SDL_strcasecmp(info.name, state->renderdriver) == 0) {
|
||||
m = j;
|
||||
break;
|
||||
}
|
||||
@@ -1465,10 +1464,12 @@ 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:
|
||||
@@ -1937,7 +1938,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
|
||||
const int delta = 100;
|
||||
int x, y;
|
||||
SDL_GetWindowPosition(window, &x, &y);
|
||||
|
||||
|
||||
if (event->key.keysym.sym == SDLK_UP) y -= delta;
|
||||
if (event->key.keysym.sym == SDLK_DOWN) y += delta;
|
||||
if (event->key.keysym.sym == SDLK_LEFT) x -= delta;
|
||||
|
2
externals/SDL/src/test/SDL_test_compare.c
vendored
2
externals/SDL/src/test/SDL_test_compare.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
2
externals/SDL/src/test/SDL_test_crc32.c
vendored
2
externals/SDL/src/test/SDL_test_crc32.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
2
externals/SDL/src/test/SDL_test_font.c
vendored
2
externals/SDL/src/test/SDL_test_font.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
2
externals/SDL/src/test/SDL_test_fuzzer.c
vendored
2
externals/SDL/src/test/SDL_test_fuzzer.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
13
externals/SDL/src/test/SDL_test_harness.c
vendored
13
externals/SDL/src/test/SDL_test_harness.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -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 (*callback)(void))
|
||||
SDLTest_SetTestTimeout(int timeout, void (SDLCALL *callback)(void))
|
||||
{
|
||||
Uint32 timeoutInMilliseconds;
|
||||
SDL_TimerID timerID;
|
||||
@@ -209,7 +209,7 @@ SDLTest_SetTestTimeout(int timeout, void (*callback)(void))
|
||||
#if defined(__WATCOMC__)
|
||||
#pragma aux SDLTest_BailOut aborts;
|
||||
#endif
|
||||
static SDL_NORETURN void
|
||||
static SDL_NORETURN void SDLCALL
|
||||
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 = clock() / (float) CLOCKS_PER_SEC;
|
||||
float currentClock = SDL_GetPerformanceCounter() / (float) SDL_GetPerformanceFrequency();
|
||||
return currentClock;
|
||||
}
|
||||
|
||||
@@ -443,6 +443,11 @@ 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_imageBlit.c
vendored
2
externals/SDL/src/test/SDL_test_imageBlit.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
2
externals/SDL/src/test/SDL_test_imageFace.c
vendored
2
externals/SDL/src/test/SDL_test_imageFace.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
2
externals/SDL/src/test/SDL_test_log.c
vendored
2
externals/SDL/src/test/SDL_test_log.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
2
externals/SDL/src/test/SDL_test_md5.c
vendored
2
externals/SDL/src/test/SDL_test_md5.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
2
externals/SDL/src/test/SDL_test_memory.c
vendored
2
externals/SDL/src/test/SDL_test_memory.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
4
externals/SDL/src/test/SDL_test_random.c
vendored
4
externals/SDL/src/test/SDL_test_random.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -70,7 +70,7 @@ void SDLTest_RandomInitTime(SDLTest_RandomContext * rndContext)
|
||||
|
||||
srand((unsigned int)time(NULL));
|
||||
a=rand();
|
||||
srand((unsigned int)clock());
|
||||
srand((unsigned int)SDL_GetPerformanceCounter());
|
||||
b=rand();
|
||||
SDLTest_RandomInit(rndContext, a, b);
|
||||
}
|
||||
|
Reference in New Issue
Block a user