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