Commit Graph

394 Commits

Author SHA1 Message Date
Simon McVittie 7d2808e30b test: Run selected noninteractive tests at build-time
In Autotools, these are run by `make -C ${builddir}/test check`.
In CMake, they're run by `make -C ${builddir} test` or
`ninja -C ${builddir} test` or `ctest --test-dir ${builddir}`.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 18:17:55 -07:00
Simon McVittie b299f74d05 test: Make testevdev succeed if the feature is disabled
"Not applicable" is more like success than it is like failure.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 18:17:55 -07:00
Simon McVittie 6fc7aa28e7 cmake: Add some missing test-cases
These were built by Autotools but not by CMake.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 18:17:55 -07:00
Simon McVittie 2a8297e427 workflows: Add a test to assert that all the version numbers agree
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 09:55:35 -07:00
Cameron Cawley b398a847be Add SDL_FLOATWORDORDER for older ARM toolchains 2022-05-04 09:52:11 -07:00
Susko3 f25a78eede Enable `SDL_TEXTEDITING_EXT` events in `checkkeys` test 2022-05-02 15:50:39 -07:00
Sam Lantinga 0687128c96 Reduce CPU usage in testgamecontroller 2022-04-29 20:57:17 -07:00
Eddy Jansson 5c1f5a7306 test: Correct invalid enum length.
Ensure that they can't break like this again.
2022-04-28 12:58:27 -07:00
Ryan C. Gordon 7d7ec9c951
x11: Remove XVidMode and Xinerama support.
Fixes #1782.
2022-04-26 23:17:13 -04:00
Sam Lantinga e551384a99 Added functions to get the platform dependent name for a joystick or game controller 2022-04-26 14:54:14 -07:00
Eddy Jansson 5bc2933425 test: Basic tests for SDL_FRectEquals
Based on the integer version. These tests mostly check that input
isn't mangled and that invalid input gives the expected negative
result.
2022-04-20 08:38:53 -07:00
Simon McVittie 68b6fff245 test: Copy utf8.txt to build directory
testiconv wants this.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-12 11:01:20 -04:00
Simon McVittie b4256d03e9 testevdev: Adapt to a broader definition of keyboards
At the time I contributed this unit test, SDL had a relatively narrow
definition of what is a keyboard, approximately matching udev
ID_INPUT_KEYBOARD. Now it uses the equivalent of udev ID_INPUT_KEY,
which matches anything with keyboard keys, and not just reasonably
complete alphanumeric keyboards.

Fixes: 040bd7a9 "Fix udev not detecting ID_INPUT_KEY devices when udev is not running"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-12 10:59:53 -04:00
Simon McVittie c2946902fa testevdev: Recognise touchpads as such
At the time I contributed this unit test, SDL didn't understand Linux
touchpads, but now it does.

Fixes: 373216ae "Added support for touchpads in the Linux evdev code"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-12 10:59:53 -04:00
capehill 006a5a9e03 testgles2: Fix buffer object sizes 2022-04-05 13:05:51 -04:00
Christoph Reichenbach 6cd444f0fa Visualise scroll wheel events in testmouse 2022-04-02 20:50:21 -07:00
capehill 0dcfa92e4c testgles2: Call correct function to get shader info log and add link status checking 2022-03-27 09:44:48 -07:00
Ryan C. Gordon beecae31f6
testshader: use SDL_malloc instead of SDL_stack_alloc. 2022-03-26 08:42:09 -04:00
capehill d6122704e8 Initialize compile status variable and check also program link status 2022-03-26 08:38:42 -04:00
Sylvain 7f1feee02a
Fixed bug #2426 - SDL_RenderReadPixels result is unspecified and fails testautomation
Call SDL_RenderPresent after calling SDL_RenderReadPixels.
From "include/SDL_render.h":
"If you're using this on the main rendering target, it should be called after rendering and before SDL_RenderPresent()."
2022-03-21 10:20:04 +01:00
Ozkan Sezer 01663238dc testplatform.c: move static asserts out of TestTypes(). 2022-03-17 08:43:27 -07:00
Sylvain c44966b78b
Fixed bug #2691 - re-enable surface_testCompleteSurfaceConversion for ARGB2101010 2022-03-15 17:48:38 +01:00
IOBYTE 13756b5c72 Add X1 and X2 button support to mouse test 2022-03-04 12:09:08 -05:00
Sam Lantinga 18032979d8 Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks
This hint defaults off, but when it is enabled the mice will have a game controller mapping set up for Profile 3 (set in the Armoury Crate software)
2022-02-15 13:07:51 -08:00
Wouter Wijsman 4cb6181808 Do not build loadso test eboot for PSP 2022-02-10 19:01:15 +01:00
Sylvain 94e5c3f30e
testgesture: display device name with SDL_GetTouchName() 2022-02-08 11:40:39 +01:00
Ryan C. Gordon ca22b30e46
testgles2: Use vertex buffer objects instead of client-side arrays.
GLES2 always has them, and they work without hacks on Emscripten, unlike
client-side arrays.

