2022-05-22 12:43:10 +08:00
|
|
|
#include <SFML/Graphics/Glyph.hpp>
|
|
|
|
|
2023-01-18 12:51:08 +08:00
|
|
|
#include <catch2/catch_test_macros.hpp>
|
2022-05-22 12:43:10 +08:00
|
|
|
|
2022-07-05 00:20:58 +08:00
|
|
|
#include <GraphicsUtil.hpp>
|
2022-07-25 14:36:05 +08:00
|
|
|
#include <type_traits>
|
|
|
|
|
2022-07-05 13:51:18 +08:00
|
|
|
TEST_CASE("[Graphics] sf::Glyph")
|
2022-05-22 12:43:10 +08:00
|
|
|
{
|
2023-01-18 12:51:08 +08:00
|
|
|
SECTION("Type traits")
|
|
|
|
{
|
|
|
|
STATIC_CHECK(std::is_copy_constructible_v<sf::Glyph>);
|
|
|
|
STATIC_CHECK(std::is_copy_assignable_v<sf::Glyph>);
|
|
|
|
STATIC_CHECK(std::is_nothrow_move_constructible_v<sf::Glyph>);
|
|
|
|
STATIC_CHECK(std::is_nothrow_move_assignable_v<sf::Glyph>);
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("Construction")
|
2022-05-22 12:43:10 +08:00
|
|
|
{
|
2024-07-17 03:39:03 +08:00
|
|
|
constexpr sf::Glyph glyph;
|
|
|
|
STATIC_CHECK(glyph.advance == 0.f);
|
|
|
|
STATIC_CHECK(glyph.lsbDelta == 0);
|
|
|
|
STATIC_CHECK(glyph.rsbDelta == 0);
|
|
|
|
STATIC_CHECK(glyph.bounds == sf::FloatRect());
|
|
|
|
STATIC_CHECK(glyph.textureRect == sf::IntRect());
|
2022-05-22 12:43:10 +08:00
|
|
|
}
|
|
|
|
}
|