Chris Thrasher
4a463ec136
Throw custom sf::Exception
type
2024-08-25 12:17:49 -06:00
binary1248
e185f6d53e
Replace factory functions with throwing constructors
2024-08-08 09:19:32 -06:00
binary1248
698f265277
(Re-)Introduce default constructors and load/open member functions for resource objects that can be reused.
2024-08-08 09:19:32 -06:00
Chris Thrasher
c8c8673259
Pass sf::Vector2<T>
s by value
...
As a rule of thumb, if the type is less than or equal to the CPU
register width times two then you ought to pass it by value. This
will lead to more efficient code generation.
2024-07-19 10:33:00 -06:00
Chris Thrasher
e1469aa8f2
Use [[nodiscard]]
in more places
2024-06-27 15:12:15 -06:00
Chris Thrasher
304a7c1d69
Remove default empty state of sf::FileInputStream
2024-06-11 07:31:09 -05:00
Chris Thrasher
366b119963
Remove default empty state of sf::MemoryInputStream
2024-06-10 08:11:28 -05:00
Chris Thrasher
de8430bb29
Use std::optional
rather than sentinel values
2024-06-09 20:48:55 -05:00
Chris Thrasher
5484824948
Remove unnecessary static casts
2024-06-05 11:54:36 -06:00
vittorioromeo
884206ce0c
Store angles internally as radians
2024-05-14 13:07:40 -06:00
Chris Thrasher
593c4fe173
Replace C arrays with std::array
2024-05-14 12:47:19 -05:00
vittorioromeo
b552148e26
Header cleanup guided by IWYU
2024-02-09 12:52:23 +01:00
Chris Thrasher
9022d9564d
Define character traits for std::uint8_t
...
Character traits are only standardized for character types of which
std::uint8_t is not. All major C++ implementations happen to define
this specialization but because it is not standard C++ they are
allowed to remove it as LLVM has done by deprecating this specialization
in LLVM 18. It is slated for removal in LLVM 19. To avoid compilation
errors and to get ahead of any deprecation warnings when LLVM 18 ships
we need to define our own std::uint8_t character traits.
SFML 4 will have access to C++20's std::u8string which should let us
remove this code.
2024-01-28 10:24:02 -07:00
Chris Thrasher
43dc13c3de
Fix typo in sf::Vector3<T>
type trait tests
2024-01-14 19:19:37 -07:00
Chris Thrasher
9cb4a68c9a
Test class templates with multiple template types
2023-11-15 12:07:31 -07:00
Chris Thrasher
b856d806be
Improve sf::FileInputStream
test coverage
2023-10-05 16:46:31 -06:00
Chris Thrasher
1e4aed8700
Fix clang-tidy readability-container-size-empty
warnings
2023-09-29 15:55:39 -06:00
Chris Thrasher
b68482754b
Use std::filesystem::path
for paths
2023-07-27 11:13:45 -06:00
Chris Thrasher
98df0fe4c9
Add doc strings to remaining assertions
2023-07-10 15:03:01 -06:00
MetGang
8835f42589
Make sf::Clock
pausable
2023-06-02 11:32:04 -06:00
Chris Thrasher
f6dfc04938
Switch to Catch2
2023-05-13 12:38:11 -06:00
Chris Thrasher
fb1cfdc48d
Add misc-const-correctness
clang-tidy check
2023-05-04 16:22:03 -06:00
Chris Thrasher
1c5c8ad700
Add tests for sf::sleep
2023-04-28 15:01:11 -06:00
vittorioromeo
cbfa9cbb65
Reorder includes hierarchically
2023-04-25 17:25:33 +02:00
Jan Wojciechowski
692fe84331
Fix condition for trailing bytes count in UTF-8 decoder. Test added to check if a replacement characters is added to output.
2023-04-19 23:52:38 +02:00
vittorioromeo
c6226258db
Improve test utility header compilation speed
2023-04-13 16:33:49 +02:00
Chris Thrasher
f371a99b39
Implement sf::String
in terms of std::u32string
2023-04-04 15:47:34 -06:00
Chris Thrasher
ebe4b3c437
Add tests for sf::String
2023-04-03 21:23:43 -06:00
Chris Thrasher
2d2f684786
Fix clang-tidy-16 errors
2023-03-28 19:54:06 -06:00
Norm Evangelista
6ef8e487cc
Added readability-qualified-auto, -redundant-access-specifiers
...
Fixed clang-format escapes
Fixed OSX clang-tidy issues
Collapsed extraneous lines
Fixed clang-format escape
2023-01-19 15:53:40 -07:00
Chris Thrasher
718195bf25
Mark move operators as noexcept
2023-01-04 09:49:20 -07:00
Jonny Paton
e4bffe5b84
Rename test files to be unique
2022-10-23 16:39:12 +02:00
Chris Thrasher
9feef3708d
Test existence of copy and move semantics
2022-10-10 11:46:55 -06:00
Chris Thrasher
939ec267df
Improve const correctness
2022-10-01 23:19:52 +02:00
Chris Thrasher
25fa30afc6
Make test case names more readable
...
Test output now shows the module name left-aligned so you can easily
browse to see what modules have what tests and know what module a
failing test is coming from.
2022-10-01 23:19:52 +02:00
Chris Thrasher
3a3935d005
Replace sf::Uint64
with std::uint64_t
2022-09-13 11:15:03 -06:00
Chris Thrasher
05690b963d
Replace sf::Int64
with std::int64_t
2022-09-13 11:15:03 -06:00
Chris Thrasher
e294090c8e
Replace sf::Uint32
with std::uint32_t
2022-09-12 15:36:55 -06:00
Chris Thrasher
056f66a2b8
Replace sf::Int32
with std::int32_t
2022-09-12 15:36:55 -06:00
Chris Thrasher
ff9c9131b3
Replace sf::Uint16
with std::uint16_t
2022-09-12 21:36:13 +03:00
Chris Thrasher
e21ae3204e
Replace sf::Int16
with std::int16_t
2022-09-12 21:36:13 +03:00
Chris Thrasher
e2528de20a
Replace sf::Uint8
with std::uint8_t
2022-09-09 10:28:53 +02:00
Chris Thrasher
af34794123
Replace sf::Int8
with std::int8_t
2022-09-09 10:28:53 +02:00
Chris Thrasher
8561101b11
Add conversions between sf::Time
and std::chrono::duration
s
2022-09-05 23:35:25 +02: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
Chris Thrasher
4f52793f7d
Run clang-format
2022-07-11 20:04:56 +02:00
metaquarx
88e9f82bee
Add '.clang-format' file, CI integration, and formatting exceptions
...
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2022-07-11 20:04:56 +02:00
Bambo-Borris
c6f7fcaa2a
Add tests for sf::MemoryInputStream
2022-06-28 14:33:21 +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