test


Log

Author Commit Date CI Message
Sam Lantinga 345efdcb 2022-06-03T08:46:08 Wait for all the threads to actually finish before exiting Fixes https://github.com/libsdl-org/SDL/issues/5748
Cameron Cawley 4c711d2d 2022-05-25T22:12:25 testcustomcursor: Allow running without custom or system cursors
Simon McVittie a95f5a79 2022-05-20T19:43:02 test: Use install(1) more portably I had assumed that only Linux users would be interested in GNOME-style installed-tests, but in principle there's no reason why they can't be used on non-Linux. Signed-off-by: Simon McVittie <smcv@collabora.com>
Ozkan Sezer 848d2008 2022-05-20T21:10:56 test/Makefile.w32: fix minor typo
Cameron Cawley 83ae1b49 2022-05-19T23:11:22 Convert the test executables to AIF in RISC OS CMake builds
Cameron Cawley d2b59658 2022-05-19T22:54:23 Remove extra path separator in GetNearbyFilename
Cameron Cawley aa51a979 2022-05-19T13:14:29 Run tests with OpenWatcom on CI
Cameron Cawley 9dfa000b 2022-05-18T20:20:03 Initial support for building for Windows with OpenWatcom
Cameron Cawley 5ef36ead 2022-05-18T20:58:41 Add some missing tests to Watcom builds
Cameron Cawley 30668731 2022-05-18T20:56:30 Split the common code in test/Makefile.os2 into a separate file
Cameron Cawley 0cca71a8 2022-05-18T22:12:05 Use SDLCALL for callbacks in public APIs
Sam Lantinga 0ffd9859 2022-05-18T09:59:12 Check to see if the file exists in the base path before returning it
pionere c4cf63f8 2022-05-18T18:04:12 improve test-configuration - testkeys 'NEEDS_DISPLAY' - 'disable' relevant tests in case DUMMY audio/video is disabled
pionere ea152532 2022-05-18T17:23:26 fix GetNearbyFilename - fix memory leak due to variable 'base' - fix usage of uninitialized variable (path)
Ryan C. Gordon a12ffbd5 2022-05-17T12:49:36 testcustomcursor: Log the current cursor type as it changes. So you know what you're looking at.
Sam Lantinga 1f2a2416 2022-05-16T09:02:35 Add new virtual joysticks to the end of the list This guarantees that the device index that's returned is stable, as long as no joystick hotplug events occur.
Sam Lantinga 3c3ccb1d 2022-05-16T08:55:54 Fixed crash if a virtual joystick was disconnected
Sam Lantinga f0bc5c9c 2022-05-16T07:21:28 Added effects support for virtual controllers
Sam Lantinga e3fd8fea 2022-05-16T06:16:32 Fixed getting the controller index when specifying --virtual (thanks @zturtleman)
Sam Lantinga 94eeb587 2022-05-15T20:01:12 First pass at extending virtual controller functionality Added the ability to specify a name and the product VID/PID for a virtual controller Also added a test case to testgamecontroller, if you pass --virtual as a parameter
Simon McVittie d15f6e37 2022-05-09T18:19:21 test: Add a unit test for overflow detection Signed-off-by: Simon McVittie <smcv@collabora.com>
Cameron Cawley c71ee68b 2022-05-08T17:17:49 Fix enabling tests on platforms without testnative support
Cameron Cawley 318b5577 2022-05-08T20:59:10 Delete gcc-fat.sh
Ozkan Sezer db36664f 2022-05-05T18:55:02 configure.ac: remove unnecessary AC_SUBST's added by commit 38ef6789909c
Simon McVittie ce502054 2022-05-04T13:53:15 test: Install GNOME-style installed-tests metadata This allows these tests to be discovered and run by gnome-desktop-test-runner. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 38ef6789 2020-11-25T13:30:29 test: Add a `make install` target for the tests This makes it more convenient to compile them alongside SDL, install them in an optional package and use them as smoke-tests or diagnostic tools. The default installation directory is taken from GNOME's installed-tests, which seems as good a convention as any other: https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 76a7b629 2022-04-12T13:07:18 test: Add some common code to load test resources As well as reducing duplication, this lets the tests load their resources from the SDL_GetBasePath() on platforms that support it, which is useful if the tests are compiled along with the rest of SDL and installed below /usr as manual tests, similar to GNOME's installed-tests convention. Thanks to Ozkan Sezer for the OS/2 build glue. Co-authored-by: Ozkan Sezer <sezeroz@gmail.com> Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 40bef98f 2022-05-04T19:16:01 test: Add a mode to skip tests that involve arbitrary delays This can be used as a quick acceptance test for CI workflows. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 7d2808e3 2022-04-12T13:33:58 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>
Simon McVittie b299f74d 2022-05-04T15:34:41 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>
Simon McVittie 6fc7aa28 2022-05-04T13:15:12 cmake: Add some missing test-cases These were built by Autotools but not by CMake. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 2a8297e4 2022-05-04T16:43:59 workflows: Add a test to assert that all the version numbers agree Signed-off-by: Simon McVittie <smcv@collabora.com>
Cameron Cawley b398a847 2022-05-03T23:21:10 Add SDL_FLOATWORDORDER for older ARM toolchains
Susko3 f25a78ee 2022-05-03T00:40:42 Enable `SDL_TEXTEDITING_EXT` events in `checkkeys` test
Sam Lantinga 0687128c 2022-04-29T20:57:00 Reduce CPU usage in testgamecontroller
Eddy Jansson 5c1f5a73 2022-04-28T20:57:20 test: Correct invalid enum length. Ensure that they can't break like this again.
Ryan C. Gordon 7d7ec9c9 2022-04-26T16:41:28 x11: Remove XVidMode and Xinerama support. Fixes #1782.
Sam Lantinga e551384a 2022-04-26T14:54:14 Added functions to get the platform dependent name for a joystick or game controller
Eddy Jansson 5bc29334 2022-04-20T15:53:25 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.
Simon McVittie 68b6fff2 2022-04-12T14:05:06 test: Copy utf8.txt to build directory testiconv wants this. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie b4256d03 2022-04-12T14:25:26 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>
Simon McVittie c2946902 2022-04-12T14:16:29 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>
capehill 006a5a9e 2022-03-28T21:01:06 testgles2: Fix buffer object sizes
Christoph Reichenbach 6cd444f0 2022-04-02T21:28:56 Visualise scroll wheel events in testmouse
capehill 0dcfa92e 2022-03-26T19:31:17 testgles2: Call correct function to get shader info log and add link status checking
Ryan C. Gordon beecae31 2022-03-26T08:42:09 testshader: use SDL_malloc instead of SDL_stack_alloc.
capehill d6122704 2022-03-26T12:40:08 Initialize compile status variable and check also program link status
Sylvain 7f1feee0 2022-03-21T10:20:04 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()."
Ozkan Sezer 01663238 2022-03-17T14:56:50 testplatform.c: move static asserts out of TestTypes().
Sylvain c44966b7 2022-03-15T17:48:38 Fixed bug #2691 - re-enable surface_testCompleteSurfaceConversion for ARGB2101010
IOBYTE 13756b5c 2022-03-04T10:47:25 Add X1 and X2 button support to mouse test
Sam Lantinga 18032979 2022-02-15T13:07:51 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)
Wouter Wijsman 4cb61818 2022-02-10T18:58:50 Do not build loadso test eboot for PSP
Sylvain 94e5c3f3 2022-02-08T11:38:34 testgesture: display device name with SDL_GetTouchName()
Ryan C. Gordon ca22b30e 2022-01-24T22:32:58 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.
Ozkan Sezer 836a4ec7 2022-01-08T22:35:02 updates to os/2 build
Ozkan Sezer 93cab32d 2022-01-08T14:40:20 minor update to test/Makefile.os2
Wouter Wijsman e0c53991 2022-01-06T22:29:23 Don't make psp eboot for testoffscreen
Wouter Wijsman eca198d5 2022-01-05T11:50:52 Don't build an eboot for testgesture for PSP
Wouter Wijsman cd6cb959 2022-01-05T11:33:51 Only copy resources to PSP eboot directory if it exists
Wouter Wijsman 9d0b4d85 2022-01-05T11:18:26 Don't build EBOOT files for all tests for PSP
Wouter Wijsman b2ca62f2 2022-01-05T11:18:09 Make sure all tests have the resources they need
Wouter Wijsman fcb638ff 2022-01-03T19:12:09 Copy test resources to correct directory on PSP
Wouter Wijsman 5e84f638 2022-01-03T18:56:02 Rename test directories for PSP and only build PRX if asked
Wouter Wijsman bf233607 2022-01-03T18:41:21 Make tests build for PSP and make them able to launch
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Ozkan Sezer 563ef2ae 2021-12-01T01:56:50 regenerated configure scripts.
Ozkan Sezer efa1aa9a 2021-12-01T01:55:56 initial attempt at adding os2 support to autotools
Sam Lantinga 4b571c62 2021-11-29T09:00:26 Added an option to map the touchpad button for Sony controllers
Ozkan Sezer ede73b4c 2021-11-28T23:02:02 testnativeos2.c: make its code style to match SDL2.
Sam Lantinga f1c15aa3 2021-11-28T08:56:25 Tests cover the latest SDL features
Nate River 6c25aed4 2021-11-27T14:01:18 added hint for joysticks to stablize sixaxis & dualshock controllers (#5007)
Ozkan Sezer d2871a34 2021-11-23T15:10:50 testhaptic.c, testjoystick.c: fixed -Wshadow warnings.
Sam Lantinga e6a4230d 2021-11-23T03:51:32 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.
Ozkan Sezer 3eaa80bb 2021-11-23T14:22:02 testgamecontroller.c: fixed -Wshadow warnings.
Ozkan Sezer 370b8318 2021-11-23T14:01:10 testmouse.c: fixed -Wshadow warnings.
Sylvain f1582f54 2021-11-22T11:27:40 Fix comment
Sylvain d31251b0 2021-11-21T22:30:48 use SDL's functions version inplace of libc version
Ozkan Sezer fadf41fc 2021-11-20T21:55:20 remove excess whitespace
Ryan C. Gordon e86d4bde 2021-11-20T13:33:29 test: Makefile should copy unifont file, for testime.c to use.
Ozkan Sezer 495ee42a 2021-11-20T01:15:20 testcustomcursor.c: replaced libc sscanf with SDL_sscanf
Ozkan Sezer 990fb668 2021-11-20T01:02:02 tests: several -Wwrite-strings fixes.
Cameron Gutman eb98ff47 2021-11-13T13:05:02 testmessage: Fix overread of stack variable
Ozkan Sezer 62b41f61 2021-11-13T21:29:50 fix build of testmouse.c
Cameron Gutman f124259e 2021-11-12T17:25:24 testautomation: fix use-after-free when restoring hint value
Ozkan Sezer e688a95b 2021-11-12T23:55:40 updated os2 makefile for tests
Misa 3bf7994f 2021-09-27T14:38:12 Add and use `SDL_FALLTHROUGH` for fallthroughs Case fallthrough warnings can be suppressed using the __fallthrough__ compiler attribute. Unfortunately, not all compilers have this attribute, or even have __has_attribute to check if they have the __fallthrough__ attribute. [[fallthrough]] is also available in C++17 and the next C2x, but not everyone uses C++17 or C2x. So define the SDL_FALLTHROUGH macro to deal with those problems - if we are using C++17 or C2x, it expands to [[fallthrough]]; else if the compiler has __has_attribute and has the __fallthrough__ attribute, then it expands to __attribute__((__fallthrough__)); else it expands to an empty statement, with a /* fallthrough */ comment (it's a do {} while (0) statement, because users of this macro need to use a semicolon, because [[fallthrough]] and __attribute__((__fallthrough__)) require a semicolon). Clang before Clang 10 and GCC before GCC 7 have problems with using __attribute__ as a sole statement and warn about a "declaration not declaring anything", so fall back to using the /* fallthrough */ comment if we are using those older compiler versions. Applications using SDL are also free to use this macro (because it is defined in begin_code.h). All existing /* fallthrough */ comments have been replaced with this macro. Some of them were unnecessary because they were the last case in a switch; using SDL_FALLTHROUGH in those cases would result in a compile error on compilers that support __fallthrough__, for having a __attribute__((__fallthrough__)) statement that didn't immediately precede a case label.
Sam Lantinga abc12a83 2021-11-11T15:58:44 Revert "Add and use `SDL_FALLTHROUGH` for fallthroughs" This reverts commit 66a08aa3914a98667f212e79b4f0b9453203d656. This causes problems with older compilers: https://github.com/libsdl-org/SDL/pull/4791#issuecomment-966630997
Cameron Gutman fe09a493 2021-11-11T15:53:11 joystick: Add APIs to query rumble support
Misa 66a08aa3 2021-09-27T14:38:12 Add and use `SDL_FALLTHROUGH` for fallthroughs Case fallthrough warnings can be suppressed using the __fallthrough__ compiler attribute. Unfortunately, not all compilers have this attribute, or even have __has_attribute to check if they have the __fallthrough__ attribute. [[fallthrough]] is also available in C++17 and the next C2x, but not everyone uses C++17 or C2x. So define the SDL_FALLTHROUGH macro to deal with those problems - if we are using C++17 or C2x, it expands to [[fallthrough]]; else if the compiler has __has_attribute and has the __fallthrough__ attribute, then it expands to __attribute__((__fallthrough__)); else it expands to an empty statement, with a /* fallthrough */ comment (it's a do {} while (0) statement, because users of this macro need to use a semicolon, because [[fallthrough]] and __attribute__((__fallthrough__)) require a semicolon). Applications using SDL are also free to use this macro (because it is defined in begin_code.h). All existing /* fallthrough */ comments have been replaced with this macro. Some of them were unnecessary because they were the last case in a switch; using SDL_FALLTHROUGH in those cases would result in a compile error on compilers that support __fallthrough__, for having a __attribute__((__fallthrough__)) statement that didn't immediately precede a case label.
Sam Lantinga dc4c7d95 2021-11-10T09:48:49 Fixed infinite loop in SDL_vsnprintf() if the format string is too large for the output buffer Fixes https://github.com/libsdl-org/SDL/issues/4940
Eric Wasylishen 0d987936 2021-11-09T22:03:42 testwm2: Fix video modes menu hit detection when highdpi or logical size used (#4936) * SDLTest_CommonDrawWindowInfo: log SDL_RenderGetScale, SDL_RenderGetLogicalSize * testwm2: fix video modes menu hit detection in High DPI cases - also when logical size is specified, e.g. `--logical 640x480 --resizable --allow-highdpi` * add function to determine logical coordinates of renderer point when given window point * change since to the targeted milestone * fix typo * rename for consistency * Change logical coordinate type to float, since we can render with floating point precision. * add function to convert logical to window coordinates * testwm2: use new SDL_RenderWindowToLogical * SDL_render.c: alternate SDL_RenderWindowToLogical/SDL_RenderLogicalToWindow Co-authored-by: John Blat <johnblat64@protonmail.com> Co-authored-by: John Blat <47202511+johnblat64@users.noreply.github.com>
Sam Lantinga cdb4d8f2 2021-11-07T09:39:57 Added a test case for snprintf of 0.0 This verifies regressions in https://github.com/libsdl-org/SDL/issues/4795
Eric Wasylishen a0e055a7 2021-11-07T02:48:29 testwm2: add mode menu, click on a mode to call SDL_SetWindowDisplayMode
Sam Lantinga 35b0baaa 2021-11-06T19:25:06 Unfixed typo
Sam Lantinga 1d40c69a 2021-11-05T22:52:03 Fixed typo
Eddy Jansson e2ba84a5 2021-11-02T19:30:17 testtimer: Be more like the C90's.
Eddy Jansson 4ab7ee19 2021-11-02T18:58:06 testtimer: Add basic sanity check for SDL_GetTicks*()
Ryan C. Gordon d78cb9e9 2021-10-23T19:27:10 testtimer: added SDL_GetTicks64() calls.
Cameron Gutman 210713a6 2021-10-31T19:11:09 cmake: Work around bug in opengl32.lib detection on MSVC ARM64