Commit Graph

54 Commits

Author SHA1 Message Date
Chris Thrasher
49fd5887c8 Add tests for SFML/Config.hpp 2022-08-03 23:39:37 +02:00
Chris Thrasher
a47eb8320a Remove vendored doctest header 2022-07-20 08:56:59 +02:00
Bambo-Borris
c6f7fcaa2a Add tests for sf::MemoryInputStream 2022-06-28 14:33:21 +02:00
Chris Thrasher
a57640c2c8 Require stringification for all tested types
This ensures that if a printing function is not provided, compilation
fails. This prevents problems where a header is accidentally removed
that was previously providing an operator<< overload or prevents
new tests from being added without print support for all directly
tested types.
2022-06-27 00:22:16 +02:00
Chris Thrasher
e4e9b290b1 Add tests for sf::IpAddress 2022-06-23 18:47:23 +02:00
Bambo-Borris
8b3723a52b Add tests for sf::Image 2022-06-21 15:14:27 +02:00
Chris Thrasher
6a59ab0051 Add tests for sf::ConvexShape 2022-06-09 10:05:29 +02:00
Chris Thrasher
3203c3927f Add tests for sf::RenderStates 2022-06-07 08:25:52 +02:00
Chris Thrasher
58e93ddd19 Add tests for sf::View 2022-06-01 08:09:29 +02:00
Chris Thrasher
60131b19ef Add tests for sf::Glyph 2022-06-01 08:09:29 +02:00
Chris Thrasher
1e6dc82304 Add tests for sf::CircleShape 2022-05-17 20:30:17 +02:00
Chris Thrasher
829cf3b502 Apply compiler warnings to test utilities 2022-05-09 15:38:24 +02:00
Chris Thrasher
1e560ababd Add tests for sf::err 2022-05-02 09:53:04 +02:00
Chris Thrasher
9010e7ba38 Add tests for sf::RectangleShape 2022-04-12 08:15:44 +02:00
Chris Thrasher
9cbd9c5976 Add tests for sf::Shape 2022-04-08 16:46:51 +02:00
Chris Thrasher
f3d98a9ebf Require all modules are built before building tests 2022-04-02 12:17:59 +02:00
Chris Thrasher
5c9b571c70 Add tests for sf::VertexArray 2022-03-16 09:56:29 +01:00
Chris Thrasher
2e6c363e64 Mark external headers as SYSTEM headers
Among other benefits this ensures that the compiler doesn't emit
warnings on headers in these paths.
2022-03-10 21:26:39 +01:00
Chris Thrasher
80004d87b1 Build sf::Transformable tests
Transformable.cpp was originally compiled when I first submitted
PR #1973. While that PR was in review, #2012 got merged which
changed how tests are compiled. These two PR were in conflict so
when I went to resolve conflicts on #1973, I accidentaly removed
the line which added Transformable.cpp to the build. Because not
compiling this file caused no build breaks, nobody noticed until
after #1973 got merged. My bad, everybody.
2022-02-18 19:48:29 +00:00
Chris Thrasher
abe420897d Add tests for sf::Transformable 2022-02-17 20:48:30 +00:00
Chris Thrasher
5236513f16 Simplify how tests are built 2022-02-16 13:51:29 +00:00
binary1248
66339bc09c Added support for coverage reporting. 2022-02-10 08:08:47 +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
0ad6d1815c Remove unnecessary CMake version requirement
This is left over from 0f83e3d but we forgot to remove it. Nothing
about this file requires an elevated minimum CMake version now that
the FetchContent usage is gone.
2022-01-22 15:51:27 +01:00
kimci86
ad21794f39 Fix runtests target for multi-configuration generators 2022-01-21 21:19:32 +01:00
Chris Thrasher
7cdb728e52 Add tests for sf::BlendMode 2022-01-20 07:39:19 +01:00
Chris Thrasher
871c021a75 Add tests for sf::ContextSettings 2022-01-13 23:49:37 +01:00
Chris Thrasher
da6a226941 Add tests for sf::Clock 2022-01-11 22:49:00 +00:00
Chris Thrasher
4586db91a9 Add SFML:: namespace to targets
This removes the sfml- prefixed targets from the export set. The sfml-
prefixed targets are still available within the build tree but not to
downstream users thus making this an API breaking change when compared
to the 2.x releases. To keep things consistent, usage of the sfml-
targets were replaced with their namespaced counterparts.

This has a number of benefits:

  1. It's more idiomatic. Modern CMake libraries are expected to
     have namespaced targets.

  2. Namespaced targets are less likely to collide with user-defined
     targets. No one will accidentally define a SFML:: target.

  3. If a namespaced target is not found by CMake, configuration
     will immediately stop.
2022-01-11 22:27:39 +01:00
Chris Thrasher
b717a68fba Add tests for sf::Transform 2022-01-08 15:06:12 +01:00
Chris Thrasher
6c816aba44 Add tests for sf::Vertex 2022-01-06 20:02:09 +01:00
Vittorio Romeo
3dc8fc0923 Add 'NetworkUtil' for network module tests 2022-01-03 01:00:55 +01:00
Chris Thrasher
f5541d22e5 Add tests for sf::VideoMode 2021-12-27 19:09:35 +01:00
Vittorio Romeo
50d28e3879 Add tests for 'sf::Color' 2021-12-27 17:35:06 +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
Chris Thrasher
54b8a691d1 Add unit tests for sf::Time 2021-12-23 20:34:33 +01:00
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
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