From 60131b19ef109d707be7e941eb6e3bcf43183baa Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sat, 21 May 2022 22:43:10 -0600 Subject: [PATCH] Add tests for `sf::Glyph` --- test/CMakeLists.txt | 1 + test/Graphics/Glyph.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/Graphics/Glyph.cpp diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f4271d7d..39efd9e9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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 diff --git a/test/Graphics/Glyph.cpp b/test/Graphics/Glyph.cpp new file mode 100644 index 00000000..4396e967 --- /dev/null +++ b/test/Graphics/Glyph.cpp @@ -0,0 +1,17 @@ +#include +#include "GraphicsUtil.hpp" + +#include + +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()); + } +}