I cleaned it up slightly, but this patch was mostly written by @bing2008.

Fixes #5258.
2022-01-24 22:41:41 -05:00
Ozkan Sezer 836a4ec7b1 updates to os/2 build 2022-01-08 22:35:02 +03:00
Ozkan Sezer 93cab32db3 minor update to test/Makefile.os2 2022-01-08 14:40:20 +03:00
Wouter Wijsman e0c5399119 Don't make psp eboot for testoffscreen 2022-01-06 13:33:17 -08:00
Wouter Wijsman eca198d519 Don't build an eboot for testgesture for PSP 2022-01-05 08:30:28 -08:00
Wouter Wijsman cd6cb959c0 Only copy resources to PSP eboot directory if it exists 2022-01-05 08:30:28 -08:00
Wouter Wijsman 9d0b4d85fc Don't build EBOOT files for all tests for PSP 2022-01-05 08:30:28 -08:00
Wouter Wijsman b2ca62f23a Make sure all tests have the resources they need 2022-01-05 08:30:28 -08:00
Wouter Wijsman fcb638ff90 Copy test resources to correct directory on PSP 2022-01-03 10:39:15 -08:00
Wouter Wijsman 5e84f6384f Rename test directories for PSP and only build PRX if asked 2022-01-03 10:39:15 -08:00
Wouter Wijsman bf2336078c Make tests build for PSP and make them able to launch 2022-01-03 10:39:15 -08:00
Sam Lantinga 120c76c84b Updated copyright for 2022 2022-01-03 09:40:21 -08:00
Ozkan Sezer 563ef2aeb2 regenerated configure scripts. 2021-12-01 01:56:50 +03:00
Ozkan Sezer efa1aa9a8f initial attempt at adding os2 support to autotools 2021-12-01 01:55:56 +03:00
Sam Lantinga 4b571c624c Added an option to map the touchpad button for Sony controllers 2021-11-29 09:00:26 -08:00
Ozkan Sezer ede73b4cfc testnativeos2.c: make its code style to match SDL2. 2021-11-28 23:02:02 +03:00
Sam Lantinga f1c15aa324 Tests cover the latest SDL features 2021-11-28 08:56:25 -08:00
Nate River 6c25aed419
added hint for joysticks to stablize sixaxis & dualshock controllers (#5007) 2021-11-27 11:01:18 -08:00
Ozkan Sezer d2871a348b testhaptic.c, testjoystick.c: fixed -Wshadow warnings. 2021-11-23 15:10:50 +03:00
Sam Lantinga e6a4230de9 Revert testevdev libc changes
This file uses internal SDL headers as a hack, without actually being built as part of SDL, so we should use normal C functions here.
2021-11-23 03:51:32 -08:00
Ozkan Sezer 3eaa80bb0b testgamecontroller.c: fixed -Wshadow warnings. 2021-11-23 14:22:02 +03:00
Ozkan Sezer 370b8318af testmouse.c: fixed -Wshadow warnings. 2021-11-23 14:01:10 +03:00
Sylvain f1582f549b Fix comment 2021-11-22 08:38:46 -08:00
Sylvain d31251b014 use SDL's functions version inplace of libc version 2021-11-22 08:38:46 -08:00