Add SDL_main.h includes to tests

.. including cmake/test/*.c, whatever that does

(this is needed now because SDL.h doesn't include SDL_main.h anymore)
This commit is contained in:
Daniel Gibson
2022-12-15 05:58:20 +01:00
committed by Sam Lantinga
parent ca2fe7be1a
commit 22e22ba196
71 changed files with 73 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
#define SDL_MAIN_HANDLED
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
+1
View File
@@ -1,4 +1,5 @@
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
+2
View File
@@ -1,4 +1,6 @@
#include <SDL3/SDL.h>
#define SDL_MAIN_HANDLED /* don't drag in header-only SDL_main implementation */
#include <SDL3/SDL_main.h>
#include <stdio.h>
#include EXPORT_HEADER
+1
View File
@@ -22,6 +22,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3/SDL_test_font.h>
static SDL_Window *window;
+1
View File
@@ -23,6 +23,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int done;
+1
View File
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
/* Define this for verbose output while mapping controllers */
+1
View File
@@ -22,6 +22,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static struct
+1
View File
@@ -19,6 +19,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#if HAVE_SIGNAL_H
#include <signal.h>
+1
View File
@@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
/*
Absolutely basic tests just to see if we get the expected value
+1
View File
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
+1
View File
@@ -23,6 +23,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static SDL_AudioSpec spec;
+1
View File
@@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static void
print_devices(int iscapture)
+1
View File
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3/SDL_test.h>
#include "testautomation_suites.h"
+1
View File
@@ -11,6 +11,7 @@
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char **argv)
{
+1
View File
@@ -16,6 +16,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
/* Stolen from the mailing list */
/* Creates a new mouse cursor from an XPM */
+1
View File
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static void
print_mode(const char *prefix, const SDL_DisplayMode *mode)
+1
View File
@@ -20,6 +20,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#define NUM_OBJECTS 100
+1
View File
@@ -19,6 +19,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
SDL_Window *window;
SDL_Renderer *renderer;
+1
View File
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
static SDLTest_CommonState *state;
+1
View File
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static int alive = 0;
+1
View File
@@ -24,6 +24,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
/* WARNING ! those 2 files will be destroyed by this test program */
+1
View File
@@ -12,6 +12,7 @@
/* Simple test of filesystem functions. */
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char *argv[])
{
+1
View File
@@ -13,6 +13,7 @@
/* Simple program to test the SDL game controller routines */
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
#ifdef __EMSCRIPTEN__
+1
View File
@@ -20,6 +20,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static SDLTest_CommonState *state;
+1
View File
@@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#ifdef HAVE_OPENGL
+1
View File
@@ -12,6 +12,7 @@
#include <stdlib.h>
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#if defined(__IOS__) || defined(__ANDROID__)
#define HAVE_OPENGLES
+1
View File
@@ -16,6 +16,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#if defined(__IOS__) || defined(__ANDROID__) || defined(__EMSCRIPTEN__) || defined(__WINDOWS__) || defined(__LINUX__)
#define HAVE_OPENGLES2
+1
View File
@@ -16,6 +16,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
#if defined(__IOS__) || defined(__ANDROID__) || defined(__EMSCRIPTEN__) || defined(__WINDOWS__) || defined(__LINUX__)
+1
View File
@@ -17,6 +17,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static SDL_Haptic *haptic;
+1
View File
@@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
/* !!! FIXME: rewrite this to be wired in to test framework. */
+1
View File
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char *argv[])
{
+1
View File
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static size_t
+1
View File
@@ -14,6 +14,7 @@
Download at http://unifoundry.com/unifont.html */
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#ifdef HAVE_SDL_TTF
#include "SDL_ttf.h"
#endif
+1
View File
@@ -20,6 +20,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#define SWAP(typ, a, b) \
do { \
+1
View File
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
+1
View File
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char *argv[])
{
+1
View File
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
typedef int (*fntype)(const char *);
+1
View File
@@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
/* !!! FIXME: move this to the test framework */
+1
View File
@@ -18,6 +18,7 @@
#include <stdlib.h> /* for atexit() */
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static SDL_mutex *mutex = NULL;
static SDL_threadID mainthread;
+1
View File
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
static void
+1
View File
@@ -11,6 +11,7 @@
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
+1
View File
@@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <stdio.h> /* for fflush() and stdout */
+2
View File
@@ -17,6 +17,8 @@
#include "testnative.h"
#include "testutils.h"
#include <SDL3/SDL_main.h>
#define WINDOW_W 640
#define WINDOW_H 480
#define NUM_SPRITES 100
+1
View File
@@ -20,6 +20,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3/SDL_opengl.h>
static SDL_Renderer *renderer = NULL;
+1
View File
@@ -24,6 +24,7 @@
#include <SDL3/SDL_test.h>
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
#define MOOSEPIC_W 64
+1
View File
@@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
/*
* Watcom C flags these as Warning 201: "Unreachable code" if you just
+1
View File
@@ -12,6 +12,7 @@
/* Simple test of power subsystem. */
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static void
report_power(void)
+1
View File
@@ -11,6 +11,7 @@
*/
#include <SDL3/SDL_test.h>
#include <SDL3/SDL_main.h>
static int SDLCALL
num_compare(const void *_a, const void *_b)
+1
View File
@@ -16,6 +16,7 @@
#include <time.h>
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
+1
View File
@@ -18,6 +18,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static SDLTest_CommonState *state;

Some files were not shown because too many files have changed in this diff Show More