Sam Lantinga
3cbfd75d0f
Re-added the CRC to the joystick guid
...
This is now used as a crc field in the mapping rather than directly in mapping guids, for better mapping compatibility between versions of SDL.
Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID, so that mapping programs can clear the CRC from the GUID when generating mappings.
sort_controllers.py has been updated to extract the CRC from mappings created by older mapping programs and convert it into the new crc field. It will also take the CRC into account when checking for duplicate mappings.
Also regenerated the GUIDs for the PS2/PSP/Vita controller mappings, fixing https://github.com/libsdl-org/SDL/issues/6151
2022-08-27 19:00:31 -07:00
Cameron Gutman
2ceea46061
cmake: Enable CET compatibility for x86/x64 targets using VS 16.7+
2022-08-24 11:29:36 -07:00
Cameron Gutman
99e9156ff5
testgles2: Fix typo in help text
2022-08-16 20:38:55 -07:00
Cameron Gutman
222f1a2693
testgles2: Add --threaded option to use a render thread per window
...
This is helpful for reproducing bugs like #6056
2022-08-16 07:29:07 -07:00
Sam Lantinga
aaec244cfd
Don't run the stdio automated tests if libc isn't available
2022-08-10 09:05:55 -07:00
Sam Lantinga
d4192850c1
Added SDL_ResetHint() to reset a hint to the default value
...
Resolves question of how to clear an override hint raised by @pionere in https://github.com/libsdl-org/SDL/pull/5309
2022-08-10 08:01:24 -07:00
Pierre Wendling
73d8d02629
Test: Fix Exp base case for Win32.
...
Add epsilon to the check.
2022-08-09 21:39:46 -07:00
Ryan C. Gordon
3a9295e14f
build-scripts: Removed winrtbuild.*, no longer used.
...
WinRT/UWP is still supported, but you have to use the VS2019
project files, now.
Fixes #5639 .
2022-08-09 16:17:28 -04:00
Sam Lantinga
878259722f
Added SDL_GameControllerType enumeration for Nintendo Switch Joy-Con controllers
2022-08-08 08:22:20 -07:00
Francisco Javier Trujillo Mata
46f95a7a5f
Create dummy PS2 Video driver
2022-08-02 11:40:31 -07:00
Sam Lantinga
2fa2f9ff77
Greatly improved Nintendo Joy-Con support using the HIDAPI driver
...
* Added support for mini-gamepad mode for Joy-Con controllers, matching the mapping for hid-nintendo on Linux and iOS 16
* Added the ability to merge left and right Joy-Con controllers into a single Pro-style controller
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_COMBINE_JOY_CONS to control this merging functionality
* Removed the hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
2022-07-28 19:22:27 -07:00
Cameron Gutman
b8a5540740
testgamecontroller: Add battery reporting
2022-07-24 15:21:04 -05:00
Anonymous Maarten
ac9e8691a2
cmake: only build testnative when X11 is available
2022-07-21 14:49:35 +02:00
Sam Lantinga
7e2a996958
Added a virtual joystick automated test
...
Useful to verify 4fa2653394
on a big-endian system
2022-07-13 08:58:15 -07:00
Francisco Javier Trujillo Mata
643f9e56d0
Rename folder created in test_filesystem
2022-07-03 09:24:55 -07:00
Cameron Cawley
0a600b1df4
Merge testguid into testautomation ( #5873 )
2022-07-01 16:27:51 -07:00
Cameron Cawley
0025621b80
Add a default URL in testurl
2022-07-01 13:54:17 -07:00
Sam Lantinga
391dd0d94b
Don't spin as quickly as possible in the checkkeys rendering loop
2022-07-01 13:35:41 -07:00
Sam Lantinga
e9d5060c4c
checkkeys will now render text that is input
...
Also added test functions for multi-line debug text display
Currently this only supports ASCII, as the font doesn't have the correct Latin-1 characters
2022-07-01 12:56:47 -07:00
Sam Lantinga
24251fb544
Fixed checkkeys closing when tapping the screen on a phone
2022-06-29 17:40:45 -07:00
Sam Lantinga
cbd0187475
Removed the limit on the size of the SDL error message
...
Also added SDL_GetOriginalMemoryFunctions()
Fixes https://github.com/libsdl-org/SDL/issues/5795
2022-06-27 16:59:50 -07:00
chalonverse
3b191580c3
Windows GDK Support ( #5830 )
...
* Added GDK
* Simplfied checks in SDL_config_wingdk.h
* Added testgdk sample
* Added GDK readme
* Fixed error in merge of SDL_windows.h
* Additional GDK fixes
* OpenWatcom should not export _SDL_GDKGetTaskQueue
* Formatting fixes
* Moved initialization code into SDL_GDKRunApp
2022-06-27 10:19:39 -07:00
Francisco Javier Trujillo Mata
84d69da4e1
Initial SDL_ps2_main implementation
2022-06-27 00:32:43 -07:00
Anonymous Maarten
965c164537
cmake: let cmake test script make use of the installed cmake scripts
2022-06-23 14:17:38 +02:00
Anonymous Maarten
3e1021239a
cmake: also add the recently-added include folder to the public interface
2022-06-22 17:04:58 +02:00
Sam Lantinga
9065897514
Added test for digit count in sscanf, e.g. "%1x"
2022-06-18 06:53:05 -07:00
Sam Lantinga
28ecdc6bc7
No need to cast from char* to const char*
2022-06-18 06:52:46 -07:00
Sam Lantinga
5d5488ca71
Fixed test/versioning.sh on macOS
2022-06-16 12:41:31 -07:00
Francisco Javier Trujillo Mata
580416d3c8
Initial CMake configuration
2022-06-15 15:15:26 -07:00
Pierre Wendling
6bd3e0b189
Test: Check sqrt and atan against the epsilon.
...
On i686-linux, the `sqrt_regularCases` and `atan_limitCases` tests would
fail as the result was not precise enough.
2022-06-15 23:32:40 +03:00
Pierre Wendling
cee47a9ebe
Test: Use inexact helper for log10 regular cases.
...
On ARMv6, the result is not precise enough for this function.
2022-06-15 12:05:30 -07:00
Pierre Wendling
a52b8580f0
Test: Tidy up test descriptions and documentation.
...
Test function documentation now lists the input(s) and expected output(s).
Descriptions in TestCaseReference were updated.
2022-06-15 12:05:30 -07:00
Pierre Wendling
4d7f12f6bd
Test: Add Atan2 tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
8ebe640a36
Test: Change inexact tests to use an epsilon.
...
Instead of using `trunc` to check the first ten digits, inexact test now
relies on an epsilon defining an acceptable range for the expected
result to be in.
2022-06-15 12:05:30 -07:00
Pierre Wendling
62fd6aad39
Test: Add Atan tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
6a6e93bc29
Test: Add +/-0.0 tests to Acos.
2022-06-15 12:05:30 -07:00
Pierre Wendling
6b4b6d8e59
Test: Add Asin tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
43f6983a24
Test: Add Acos tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
95f6edb9a5
Test: Refactor trigonometric tests into a helper.
...
The precision test of these functions need a special helper, it can also
be used for their arc functions down the line.
2022-06-15 12:05:30 -07:00
Pierre Wendling
3b9f47b85f
Test: Remove early return in pow test.
2022-06-15 12:05:30 -07:00
Pierre Wendling
6be430c7f7
Test: Add Tan tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
af79b46f9e
Test: Add Sin tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
b06eda55e9
Test: Fix math suite build on Win32.
...
The cosine precision test now uses an array of double and the result
gets truncated instead of casted to signed int64.
2022-06-15 12:05:30 -07:00
Pierre Wendling
adb445eafb
Test: Add Cos tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
a864180cf3
Test: Add float header for FLT_RADIX definition.
2022-06-15 12:05:30 -07:00
Pierre Wendling
7a55fa4e56
Test: Add Scalbn tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
afd812374f
Test: Add Sqrt tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
c389c32d30
Test: Change assertion type in range tests.
...
Changes SDLTest_AssertPass(...) to SDLTest_AssertCheck(SDL_FALSE, ...)
for failed assertions so the internal counter gets updated properly.
2022-06-15 12:05:30 -07:00
Pierre Wendling
5ecc75a4fc
Test: Add Pow tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
6349ad7319
Test: Add Log10 tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
7041bbaf00
Test: Add Log tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
dd30ff2e31
Test: Add Exp tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
aacb5e1774
Test: Extract range test parameters into defines.
2022-06-15 12:05:30 -07:00
Pierre Wendling
75b9aab6c1
Test: Add Fmod tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
0dbdf90e7b
Test: Use SDLCALL in typedefs instead of ifdefs.
...
Thanks to @sezero for the tip.
2022-06-15 12:05:30 -07:00
Pierre Wendling
2ec48b36ba
Test: Fix OS/2 compilation in math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
43c22e5d1e
Test: Refactor math suite duplicate code.
...
Many tests were using the same underlying routine, as such three helper
functions were added:
- A wrapper to test double -> double functions.
- A wrapper to test (double, double) -> double functions,
- A wrapper for range tests on double -> double functions.
2022-06-15 12:05:30 -07:00
Pierre Wendling
3d720ba381
Test: Refactor math suites edge cases.
...
Split infinity and zero checks in their own functions.
The result of NAN tests is now logged.
The SDL_TestCaseReference structure were renamed to be more explicit.
2022-06-15 12:05:30 -07:00
Pierre Wendling
a530fc9199
Test: Add Copysign tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
48a406db4d
Test: Add Fabs tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
2130dff0fc
Test: Add Round tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
324b96153f
Test: Add Trunc tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
b09266a4ef
Test: Add Ceil tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
9eb09d2392
Test: Refactored and formatted math test suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
0f630e9177
Test: fix indentation in Makefile.in.
2022-06-15 12:05:30 -07:00
Pierre Wendling
4e3a26e271
Test: Add math test suite to autotools.
2022-06-15 12:05:30 -07:00
Pierre Wendling
e64acb619a
Test: Fix for-loop for OS/2 in math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
a3a852e912
Test: Unrolled the array of cases in math suite.
...
On OS/2, `INFINITY` is a `const double` which cannot be used to
instantiate an array.
2022-06-15 12:05:30 -07:00
Pierre Wendling
c23216bf46
Test: Removed static from local variables (Math).
...
Static would break compilation on OS/2.
2022-06-15 12:05:30 -07:00
Pierre Wendling
6646edf692
Test: Fix Windows build for math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
d9ff6380ae
Test: Add math test suite to Watcom Makefile.
2022-06-15 12:05:30 -07:00
Pierre Wendling
7389eba943
Test: Fix C89 declaration and math include.
2022-06-15 12:05:30 -07:00
Pierre Wendling
b3faebb8a8
Test: Add Floor tests to math.
2022-06-15 12:05:30 -07:00
Pierre Wendling
b72b5d0f99
Test: Add math automation test suite.
2022-06-15 12:05:30 -07:00
Anonymous Maarten
97711e99fe
cmake: no need to explicitly add a depency (target_link_libraries does this implicitly)
2022-06-15 11:11:49 -07:00
Anonymous Maarten
ad21c70408
cmake: fix CMP0072 warning by prefering GLVND
2022-06-15 11:11:49 -07:00
Ozkan Sezer
163f669745
minor tidy-up to configury.
2022-06-15 17:00:02 +03:00
Simon McVittie
e974985998
test: Add test coverage for surface size overflows
...
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-13 11:53:53 -07:00
Simon McVittie
63b3b9a558
Fix some typos in diagnostic messages
...
Detected by Debian's packaging QA tool, Lintian.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-13 08:33:27 -07:00
Eric Wasylishen
2830895740
testgles2.c: refresh cached SDL_GL_GetDrawableSize() on SDL_WINDOWEVENT_SIZE_CHANGED, not SDL_WINDOWEVENT_RESIZED
...
Fixes bug with viewport not updating when moving window between monitors with different scale
factors on Windows (this should also fix the same issue on other OS'es, though untested)
2022-06-11 14:19:01 -07:00
Eric Wasylishen
df36f926fc
testautomation: add video_setWindowCenteredOnDisplay test
2022-06-11 14:19:01 -07:00
Sam Lantinga
51d6d60f11
Updated to autoconf 2.71
2022-06-08 10:14:36 -07:00
Sam Lantinga
30cf26e089
Show the firmware version in testgamecontroller
2022-06-06 06:59:54 -07:00
Christoph Reichenbach
46624b4e1d
Removed two distracting gcc-11 warnings
2022-06-05 14:11:10 +03:00
Christoph Reichenbach
3a20274ddf
Refactoring: move GUID operations out of Joystick
...
- SDL_JoystickGUID -> SDL_GUID (though we retain a type alias)
- Operations for GUID <-> String ops are now in
src/SDL_guid.c and include/SDL_guid.h
- The corresponding Joystick operations delegate to SDL_guid.c
- Added test/testguid.c
2022-06-04 17:22:13 -07:00
Christoph Reichenbach
4e07d4722d
Build warning fixes for gcc-11.3
2022-06-04 17:41:00 +03:00
Sam Lantinga
345efdcb10
Wait for all the threads to actually finish before exiting
...
Fixes https://github.com/libsdl-org/SDL/issues/5748
2022-06-03 08:46:08 -07:00
Cameron Cawley
4c711d2d43
testcustomcursor: Allow running without custom or system cursors
2022-05-25 14:25:54 -07:00
Simon McVittie
a95f5a792c
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>
2022-05-20 22:22:20 +03:00
Ozkan Sezer
848d2008c6
test/Makefile.w32: fix minor typo
2022-05-20 21:10:56 +03:00
Cameron Cawley
83ae1b4987
Convert the test executables to AIF in RISC OS CMake builds
2022-05-19 15:26:13 -07:00
Cameron Cawley
d2b5965894
Remove extra path separator in GetNearbyFilename
2022-05-19 15:25:49 -07:00
Cameron Cawley
aa51a9791a
Run tests with OpenWatcom on CI
2022-05-19 20:11:10 +03:00
Cameron Cawley
9dfa000bc0
Initial support for building for Windows with OpenWatcom
2022-05-19 20:11:10 +03:00
Cameron Cawley
5ef36ead08
Add some missing tests to Watcom builds
2022-05-19 20:11:10 +03:00
Cameron Cawley
3066873126
Split the common code in test/Makefile.os2 into a separate file
2022-05-19 20:11:10 +03:00
Cameron Cawley
0cca71a846
Use SDLCALL for callbacks in public APIs
2022-05-18 15:01:27 -07:00
Sam Lantinga
0ffd985972
Check to see if the file exists in the base path before returning it
2022-05-18 10:10:51 -07:00
pionere
c4cf63f812
improve test-configuration
...
- testkeys 'NEEDS_DISPLAY'
- 'disable' relevant tests in case DUMMY audio/video is disabled
2022-05-18 09:06:56 -07:00
pionere
ea15253220
fix GetNearbyFilename
...
- fix memory leak due to variable 'base'
- fix usage of uninitialized variable (path)
2022-05-18 08:30:34 -07:00