mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 07:41:05 +08:00
Add tests for sf::Glyph
This commit is contained in:
parent
7dd001e5c0
commit
60131b19ef
@ -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
17
test/Graphics/Glyph.cpp
Normal 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());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user