From 955b1ca541529d984c40dc89ae949269e0f48553 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Fri, 31 Jan 2025 14:43:01 -0700 Subject: [PATCH] Test for trivial move operations --- test/Audio/SoundFileFactory.test.cpp | 4 +-- test/Graphics/BlendMode.test.cpp | 4 +-- test/Graphics/Color.test.cpp | 4 +-- test/Graphics/CoordinateType.test.cpp | 4 +-- test/Graphics/Glsl.test.cpp | 44 +++++++++++++-------------- test/Graphics/Glyph.test.cpp | 4 +-- test/Graphics/Rect.test.cpp | 4 +-- test/Graphics/RenderStates.test.cpp | 4 +-- test/Graphics/StencilMode.test.cpp | 4 +-- test/Graphics/Transform.test.cpp | 4 +-- test/Graphics/Vertex.test.cpp | 4 +-- test/Graphics/View.test.cpp | 4 +-- test/Network/IpAddress.test.cpp | 4 +-- test/System/Angle.test.cpp | 4 +-- test/System/Clock.test.cpp | 4 +-- test/System/String.test.cpp | 4 +-- test/System/Time.test.cpp | 4 +-- test/System/Vector2.test.cpp | 4 +-- test/System/Vector3.test.cpp | 4 +-- test/Window/ContextSettings.test.cpp | 4 +-- test/Window/Event.test.cpp | 4 +-- test/Window/VideoMode.test.cpp | 4 +-- 22 files changed, 64 insertions(+), 64 deletions(-) diff --git a/test/Audio/SoundFileFactory.test.cpp b/test/Audio/SoundFileFactory.test.cpp index 2f018dea1..1bd3d18a1 100644 --- a/test/Audio/SoundFileFactory.test.cpp +++ b/test/Audio/SoundFileFactory.test.cpp @@ -65,8 +65,8 @@ TEST_CASE("[Audio] sf::SoundFileFactory") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("isReaderRegistered()") diff --git a/test/Graphics/BlendMode.test.cpp b/test/Graphics/BlendMode.test.cpp index 29f41f3b7..f9128ae9e 100644 --- a/test/Graphics/BlendMode.test.cpp +++ b/test/Graphics/BlendMode.test.cpp @@ -11,8 +11,8 @@ TEST_CASE("[Graphics] sf::BlendMode") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/Graphics/Color.test.cpp b/test/Graphics/Color.test.cpp index dea77b9ca..24328c9fa 100644 --- a/test/Graphics/Color.test.cpp +++ b/test/Graphics/Color.test.cpp @@ -12,8 +12,8 @@ TEST_CASE("[Graphics] sf::Color") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); STATIC_CHECK(std::is_trivially_copyable_v); } diff --git a/test/Graphics/CoordinateType.test.cpp b/test/Graphics/CoordinateType.test.cpp index 0b86ea9d2..ff795a67f 100644 --- a/test/Graphics/CoordinateType.test.cpp +++ b/test/Graphics/CoordinateType.test.cpp @@ -10,7 +10,7 @@ TEST_CASE("[Graphics] sf::CoordinateType") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } } diff --git a/test/Graphics/Glsl.test.cpp b/test/Graphics/Glsl.test.cpp index 0e9273388..67e9c9905 100644 --- a/test/Graphics/Glsl.test.cpp +++ b/test/Graphics/Glsl.test.cpp @@ -18,8 +18,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } constexpr sf::Glsl::Vec2 vec; @@ -33,8 +33,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } constexpr sf::Glsl::Ivec2 vec; @@ -48,8 +48,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } constexpr sf::Glsl::Bvec2 vec; @@ -63,8 +63,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } constexpr sf::Glsl::Vec3 vec; @@ -79,8 +79,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } constexpr sf::Glsl::Ivec3 vec; @@ -95,8 +95,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } constexpr sf::Glsl::Bvec3 vec; @@ -111,8 +111,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Default constructor") @@ -161,8 +161,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Default constructor") @@ -211,8 +211,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Default constructor") @@ -252,8 +252,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Array constructor") @@ -293,8 +293,8 @@ TEST_CASE("[Graphics] sf::Glsl") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } static constexpr std::array data = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; diff --git a/test/Graphics/Glyph.test.cpp b/test/Graphics/Glyph.test.cpp index 5bf5364b5..0b3b3cf7c 100644 --- a/test/Graphics/Glyph.test.cpp +++ b/test/Graphics/Glyph.test.cpp @@ -11,8 +11,8 @@ TEST_CASE("[Graphics] sf::Glyph") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/Graphics/Rect.test.cpp b/test/Graphics/Rect.test.cpp index 594caf56c..46cc32d76 100644 --- a/test/Graphics/Rect.test.cpp +++ b/test/Graphics/Rect.test.cpp @@ -13,8 +13,8 @@ TEMPLATE_TEST_CASE("[Graphics] sf::Rect", "", int, float) { STATIC_CHECK(std::is_trivially_copy_constructible_v>); STATIC_CHECK(std::is_trivially_copy_assignable_v>); - STATIC_CHECK(std::is_nothrow_move_constructible_v>); - STATIC_CHECK(std::is_nothrow_move_assignable_v>); + STATIC_CHECK(std::is_trivially_move_constructible_v>); + STATIC_CHECK(std::is_trivially_move_assignable_v>); } SECTION("Construction") diff --git a/test/Graphics/RenderStates.test.cpp b/test/Graphics/RenderStates.test.cpp index f56ec9a4d..928fedacb 100644 --- a/test/Graphics/RenderStates.test.cpp +++ b/test/Graphics/RenderStates.test.cpp @@ -11,8 +11,8 @@ TEST_CASE("[Graphics] sf::RenderStates") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/Graphics/StencilMode.test.cpp b/test/Graphics/StencilMode.test.cpp index 108fa89b8..9a2c288f3 100644 --- a/test/Graphics/StencilMode.test.cpp +++ b/test/Graphics/StencilMode.test.cpp @@ -10,8 +10,8 @@ TEST_CASE("[Graphics] sf::StencilMode") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/Graphics/Transform.test.cpp b/test/Graphics/Transform.test.cpp index 3f0e1462f..8c603a025 100644 --- a/test/Graphics/Transform.test.cpp +++ b/test/Graphics/Transform.test.cpp @@ -17,8 +17,8 @@ TEST_CASE("[Graphics] sf::Transform") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/Graphics/Vertex.test.cpp b/test/Graphics/Vertex.test.cpp index fd636709b..0530bebc6 100644 --- a/test/Graphics/Vertex.test.cpp +++ b/test/Graphics/Vertex.test.cpp @@ -11,8 +11,8 @@ TEST_CASE("[Graphics] sf::Vertex") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); STATIC_CHECK(std::is_aggregate_v); } diff --git a/test/Graphics/View.test.cpp b/test/Graphics/View.test.cpp index 18540c674..69df07794 100644 --- a/test/Graphics/View.test.cpp +++ b/test/Graphics/View.test.cpp @@ -11,8 +11,8 @@ TEST_CASE("[Graphics] sf::View") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/Network/IpAddress.test.cpp b/test/Network/IpAddress.test.cpp index dc175d4aa..e4bdaf818 100644 --- a/test/Network/IpAddress.test.cpp +++ b/test/Network/IpAddress.test.cpp @@ -15,8 +15,8 @@ TEST_CASE("[Network] sf::IpAddress") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); STATIC_CHECK(std::is_trivially_copyable_v); } diff --git a/test/System/Angle.test.cpp b/test/System/Angle.test.cpp index b7dcc9b97..20bcc72e2 100644 --- a/test/System/Angle.test.cpp +++ b/test/System/Angle.test.cpp @@ -11,8 +11,8 @@ TEST_CASE("[System] sf::Angle") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); STATIC_CHECK(std::is_trivially_copyable_v); } diff --git a/test/System/Clock.test.cpp b/test/System/Clock.test.cpp index 6179fe587..74f747406 100644 --- a/test/System/Clock.test.cpp +++ b/test/System/Clock.test.cpp @@ -15,8 +15,8 @@ TEST_CASE("[System] sf::Clock") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/System/String.test.cpp b/test/System/String.test.cpp index 48f91603f..7c8f35359 100644 --- a/test/System/String.test.cpp +++ b/test/System/String.test.cpp @@ -63,8 +63,8 @@ TEST_CASE("[System] sf::U8StringCharTraits") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("assign(char_type&, const char_type&)") diff --git a/test/System/Time.test.cpp b/test/System/Time.test.cpp index e6de3c866..fa5036f93 100644 --- a/test/System/Time.test.cpp +++ b/test/System/Time.test.cpp @@ -13,8 +13,8 @@ TEST_CASE("[System] sf::Time") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); STATIC_CHECK(std::is_trivially_copyable_v); } diff --git a/test/System/Vector2.test.cpp b/test/System/Vector2.test.cpp index 4b943ab68..4cc02f1b3 100644 --- a/test/System/Vector2.test.cpp +++ b/test/System/Vector2.test.cpp @@ -15,8 +15,8 @@ TEMPLATE_TEST_CASE("[System] sf::Vector2", "", int, float) { STATIC_CHECK(std::is_trivially_copy_constructible_v>); STATIC_CHECK(std::is_trivially_copy_assignable_v>); - STATIC_CHECK(std::is_nothrow_move_constructible_v>); - STATIC_CHECK(std::is_nothrow_move_assignable_v>); + STATIC_CHECK(std::is_trivially_move_constructible_v>); + STATIC_CHECK(std::is_trivially_move_assignable_v>); STATIC_CHECK(std::is_trivially_copyable_v>); } diff --git a/test/System/Vector3.test.cpp b/test/System/Vector3.test.cpp index a7d62d53e..2e7d1f61d 100644 --- a/test/System/Vector3.test.cpp +++ b/test/System/Vector3.test.cpp @@ -11,8 +11,8 @@ TEMPLATE_TEST_CASE("[System] sf::Vector3", "", int, float) { STATIC_CHECK(std::is_trivially_copy_constructible_v>); STATIC_CHECK(std::is_trivially_copy_assignable_v>); - STATIC_CHECK(std::is_nothrow_move_constructible_v>); - STATIC_CHECK(std::is_nothrow_move_assignable_v>); + STATIC_CHECK(std::is_trivially_move_constructible_v>); + STATIC_CHECK(std::is_trivially_move_assignable_v>); } SECTION("Construction") diff --git a/test/Window/ContextSettings.test.cpp b/test/Window/ContextSettings.test.cpp index 8a162b360..f93cb9c31 100644 --- a/test/Window/ContextSettings.test.cpp +++ b/test/Window/ContextSettings.test.cpp @@ -10,8 +10,8 @@ TEST_CASE("[Window] sf::ContextSettings") { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/Window/Event.test.cpp b/test/Window/Event.test.cpp index c27ce6763..e6db0bf5d 100644 --- a/test/Window/Event.test.cpp +++ b/test/Window/Event.test.cpp @@ -45,8 +45,8 @@ TEST_CASE("[Window] sf::Event") STATIC_CHECK(!std::is_default_constructible_v); STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction") diff --git a/test/Window/VideoMode.test.cpp b/test/Window/VideoMode.test.cpp index 3e92bd96b..0ed380343 100644 --- a/test/Window/VideoMode.test.cpp +++ b/test/Window/VideoMode.test.cpp @@ -12,8 +12,8 @@ TEST_CASE("[Window] sf::VideoMode", runDisplayTests()) { STATIC_CHECK(std::is_trivially_copy_constructible_v); STATIC_CHECK(std::is_trivially_copy_assignable_v); - STATIC_CHECK(std::is_nothrow_move_constructible_v); - STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::is_trivially_move_constructible_v); + STATIC_CHECK(std::is_trivially_move_assignable_v); } SECTION("Construction")