Add tests for sf::Glyph

This commit is contained in:
Chris Thrasher 2022-05-21 22:43:10 -06:00 committed by Lukas Dürrenberger
parent 7dd001e5c0
commit 60131b19ef
2 changed files with 18 additions and 0 deletions

View File

@ -33,6 +33,7 @@ SET(GRAPHICS_SRC
Graphics/BlendMode.cpp
Graphics/CircleShape.cpp
Graphics/Color.cpp
Graphics/Glyph.cpp
Graphics/Rect.cpp
Graphics/RectangleShape.cpp
Graphics/Shape.cpp

17
test/Graphics/Glyph.cpp Normal file
View File

@ -0,0 +1,17 @@
#include <SFML/Graphics/Glyph.hpp>
#include "GraphicsUtil.hpp"
#include <doctest.h>
TEST_CASE("sf::Glyph class - [graphics]")
{
SUBCASE("Construction")
{
const sf::Glyph glyph;
CHECK(glyph.advance == 0);
CHECK(glyph.lsbDelta == 0);
CHECK(glyph.rsbDelta == 0);
CHECK(glyph.bounds == sf::FloatRect());
CHECK(glyph.textureRect == sf::IntRect());
}
}