Lukas Dürrenberger
a0c6381c2b
Add a graphical test for RectangleShape
2024-06-11 13:47:15 +02:00
Chris Thrasher
5484824948
Remove unnecessary static casts
2024-06-05 11:54:36 -06:00
Chris Thrasher
9722fb3724
Add tests for Audio module types
2024-05-16 12:06:21 -06:00
vittorioromeo
884206ce0c
Store angles internally as radians
2024-05-14 13:07:40 -06:00
Chris Thrasher
7bb97a85b1
Compile unit tests for iOS and Android
...
While you can't easily run these unit tests, it's easy enough to
still compile them so we don't need to go out of way to prohibit
this. CMake has some support for running tests on the target OS
so perhaps in the future we find a compelling way to run the test
suite on a mobile OS.
2024-04-13 11:49:45 -06:00
Chris Thrasher
30fcb3523c
Use loadIntoMemory
2024-04-12 11:49:11 -06:00
Chris Thrasher
efcfaf06fb
Improve test coverage
2024-04-11 12:59:06 -06:00
vittorioromeo
b552148e26
Header cleanup guided by IWYU
2024-02-09 12:52:23 +01:00
Kipernal
eb07e1e6c5
Added support for stencil testing.
...
Co-authored-by: binary1248 <binary1248@hotmail.com>
Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
2024-01-29 08:13:14 -07:00
kimci86
b496877c90
Make BlendMode::Factor and BlendMode::Equation scoped enumerations
2024-01-27 15:31:30 -07:00
Chris Thrasher
dbb87db026
Add more tests for sf::Text
2023-09-28 12:41:29 -06:00
Chris Thrasher
f6dfc04938
Switch to Catch2
2023-05-13 12:38:11 -06:00
vittorioromeo
c6226258db
Improve test utility header compilation speed
2023-04-13 16:33:49 +02:00
Chris Thrasher
b6c54ac589
Use unity builds to speed up clang-tidy runtime
2023-03-14 10:08:23 -06:00
Chris Thrasher
2af65286b7
Add tests for sf::WindowBase
2023-02-08 00:22:42 -07:00
Chris Thrasher
84f56d0936
Add option for skipping tests that require an attached display
2023-01-18 16:06:00 -07:00
Chris Thrasher
badb388507
Remove unnecessary casts
2023-01-11 15:30:22 -07:00
Jim-Marsden
7884efc49e
Replaced Header Guards with Pragma Once
2022-12-27 20:08:11 +01:00
Chris Thrasher
e44a4b305d
Simplify operator<<
implementations
2022-10-01 23:19:52 +02:00
Chris Thrasher
acabaadc0b
Remove unnecessary sf::
usage
2022-10-01 23:19:52 +02:00
Chris Thrasher
a47eb8320a
Remove vendored doctest header
2022-07-20 08:56:59 +02:00
Chris Thrasher
4f52793f7d
Run clang-format
2022-07-11 20:04:56 +02:00
Chris Thrasher
fd3526f742
Use <>
for test utilities includes
...
SFML convention is to only use "" includes when the header is in
the same directory as the file including it. Because these test
util headers are in a separate directory, it makes more sense to
include them via <>.
2022-06-27 00:22:16 +02:00
Chris Thrasher
44d3d63ade
Reduce the scope of helper class
2022-06-26 02:14:53 +02:00
Vittorio Romeo
8a2aa6397f
Explicitly instantiate float vector members in cpp
2022-06-24 18:47:28 +02:00
Chris Thrasher
7dd001e5c0
Simplify approximate comparisons of SFML types
...
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2022-05-25 13:36:12 +02:00
Chris Thrasher
049e3ce8f2
Increase precision of operator<<(Vector2<T>)
2022-05-17 20:30:17 +02:00
Chris Thrasher
0785093ebc
Use sf::Vector2<T>
for numeric parameter pairs
2022-05-17 08:33:11 +02:00
Chris Thrasher
488b139ea7
Fix conversion warning
2022-05-16 19:05:35 +02:00
Bambo-Borris
b2ab6d6ab3
Add extension methods to Vector3<T>
...
Includes relevant tests and updates TestUtilities to feature ApproxVec2 & ApproxVec3
2022-05-16 08:59:42 +02:00
Chris Thrasher
829cf3b502
Apply compiler warnings to test utilities
2022-05-09 15:38:24 +02:00
Chris Thrasher
c0a6cf1f0c
Remove unnecessary lossy conversions in test utilities
...
Both ApproxVec and ApproxDeg accept a double then convert that to
a float just to then convert it back to a double. We can save an
extra lossy conversion by just accepting a float instead of a double
in the first place.
2022-05-04 09:03:04 +02:00
Chris Thrasher
2a5ce3c989
Apply compiler warnings to tests
2022-05-02 08:39:02 +02:00
Chris Thrasher
2adc3c0e23
Increase precision of sf::Rect<T>
operator<<
...
This has been a recurring problem. I had to add similar code to the
sf::Angle operator<< because I was getting tiny floating point
differences that after rounding were imperceptable.
2022-04-08 16:46:51 +02:00
Chris Thrasher
bc7ec1277a
Move sf::Rect
printer to GraphicsUtil
2022-03-30 09:06:08 +02:00
Jan Haller
2eef193c0e
Unit tests for Vector2 extensions
...
Also adds ApproxVec and ApproxDeg types for more readable comparison of approximate vectors/angles.
2022-02-28 16:18:00 +00:00
Chris Thrasher
ec4ac1afc4
Remove GCC 8 workarounds
2022-02-17 00:40:29 +00:00
binary1248
359fe9088c
Fixed warnings reported by LGTM and Coverity Scan.
2022-02-16 08:26:17 +01:00
Chris Thrasher
28f273b9c9
Add sf::Angle
...
Similar to sf::Time, sf::Angle provides a typesafe API for working
with angles and provides named functions for converting to and from
degrees and radians.
2022-02-08 22:52:37 +00:00
Chris Thrasher
7cdb728e52
Add tests for sf::BlendMode
2022-01-20 07:39:19 +01:00
Chris Thrasher
b717a68fba
Add tests for sf::Transform
2022-01-08 15:06:12 +01:00
Chris Thrasher
3d01efb80a
Use operator<< for printing during test failure
2022-01-07 20:04:54 +01:00
Vittorio Romeo
3dc8fc0923
Add 'NetworkUtil' for network module tests
2022-01-03 01:00:55 +01:00
Vittorio Romeo
29983aa8d4
Replace Catch with Doctest
2021-12-24 15:06:32 +01:00
Chris Thrasher
ade9843dd8
Collapse test/src directory
2021-12-24 11:56:58 +01:00