2022-05-21 22:43:10 -06:00
|
|
|
#include <SFML/Graphics/Glyph.hpp>
|
|
|
|
|
2023-01-17 21:51:08 -07:00
|
|
|
#include <catch2/catch_test_macros.hpp>
|
2022-05-21 22:43:10 -06:00
|
|
|
|
2022-07-04 11:20:58 -05:00
|
|
|
#include <GraphicsUtil.hpp>
|
2022-07-25 00:36:05 -06:00
|
|
|
#include <type_traits>
|
|
|
|
|
2022-07-04 23:51:18 -06:00
|
|
|
TEST_CASE("[Graphics] sf::Glyph")
|
2022-05-21 22:43:10 -06:00
|
|
|
{
|
2023-01-17 21:51:08 -07: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-21 22:43:10 -06:00
|
|
|
{
|
|
|
|
const sf::Glyph glyph;
|
2022-07-17 16:18:40 -06:00
|
|
|
CHECK(glyph.advance == 0.f);
|
2022-05-21 22:43:10 -06:00
|
|
|
CHECK(glyph.lsbDelta == 0);
|
|
|
|
CHECK(glyph.rsbDelta == 0);
|
|
|
|
CHECK(glyph.bounds == sf::FloatRect());
|
|
|
|
CHECK(glyph.textureRect == sf::IntRect());
|
|
|
|
}
|
|
|
|
}
|