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

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[]) {

View file

@ -1,4 +1,5 @@
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <stdio.h>
int main(int argc, char *argv[]) {

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

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;

View file

@ -23,6 +23,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int done;

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 */

View file

@ -22,6 +22,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static struct

View file

@ -19,6 +19,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#if HAVE_SIGNAL_H
#include <signal.h>

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

View file

@ -13,6 +13,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>

View file

@ -23,6 +23,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static SDL_AudioSpec spec;

View file

@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static void
print_devices(int iscapture)

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"

View file

@ -11,6 +11,7 @@
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char **argv)
{

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 */

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)

View file

@ -20,6 +20,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#define NUM_OBJECTS 100

View file

@ -19,6 +19,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
SDL_Window *window;
SDL_Renderer *renderer;

View file

@ -13,6 +13,7 @@
#include <stdlib.h>
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
static SDLTest_CommonState *state;

View file

@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static int alive = 0;

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 */

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[])
{

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__

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;

View file

@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#ifdef HAVE_OPENGL

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

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

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__)

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;

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. */

View file

@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char *argv[])
{

View file

@ -18,6 +18,7 @@
#include <stdio.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static size_t

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

View file

@ -20,6 +20,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#define SWAP(typ, a, b) \
do { \

View file

@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>

View file

@ -15,6 +15,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char *argv[])
{

View file

@ -16,6 +16,7 @@
#include <stdio.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
typedef int (*fntype)(const char *);

View file

@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
/* !!! FIXME: move this to the test framework */

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;

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

View file

@ -11,6 +11,7 @@
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>

View file

@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <stdio.h> /* for fflush() and stdout */

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

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;

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

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

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)

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)

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>

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;

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;

View file

@ -11,6 +11,7 @@
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char **argv)
{

View file

@ -26,6 +26,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* includes
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static SDL_Haptic *haptic;

View file

@ -18,6 +18,7 @@
#endif
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
#define WINDOW_WIDTH 640

View file

@ -15,6 +15,7 @@
#include <signal.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#define NUM_THREADS 10
/* This value should be smaller than the maximum count of the */

View file

@ -13,6 +13,7 @@
/* Simple test of the SDL sensor code */
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static const char *GetSensorTypeString(SDL_SensorType type)
{

View file

@ -12,6 +12,7 @@
/* This is a simple example of using GLSL shaders with SDL */
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <stdlib.h>

View file

@ -12,6 +12,7 @@
#include <stdlib.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#define SHAPED_WINDOW_X 150
#define SHAPED_WINDOW_Y 150

View file

@ -20,6 +20,7 @@
#include <SDL3/SDL_test.h>
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
#define NUM_SPRITES 100

View file

@ -19,6 +19,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
#define WINDOW_WIDTH 640

View file

@ -22,6 +22,7 @@
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
#define MOOSEPIC_W 64

View file

@ -12,6 +12,7 @@
/* Program to test surround sound audio channels */
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static int total_channels;
static int active_channel;

View file

@ -16,6 +16,7 @@
#include <signal.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static SDL_TLSID tls;
static int alive = 0;

View file

@ -14,6 +14,7 @@
platform
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#define DEFAULT_RESOLUTION 1

View file

@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static void tryOpenURL(const char *url)
{

View file

@ -14,6 +14,7 @@
version of SDL
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int main(int argc, char *argv[])
{

View file

@ -19,6 +19,7 @@
#include <SDL3/SDL_test.h>
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#include "testutils.h"
static SDLTest_CommonState *state;

View file

@ -12,6 +12,7 @@
#include <stdlib.h>
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_main.h>
#if defined(__ANDROID__) && defined(__ARM_EABI__) && !defined(__ARM_ARCH_7A__)

View file

@ -18,6 +18,7 @@
#include <SDL3/SDL_test_common.h>
#include <SDL3/SDL_test_font.h>
#include <SDL3/SDL_main.h>
static SDLTest_CommonState *state;
int done;

View file

@ -10,6 +10,7 @@
freely.
*/
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3/SDL_test_font.h>
#include "testyuv_cvt.h"

View file

@ -16,6 +16,7 @@
#include <signal.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#define NUMTHREADS 10