2022-07-25 14:36:05 +08:00
|
|
|
#include <SFML/Graphics/Texture.hpp>
|
|
|
|
|
2022-12-16 16:14:47 +08:00
|
|
|
#include <doctest/doctest.h>
|
|
|
|
|
|
|
|
#include <GraphicsUtil.hpp>
|
2022-07-25 14:36:05 +08:00
|
|
|
#include <type_traits>
|
|
|
|
|
|
|
|
static_assert(std::is_copy_constructible_v<sf::Texture>);
|
|
|
|
static_assert(std::is_copy_assignable_v<sf::Texture>);
|
2022-11-20 13:06:35 +08:00
|
|
|
static_assert(std::is_nothrow_move_constructible_v<sf::Texture>);
|
|
|
|
static_assert(std::is_nothrow_move_assignable_v<sf::Texture>);
|
2023-03-05 21:03:27 +08:00
|
|
|
static_assert(std::is_nothrow_swappable_v<sf::Texture>);
|
2022-12-16 16:14:47 +08:00
|
|
|
|
2022-12-27 12:30:18 +08:00
|
|
|
TEST_CASE("[Graphics] sf::Texture" * doctest::skip(skipDisplayTests))
|
2022-12-16 16:14:47 +08:00
|
|
|
{
|
|
|
|
SUBCASE("Construction")
|
|
|
|
{
|
|
|
|
sf::Texture texture;
|
|
|
|
CHECK(texture.getSize() == sf::Vector2u());
|
|
|
|
CHECK(!texture.isSmooth());
|
|
|
|
CHECK(!texture.isSrgb());
|
|
|
|
CHECK(!texture.isRepeated());
|
|
|
|
CHECK(texture.getNativeHandle() == 0);
|
|
|
|
}
|
|
|
|
}
|