Add tests for sf::Texture
This commit is contained in:
parent
9265607d79
commit
b128fcd3df
@ -1,5 +1,8 @@
|
|||||||
#include <SFML/Graphics/Texture.hpp>
|
#include <SFML/Graphics/Texture.hpp>
|
||||||
|
|
||||||
|
#include <doctest/doctest.h>
|
||||||
|
|
||||||
|
#include <GraphicsUtil.hpp>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
static_assert(std::is_copy_constructible_v<sf::Texture>);
|
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_nothrow_move_constructible_v<sf::Texture>);
|
||||||
static_assert(std::is_move_assignable_v<sf::Texture>);
|
static_assert(std::is_move_assignable_v<sf::Texture>);
|
||||||
static_assert(!std::is_nothrow_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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user