Commit Graph

98 Commits

Author SHA1 Message Date
Chris Thrasher
9722fb3724 Add tests for Audio module types 2024-05-16 12:06:21 -06:00
Chris Thrasher
0777ce5ead Update to Catch2 v3.6.0 2024-05-07 17:02:47 +00:00
binary1248
2386653bd3 Add GitHub actions support for running x86, x86_64 and arm64-v8a Android tests using an Android emulator. 2024-05-04 17:22:12 +00:00
binary1248
34fde883b9 Replaced OpenAL with miniaudio.
Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
Co-authored-by: kimci86 <kimci86@hotmail.fr>
Co-authored-by: vittorioromeo <mail@vittorioromeo.com>
2024-04-25 10:24:11 +02:00
Chris Thrasher
95a23c2d05 Add type trait tests for sf::SoundFileWriter
Other Audio module types get this same treatment so we ought to
also have a .test.cpp for this header.
2024-04-16 17:05:42 -06:00
Chris Thrasher
cb651c063c Add tests for sf::SoundFileReader 2024-04-16 17:05:42 -06:00
binary1248
7e1765717a Fixed coverage data not being collected for MinGW builds because OpenCPPCoverage relies on pdb data being available. 2024-04-11 17:32:24 -06:00
binary1248
90fb07066b Replaced Codecov with Coveralls. 2024-04-11 10:46:27 -06:00
Chris Thrasher
f1bdacb57f Add tests for sf::Glsl types 2024-04-10 20:39:20 -06:00
Lukas Dürrenberger
e3b7d87373 Update Catch2 to v3.5.4 2024-04-10 19:17:11 -06:00
Chris Thrasher
d7fb1bf0f6 Upgrade Catch2 2024-03-04 14:51:00 -07:00
vittorioromeo
72d30e7beb Update Catch2 to v3.5.2 2024-02-05 19:58:44 +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
Corentin Schreiber
ebf485737f Add texture coordinate type to sf::RenderStates 2024-01-25 23:45:00 -07:00
Chris Thrasher
ea42079da9 Update Catch2
https://github.com/catchorg/Catch2/releases/tag/v3.5.0
2023-12-10 19:40:28 -07:00
Chris Thrasher
f3341359eb Add tests for sf::SoundFileFactory 2023-11-26 19:53:07 -05:00
binary1248
8c9c5c5b99 Added missing SFML_USE_STATIC_STD_LIBS checks to CMake configuration. 2023-10-31 23:22:28 +01:00
Chris Thrasher
2cbcd60a45 Remove redundant link library
Clang was warning about this

  ld: warning: ignoring duplicate libraries: 'lib/libsfml-system-s-d.a'
2023-10-23 13:07:27 +02:00
Chris Thrasher
3750074238 Add tests for sf::Vulkan 2023-09-24 21:12:18 -06:00
Chris Thrasher
f40d5ac21d Add tests for sf::Joystick 2023-09-24 20:58:41 -06:00
Chris Thrasher
d56e1838a0 Shallow clone Catch2
This takes a 4 second configuration time for the entire project with
examples and tests and turns that into 3! Whopping 25% reduction in
configuration time. This effect is likely to be even larger on machines
without exceptionally good internet connections.

Before:
  $ hyperfine 'rm -rf build && cmake --preset dev'
  Benchmark 1: rm -rf build && cmake --preset dev
    Time (mean ± σ):      4.076 s ±  0.130 s    [User: 2.148 s, System: 1.376 s]
    Range (min … max):    3.963 s …  4.321 s    10 runs

After:
  $ hyperfine 'rm -rf build && cmake --preset dev'
  Benchmark 1: rm -rf build && cmake --preset dev
    Time (mean ± σ):      3.007 s ±  0.313 s    [User: 1.061 s, System: 1.160 s]
    Range (min … max):    2.783 s …  3.805 s    10 runs

