Add tests for sf::Texture

This commit is contained in:
Chris Thrasher 2022-12-16 01:14:47 -07:00
parent 9265607d79
commit b128fcd3df

View File

@ -1,5 +1,8 @@
#include <SFML/Graphics/Texture.hpp>
#include <doctest/doctest.h>
#include <GraphicsUtil.hpp>
#include <type_traits>
static_assert(std::is_copy_constructible_v<sf::Texture>);
@ -8,3 +11,16 @@ static_assert(std::is_move_constructible_v<sf::Texture>);
static_assert(!std::is_nothrow_move_constructible_v<sf::Texture>);
static_assert(std::is_move_assignable_v<sf::Texture>);
static_assert(!std::is_nothrow_move_assignable_v<sf::Texture>);
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);
}
}