From b128fcd3df3caacb7207f8e847e596ecfcd865a4 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Fri, 16 Dec 2022 01:14:47 -0700 Subject: [PATCH] Add tests for `sf::Texture` --- test/Graphics/Texture.test.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/Graphics/Texture.test.cpp b/test/Graphics/Texture.test.cpp index c48fbcd4..a4b1da83 100644 --- a/test/Graphics/Texture.test.cpp +++ b/test/Graphics/Texture.test.cpp @@ -1,5 +1,8 @@ #include +#include + +#include #include static_assert(std::is_copy_constructible_v); @@ -8,3 +11,16 @@ static_assert(std::is_move_constructible_v); static_assert(!std::is_nothrow_move_constructible_v); static_assert(std::is_move_assignable_v); static_assert(!std::is_nothrow_move_assignable_v); + +TEST_CASE("[Graphics] sf::Texture") +{ + SUBCASE("Construction") + { + sf::Texture texture; + CHECK(texture.getSize() == sf::Vector2u()); + CHECK(!texture.isSmooth()); + CHECK(!texture.isSrgb()); + CHECK(!texture.isRepeated()); + CHECK(texture.getNativeHandle() == 0); + } +}