SDL/test
David Gow c57bcb47b1 test: Fix building with libunwind under autotools
There are two issues which are stopping the SDL tests from building on
my machine:
- libunwind is not being linked
- Even if it is, it is missing several symbols.

The first is fixed by having the test programs link against libunwind if
available. Technically, SDL2_test should be linking against it, as it's
used in SDL_test_memory.c, but as SDL2_test is a static library, it
can't itself import libunwind. We just assume that if it's present on
the system, we should link it directly to the test programs. This should
strictly be an improvement, as the only case where this'd fail is if
SDL2 was compiled when libunwind was present, but the tests are being
compiled without it, and that'd fail anyway.

The second is fixed by #define-ing UNW_LOCAL_ONLY before including
libunwind.h: this is required to make libunwind link to predicatable
symbols, in what can only be described as a bit of a farce. There are a
few more details in the libunwind man page, but the gist of it is that
it disables support for "remote unwinding": unwinding stack frames in a
different process (and possibly from a different architecture?):
http://www.nongnu.org/libunwind/man/libunwind(3).html

Note that I haven't tried this with CMake: I suspect that it'll work,
though, as the CMakeLists.txt seems to have SDL2 link against libunwind if
it's present. This adds an ugly extra dependency to SDL2, but does mean
that issue 1 isn't present. The UNW_LOCAL_ONLY change shouldn't be
build-system-specific.
2021-10-25 11:28:20 -07:00
..
emscripten Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
nacl Fixed bug 3480 - minor update to NACL common.js 2016-11-05 01:48:14 -07:00
shapes Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
CMakeLists.txt Add testmouse 2021-09-09 13:46:58 -07:00
COPYING Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.in Add testmouse 2021-09-09 13:46:58 -07:00
Makefile.os2 minor tidy-up in os2 makefile for tests. 2021-09-20 23:50:02 +03:00
README Add testmouse 2021-09-09 13:46:58 -07:00
acinclude.m4 minor update to test/acinclude.m4 (pkg.m4) 2020-12-30 15:53:20 +03:00
autogen.sh bump minimum required autoconf version and revise autogen.sh 2021-04-14 23:20:40 +03:00
axis.bmp Split controller axes into positive and negative sides so each can be bound independently. 2016-12-27 01:39:07 -08:00
button.bmp Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
checkkeys.c checkkeys: Create a renderer for window display on Wayland 2021-08-13 08:29:17 -07:00
checkkeysthreads.c Added KMOD_SCROLL to track the scroll lock state 2021-08-10 17:50:17 -07:00
configure regenerate test/configure really with ac2.69 2021-09-06 15:24:50 +03:00
configure.ac test: Fix building with libunwind under autotools 2021-10-25 11:28:20 -07:00
controllermap.bmp Be explicit about mapping the new game controller paddle buttons 2020-11-07 02:22:15 -08:00
controllermap.c Run the renderer so Steam can find the main window 2021-08-03 09:25:13 -07:00
controllermap_back.bmp Be explicit about mapping the new game controller paddle buttons 2020-11-07 02:22:15 -08:00
gcc-fat.sh Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
icon.bmp Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
loopwave.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
loopwavequeue.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
moose.dat Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
picture.xbm Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
relative_mode.markdown Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
sample.bmp Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
sample.wav Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
testatomic.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testaudiocapture.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testaudiohotplug.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testaudioinfo.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testautomation.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testautomation_audio.c Revert "Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069)" 2021-04-01 12:15:28 -04:00
testautomation_clipboard.c Fixed up legacy MoinMoin URLs at wiki.libsdl.org 2021-04-01 12:20:33 -04:00
testautomation_events.c Fixed up legacy MoinMoin URLs at wiki.libsdl.org 2021-04-01 12:20:33 -04:00
testautomation_hints.c Fixed the name of the verbose hints 2021-09-22 09:49:41 -07:00
testautomation_keyboard.c Added KMOD_SCROLL to track the scroll lock state 2021-08-10 17:50:17 -07:00
testautomation_main.c Fixed up legacy MoinMoin URLs at wiki.libsdl.org 2021-04-01 12:20:33 -04:00
testautomation_mouse.c You may need to wait a bit for SDL_WarpMouseInWindow() to complete 2021-09-22 09:56:06 -07:00
testautomation_pixels.c Fixed up legacy MoinMoin URLs at wiki.libsdl.org 2021-04-01 12:20:33 -04:00
testautomation_platform.c Getting "(null)" when formatted printing NULL is a valid result 2021-09-22 10:01:42 -07:00
testautomation_rect.c Fixed up legacy MoinMoin URLs at wiki.libsdl.org 2021-04-01 12:20:33 -04:00
testautomation_render.c Fixed up legacy MoinMoin URLs at wiki.libsdl.org 2021-04-01 12:20:33 -04:00
testautomation_rwops.c Fixed up legacy MoinMoin URLs at wiki.libsdl.org 2021-04-01 12:20:33 -04:00
testautomation_sdltest.c test: remove unused variables and typedefs 2021-03-29 09:01:26 -07:00
testautomation_stdlib.c The return value of SDL_snprintf is the number of characters that would have been written. 2021-09-22 11:46:24 -07:00
testautomation_suites.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
testautomation_surface.c SDL_PIXELFORMAT_ARGB2101010 isn't fully supported for all surface conversion paths yet 2021-09-22 09:48:51 -07:00
testautomation_syswm.c Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
testautomation_timer.c Fixed bug 3744 - missing SDLCALL in several functions 2017-08-13 21:06:52 -07:00
testautomation_video.c Fixed up legacy MoinMoin URLs at wiki.libsdl.org 2021-04-01 12:20:33 -04:00
testbounds.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testcustomcursor.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testdisplayinfo.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testdraw2.c testdraw2: display FPS similarly to testsprit2. fix helper syntax 2021-09-23 22:28:45 +02:00
testdrawchessboard.c test: fix shadowing variables 2021-03-29 09:01:26 -07:00
testdropfile.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testerror.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testevdev.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testfile.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testfilesystem.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testgamecontroller.c Added support for the Joy-Con Charging Grip when SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS is enabled 2021-08-04 11:34:06 -07:00
testgeometry.c testgeometry.c: fix build in c89 mode 2021-08-19 01:28:10 +03:00
testgesture.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testgl2.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testgles.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testgles2.c Fixed building testgles2 on Linux 2021-09-22 09:31:26 -07:00
testgles2_sdf.c Fix declarations after statement 2021-01-24 00:51:24 -05:00
testgles2_sdf_img_normal.bmp Add basic testgles2_sdf program to demonstrate sign distance field with opengles2 2021-01-24 00:51:24 -05:00
testgles2_sdf_img_sdf.bmp Add basic testgles2_sdf program to demonstrate sign distance field with opengles2 2021-01-24 00:51:24 -05:00
testhaptic.c test: replace some exit()s with returns. 2019-09-10 10:03:20 +03:00
testhittesting.c Fixed bug 3744 - missing SDLCALL in several functions 2017-08-13 21:06:52 -07:00
testhotplug.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testiconv.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testime.c Latest Unifont with OFL is now bundled. (#4268) 2021-07-08 14:51:16 -07:00
testintersections.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testjoystick.c minor watcom build fixes. 2021-05-15 00:22:50 +03:00
testkeys.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testloadso.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testlocale.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testlock.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testmessage.c Run the entire Cocoa messagebox function on the main thread. 2021-07-27 14:57:18 -07:00
testmouse.c testmouse.c: remove unused local var. 2021-09-10 00:01:20 +03:00
testmultiaudio.c test: fix shadowing variables 2021-03-29 09:01:26 -07:00
testnative.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testnative.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testnativecocoa.m Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
testnativeos2.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testnativew32.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testnativex11.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testoffscreen.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testoverlay2.c test: fix shadowing variables 2021-03-29 09:01:26 -07:00
testplatform.c Check for ARM SIMD in testplatform 2021-02-17 11:10:02 +03:00
testpower.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testqsort.c test: portable 64bit address format specifier 2021-03-29 09:01:26 -07:00
testrelative.c test: fix shadowing variables 2021-03-29 09:01:26 -07:00
testrendercopyex.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testrendertarget.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testresample.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testrumble.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testscale.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testsem.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testsensor.c Only pump events once per frame and process all currently pending events 2021-07-29 06:36:20 -07:00
testshader.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testshape.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testsprite2.c Fixed compiler warnings using Visual Studio 2019 2021-09-21 18:15:09 -07:00
testspriteminimal.c test: fix shadowing variables 2021-03-29 09:01:26 -07:00
teststreaming.c test: fix shadowing variables 2021-03-29 09:01:26 -07:00
testthread.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testtimer.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testurl.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testver.c Deprecate SDL_GetRevisionNumber and update things for git instead of hg. 2021-02-12 14:31:38 -05:00
testviewport.c test: fix shadowing variables 2021-03-29 09:01:26 -07:00
testvulkan.c Fix compiler warnings in testvulkan.c 2021-10-06 15:24:41 -07:00
testwm2.c Add a test case for bug https://github.com/libsdl-org/SDL/issues/4469 2021-07-27 12:43:45 -07:00
testyuv.bmp Updated SDL's YUV support, many thanks to Adrien Descamps 2017-11-12 22:51:12 -08:00
testyuv.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testyuv_cvt.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
testyuv_cvt.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
torturethread.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
unifont-13.0.06-license.txt Latest Unifont with OFL is now bundled. (#4268) 2021-07-08 14:51:16 -07:00
unifont-13.0.06.hex Latest Unifont with OFL is now bundled. (#4268) 2021-07-08 14:51:16 -07:00
utf8.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00

README

These are test programs for the SDL library:

	checkkeys	Watch the key events to check the keyboard
	loopwave	Audio test -- loop playing a WAV file
	loopwavequeue	Audio test -- loop playing a WAV file with SDL_QueueAudio
	testaudioinfo	Lists audio device capabilities
	testerror	Tests multi-threaded error handling
	testfile	Tests RWops layer
	testgl2		A very simple example of using OpenGL with SDL
	testiconv	Tests international string conversion
	testjoystick	List joysticks and watch joystick events
	testkeys	List the available keyboard keys
	testloadso	Tests the loadable library layer
	testlocale  Test Locale API
	testlock	Hacked up test of multi-threading and locking
	testmouse	Tests mouse coordinates
	testmultiaudio	Tests using several audio devices
	testoverlay2	Tests the overlay flickering/scaling during playback.
	testplatform	Tests types, endianness and cpu capabilities
	testsem		Tests SDL's semaphore implementation
	testshape	Tests shaped windows
	testsprite2	Example of fast sprite movement on the screen
	testthread	Hacked up test of multi-threading
	testtimer	Test the timer facilities
	testver		Check the version and dynamic loading and endianness
	testwm2		Test window manager -- title, icon, events
	torturethread	Simple test for thread creation/destruction
	controllermap   Useful to generate Game Controller API compatible maps



This directory contains sample.wav, which is a sample from Will Provost's
song, The Living Proof:

     From the album The Living Proof
     Publisher: 5 Guys Named Will
     Copyright 1996 Will Provost

You can get a copy of the full song (and album!) from iTunes...

    https://itunes.apple.com/us/album/the-living-proof/id4153978

or Amazon...

    http://www.amazon.com/The-Living-Proof-Will-Provost/dp/B00004R8RH

Thanks to Will for permitting us to distribute this sample with SDL!