.. including cmake/test/*.c, whatever that does (this is needed now because SDL.h doesn't include SDL_main.h anymore)
@@ -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,4 +1,5 @@
@@ -1,4 +1,6 @@
+#define SDL_MAIN_HANDLED /* don't drag in header-only SDL_main implementation */
#include EXPORT_HEADER
@@ -22,6 +22,7 @@
#endif
#include <SDL3/SDL_test_font.h>
static SDL_Window *window;
@@ -23,6 +23,7 @@
int done;
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include "testutils.h"
/* Define this for verbose output while mapping controllers */
static struct
@@ -19,6 +19,7 @@
#if HAVE_SIGNAL_H
#include <signal.h>
@@ -10,6 +10,7 @@
freely.
*/
/*
Absolutely basic tests just to see if we get the expected value
@@ -13,6 +13,7 @@
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
static SDL_AudioSpec spec;
static void
print_devices(int iscapture)
#include <SDL3/SDL_test.h>
#include "testautomation_suites.h"
@@ -11,6 +11,7 @@
int main(int argc, char **argv)
{
@@ -16,6 +16,7 @@
#include <SDL3/SDL_test_common.h>
/* Stolen from the mailing list */
/* Creates a new mouse cursor from an XPM */
@@ -15,6 +15,7 @@
print_mode(const char *prefix, const SDL_DisplayMode *mode)
@@ -20,6 +20,7 @@
#define NUM_OBJECTS 100
SDL_Window *window;
SDL_Renderer *renderer;
static SDLTest_CommonState *state;
static int alive = 0;
@@ -24,6 +24,7 @@
/* WARNING ! those 2 files will be destroyed by this test program */
@@ -12,6 +12,7 @@
/* Simple test of filesystem functions. */
int main(int argc, char *argv[])
/* Simple program to test the SDL game controller routines */
#ifdef HAVE_OPENGL
#if defined(__IOS__) || defined(__ANDROID__)
#define HAVE_OPENGLES
#if defined(__IOS__) || defined(__ANDROID__) || defined(__EMSCRIPTEN__) || defined(__WINDOWS__) || defined(__LINUX__)
#define HAVE_OPENGLES2
@@ -17,6 +17,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
static SDL_Haptic *haptic;
/* !!! FIXME: rewrite this to be wired in to test framework. */
@@ -18,6 +18,7 @@
static size_t
@@ -14,6 +14,7 @@
Download at http://unifoundry.com/unifont.html */
#ifdef HAVE_SDL_TTF
#include "SDL_ttf.h"
#define SWAP(typ, a, b) \
do { \
typedef int (*fntype)(const char *);
/* !!! FIXME: move this to the test framework */
#include <stdlib.h> /* for atexit() */
static SDL_mutex *mutex = NULL;
static SDL_threadID mainthread;
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
#include <stdio.h> /* for fflush() and stdout */
@@ -17,6 +17,8 @@
#include "testnative.h"
+
#define WINDOW_W 640
#define WINDOW_H 480
#define NUM_SPRITES 100
#include <SDL3/SDL_opengl.h>
static SDL_Renderer *renderer = NULL;
#define MOOSEPIC_W 64
* Watcom C flags these as Warning 201: "Unreachable code" if you just
/* Simple test of power subsystem. */
report_power(void)
static int SDLCALL
num_compare(const void *_a, const void *_b)
#include <time.h>
@@ -26,6 +26,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* includes
#define WINDOW_WIDTH 640
#define NUM_THREADS 10
/* This value should be smaller than the maximum count of the */
/* Simple test of the SDL sensor code */
static const char *GetSensorTypeString(SDL_SensorType type)
/* This is a simple example of using GLSL shaders with SDL */
#define SHAPED_WINDOW_X 150
#define SHAPED_WINDOW_Y 150
/* Program to test surround sound audio channels */
static int total_channels;
static int active_channel;
static SDL_TLSID tls;
platform
#define DEFAULT_RESOLUTION 1
static void tryOpenURL(const char *url)
version of SDL
#if defined(__ANDROID__) && defined(__ARM_EABI__) && !defined(__ARM_ARCH_7A__)
#include "testyuv_cvt.h"
#define NUMTHREADS 10