3693 Commits

Author SHA1 Message Date
Chris Thrasher
a25a87e6e1
Enable range based looping of sf::VertexArray 2025-02-22 11:59:59 -07:00
Chris Thrasher
38fbeb3ac9 Assert that iterators point to an expected type 2025-02-20 14:11:47 -07:00
Chris Thrasher
cea0844f2e Improve sf::Utf<N> tests 2025-02-20 14:11:47 -07:00
Chris Thrasher
119d6e412a Remove unnecessary function declaration 2025-02-20 14:11:47 -07:00
Chris Thrasher
71c0b564c8 Improve const correctness 2025-02-20 14:11:47 -07:00
Chris Thrasher
7f22f6c63a Remove unnecessary sf:: namespace 2025-02-20 13:29:22 -07:00
Chris Thrasher
15bfde50d3 Add tests for sf::Mouse 2025-02-20 12:36:37 +00:00
ZXShady
891a0d3263 Remove explicit sf:: prefix on Exception 2025-02-19 17:50:08 -07:00
Chris Thrasher
7fd42b141d Add test for empty window title
See #387
2025-02-19 16:27:31 -07:00
Chris Thrasher
56c5dd35d6 Fix using Emoji with sf::Clipboard 2025-02-19 14:51:57 -07:00
Chris Thrasher
767ffbe636 Fix using Emoji in Windows window titles 2025-02-19 14:40:20 -07:00
Chris Thrasher
601b5032e7 Stop running tests that require network access 2025-02-18 14:28:38 -07:00
Jonny
c85ff6f011
Add catch2 argument to break into debugger when tests fail 2025-02-18 14:26:54 -07:00
JonnyPtn
068088233b Set required properties for ios test apps 2025-02-18 11:47:35 +00:00
Jonny
8c9ffe972f
Fix iOS debug build and update xcode 2025-02-17 09:29:06 -07:00
James Cowgill
91327373b0 Fix comments and address ordering in IpAddress::getLocalAddress
The old code says "The method here is to connect a UDP socket to
anyone (here to localhost)", but connecting to `localhost` doesn't
work because the connection would go via the loopback interface which
always has a local address of `127.0.0.1`.

The current code works on little-endian platforms due to a mistake in
the `createAddress` call. We pass `ntohl(INADDR_LOOPBACK)` as the IP,
but since `INADDR_LOOPBACK` is already in host order this actually
connects to `1.0.0.127`.

Fix the comments and intentionally connect to `1.1.1.1` (as a known
public IP address). This also fixes this call for big-endian
platforms.
2025-02-16 21:05:40 -07:00
FRex
f59913e997 Fix opening sf::Font from non-ASCII path 2025-02-14 03:47:44 -05:00
Jonny Paton
3a2b4518e2 Remove FLAC microbench target from project 2025-02-14 02:03:16 -05:00
Chris Thrasher
2241bee942 Fix saving FLAC files to non-ASCII paths 2025-02-13 16:12:47 -05:00
Chris Thrasher
41dc238981 Add portable abstraction for opening files from Unicode filepaths 2025-02-13 16:12:47 -05:00
Chris Thrasher
0eb92fc27d Use Catch2 generators to simplify tests 2025-02-07 07:59:51 -07:00
Chris Thrasher
a886fddbdb Add tests for sf::OutputSoundFile 2025-02-06 00:03:25 -07:00
Chris Thrasher
4c632e5775 Revamp sf::String tests 2025-02-05 14:04:44 -07:00
Chris Thrasher
505fe43d5a Use Unicode literals 2025-02-05 14:04:44 -07:00
Chris Thrasher
52ef7c9955 Test loading sf::SoundBuffer with non-ASCII filenames 2025-02-03 05:37:25 -07:00
Chris Thrasher
594eb408cb Test opening sf::Music with non-ASCII filenames 2025-02-03 05:37:25 -07:00
Chris Thrasher
645796f7fb Reenable exception printouts when tests fail
This option disables detailed exception information when an exception
is thrown in the tests.
2025-02-03 05:37:25 -07:00
Chris Thrasher
a45c4ecbcd Test opening sound files with non-ASCII filenames 2025-02-02 16:01:12 -07:00
Chris Thrasher
fd93e848f7 Test sf::FileInputStream::open with non-ASCII filepaths 2025-02-02 15:40:21 -07:00
Chris Thrasher
8d3bbe7cf8 Fix typo 2025-01-31 16:09:44 -07:00
Chris Thrasher
955b1ca541 Test for trivial move operations 2025-01-31 15:59:14 -07:00
Chris Thrasher
aee8707b1b Test loading shaders with non-ASCII filenames 2025-01-31 08:51:25 -07:00
Chris Thrasher
0a2e9ac340 Ensure sf::Image remains unchanged after an unsuccessful load 2025-01-31 05:54:22 -07:00
Chris Thrasher
355df11d09 Harden copyability tests to test for triviality 2025-01-30 17:33:28 -07:00
Chris Thrasher
7b0d72966b Reduce code duplication 2025-01-30 13:39:40 -07:00
FRex
9132655a3d Use std::fstream to support Unicode filenames in sf::Image #647 2025-01-30 10:16:03 -07:00
FRex
f7e904172f Add tests for Unicode filenames with sf::Image #647 2025-01-30 10:16:03 -07:00
FRex
7c60447a39 Always print filepaths as UTF-8 to a char stream #3406 2025-01-29 12:39:00 -07:00
Lukas Dürrenberger
4378a022e5 Silence C4275 warning for sf::Exception
Warning is not relevant when deriving from standard library types as the
documentation states:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275
2025-01-28 17:40:16 -07:00
kimci86
4c0b5b3df9 Implement support for references to handlers and function pointers 2025-01-27 12:21:41 -07:00
kimci86
efb207c849 Check that all WindowBase::handleEvents arguments handle some events 2025-01-27 12:21:41 -07:00
kimci86
23afdc2f9e More explicit naming for visit and handleEvents types and fix lint comments 2025-01-27 12:21:41 -07:00
kimci86
37c87ee11e Test Event::visit with move-only visitor 2025-01-25 13:10:56 -07:00
kimci86
c6df55eed8 Revert "Transform Event::visit signature to accept multiple handlers"
This reverts commit d64a222c869164933e1e53c4b58d73fc1db04eb3.
2025-01-25 13:10:56 -07:00
Pixel-Tony
d64a222c86 Transform Event::visit signature to accept multiple handlers 2025-01-24 09:39:52 -07:00
vittorioromeo
18393ea5cb Add non-const overload of Event::visit 2025-01-22 18:03:00 +01:00
Chris Thrasher
0e37e6dfee Use std::queue to model queues 2025-01-20 18:11:22 -07:00
Chris Thrasher
08bfae34e7 Fix build errors when compiling in C++20 mode
C++20 removes the ability to stream char32_t characters.
This is the error I get when setting CMAKE_CXX_STANDARD
to 20.

    /Users/thrasher/Projects/sfml/test/System/String.test.cpp:32:52: error: overload resolution selected deleted operator '<<'
       32 |     stream << "[\\x" << std::uppercase << std::hex << character << ']';
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/include/c++/v1/ostream:1009:31: note: candidate function [with _Traits = std::char_traits<char>] has been explicitly deleted
     1009 | basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char32_t) = delete;
          |                               ^
2025-01-20 11:27:43 +00:00
Chris Thrasher
97dfa7692d Use macOS 14 in more CI jobs 2025-01-18 19:12:52 -08:00
Chris Thrasher
662830e90a Fix conversion warning
Continuing what was started in #3381
2025-01-18 13:43:12 -08:00