Commit Graph

20 Commits

Author SHA1 Message Date
Chris Thrasher
cd1cc62f6d Fix issue with MinGW not handling large files 2021-12-21 23:11:15 +01:00
Chris Thrasher
0f83e3d266 Use FetchContent to grab latest Catch2 release
The key benefit here is that now we're linking against their CMake
target which makes it easy to change how we depend on Catch2. We
can switch from FetchContent to FindPackage to a git submodule and
never have to change our code because we're depending on Catch2 in
the most flexible way possible.
2021-12-21 23:11:15 +01:00
Chris Thrasher
dda821597b Only compile Catch main once
Because Catch is so expensive to compile, it's really helpful for
initial compile times if this target doesn't have to be recompiled
so often. This won't make a huge impact on developers who are mostly
doing incremental builds but can have a meaningful impact on CI
runners that are always doing clean builds.
2021-12-19 23:11:14 +01:00
Vittorio Romeo
ae3a38345d Add tests for 'Vector' destructuring and 'constexpr' support 2021-12-16 22:19:59 +01:00
Pawel Paruzel
11020363b1 Fix wrong cast in sf::Packet
Add unit tests
2021-12-06 08:06:20 +01:00
Lukas Dürrenberger
7e7216f598 Renamed test targets to test-sfml-module structure 2019-02-19 10:16:38 +01:00
=
53972ed5f2 Use sfml_add_test macro for unit tests and copy dlls to output directory if required 2019-02-19 10:16:38 +01:00
Lukas Dürrenberger
c626332e03 Disabled tests by default 2019-02-19 10:16:38 +01:00
Jonny Paton
d53858afb1 Removed incompatible cmake/catch functionality, replaced with vanilla cmake 2019-02-19 10:16:38 +01:00
Jonny Paton
bc7258006c Restructure test source folders 2019-02-19 10:16:38 +01:00
Jonny Paton
d3a072fb63 Use modern cmake testing functionality including catch integration 2019-02-19 10:16:38 +01:00
Lukas Dürrenberger
a88e854dc3 Added test cases for Vector3<T> 2019-02-19 10:16:38 +01:00
Lukas Dürrenberger
d402ce5a5d Separated test suites into their individual modules
- Building per module only requires to have split test utility sections
- System module tests are always added, as the system module is always built
2019-02-19 10:16:38 +01:00
Lukas Dürrenberger
7d496095a5 Updated catch to v1.12.2 2019-02-19 10:16:38 +01:00
Jan Haller
11b3fe4283 Added tags (module names) in TEST_CASE macros 2019-02-19 10:16:38 +01:00
Jan Haller
c3e5a35a6e Added string conversions for equality-comparable classes
Provides a Catch::toString() overload for the following SFML classes, that support at least operator== and operator!=, and can thus be used in Catch assertion expressions:
* String
* Time
* Vector2<T>
* Vector3<T>
* VideoMode
* Color
* Rect<T>

The intermediate header UnitTests.hpp is introduced to ensure string conversion visibility.
Do not include <catch.hpp> directly any longer.
2019-02-19 10:16:38 +01:00
Zack Mulgrew
620c9989d6 Add unit test for Rect.hpp 2019-02-19 10:16:38 +01:00
Jan Haller
5b08f8133f Used LF as line ending; added line break for echo output
winline
2019-02-19 10:16:38 +01:00
Jan Haller
a85dc6dabb Rewrote Vector2 tests in a more concise way 2019-02-19 10:16:38 +01:00
Stefan Schindler
3d46e39e6d Added Catch unit test framework. Added Vector2(i) unit test. Re-enabled CMake's RPATH feature. 2019-02-19 10:16:38 +01:00