Skip to content

Commit ab1a1a2

Browse files
committed
Add tests for sfCoordinateType
1 parent bb8a261 commit ab1a1a2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ catch_discover_tests(test-csfml-window)
4747
add_executable(test-csfml-graphics
4848
Graphics/BlendMode.test.cpp
4949
Graphics/Color.test.cpp
50+
Graphics/CoordinateType.test.cpp
5051
Graphics/Rect.test.cpp
5152
)
5253
target_link_libraries(test-csfml-graphics PRIVATE csfml-graphics Catch2::Catch2WithMain SFML::Graphics)

test/Graphics/CoordinateType.test.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <CSFML/Graphics/CoordinateType.h>
2+
3+
#include <SFML/Graphics/CoordinateType.hpp>
4+
5+
#include <catch2/catch_test_macros.hpp>
6+
7+
TEST_CASE("[Graphics] sfCoordinateType")
8+
{
9+
STATIC_CHECK(sfCoordinateTypeNormalized == static_cast<int>(sf::CoordinateType::Normalized));
10+
STATIC_CHECK(sfCoordinateTypePixels == static_cast<int>(sf::CoordinateType::Pixels));
11+
}

0 commit comments

Comments
 (0)