Co-authored-by: binary1248 <binary1248@hotmail.com>
2023-09-15 16:07:52 -06:00
Chris Thrasher
d304d1e57b Add tests for sf::Clipboard 2023-09-05 16:18:18 -06:00
Chris Thrasher
71162395d7 Add tests for sf::Keyboard 2023-09-05 15:19:53 -06:00
Chris Thrasher
05b69119e4 Add tests for sf::Event 2023-08-27 10:04:14 -06:00
Chris Thrasher
bb9ba0d7ef Update Catch2
https://github.com/catchorg/Catch2/releases/tag/v3.4.0
2023-07-13 11:19:17 -06:00
Chris Thrasher
e6cc75f8a6 Fix how we specify CATCH_CONFIG_FAST_COMPILE
Fixes a warning that was emitted about how we were doing this wrong
after CMake policy 0077 was added.
2023-05-18 10:43:58 -06:00
Chris Thrasher
f6dfc04938 Switch to Catch2 2023-05-13 12:38:11 -06:00
Chris Thrasher
1c5c8ad700 Add tests for sf::sleep 2023-04-28 15:01:11 -06:00
binary1248
acba3e6165 Replaced xvfb-run with manually starting Xvfb and running fluxbox to emulate a window manager and combined test and coverage steps into a single step. 2023-03-27 19:46:07 -06:00
Chris Thrasher
0b62543942 Don't automatically run tests after build
The runtests target must be used on Windows for the sake of code
coverage. However we can't use that target on all other platforms
because on some non-Windows platforms like Android, the tests don't
even get configured. If you try to build a target that doesn't exist
you get a hard failure. Using CTest is better because it will still
return zero even if no tests are found as is the case on Android.
2023-03-14 20:23:17 -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
b2e918bafc Simplify how test runner command is created 2023-01-18 16:06:00 -07:00
Chris Thrasher
e8fa5d7d31
Add CI job for Clang on Windows 2022-12-14 15:26:08 -07:00
Chris Thrasher
4807c779a7 Apply warnings to install test
Because the install test project can't access SFML CMake functions,
these warnings are only applied when building the install tests as
a part of SFML.
2022-11-29 00:47:32 -07:00
Jonny Paton
e4bffe5b84 Rename test files to be unique 2022-10-23 16:39:12 +02:00
Chris Thrasher
3d02d490bd Hide doctest sources from compile commands database
This ensure that tools like run-clang-tidy don't try to analyze them
and better mimmicks how Doctest would behave if we were depending on
Doctest via find_package instead.
2022-10-17 18:29:56 -06:00
Chris Thrasher
229e3f61f4 Use doctest-provided main implementation 2022-10-16 14:55:33 -06:00
Chris Thrasher
e4f81af337 Test install interface
Skip Android, iOS, and Framework builds simply because I can't get
them to work and don't want that holding up getting the rest of the
install tests merged.

Skip the Static DRM install test because there's a bug in the install
that needs to be fixed.
2022-10-15 09:07:49 +02:00
Chris Thrasher
ff685de1bf Ensure add_custom_command uses VERBATIM
https://cmake.org/cmake/help/latest/command/add_custom_command.html

"Use of VERBATIM is recommended as it enables correct behavior."

The docs basically say that this is required.
2022-10-12 00:23:35 +02:00
Chris Thrasher
b848a7b29a Only reference the project's directories, not parent directories 2022-10-12 00:23:35 +02:00
Chris Thrasher
9feef3708d Test existence of copy and move semantics 2022-10-10 11:46:55 -06:00
Chris Thrasher
50cec7d2ed Treat each test case as a unique test 2022-09-10 20:03:25 +03:00
Chris Thrasher
b7510fd09e Fix formatting and style
Use all lower_case commands with no space between the command name
and the open parentheses. Don't repeat conditional in else() and
endif() calls.
2022-08-22 11:26:57 +08:00
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