Add tests for sfContextAttribute

This commit is contained in:
Chris Thrasher committed 2024-09-08 12:08:43 -06:00
1 parent 8cc7537899
commit b05b1f1997
2 files changed
+16

No files matched your search

+1
View File
@@ -37,6 +37,7 @@ add_executable(test-csfml-window
Window/Keyboard.test.cpp
Window/Mouse.test.cpp
Window/Sensor.test.cpp
Window/Window.test.cpp
Window/WindowBase.test.cpp
)
target_link_libraries(test-csfml-window PRIVATE csfml-window Catch2::Catch2WithMain SFML::Window)
+15
View File
@@ -0,0 +1,15 @@
#include <CSFML/Window/Window.h>
#include <SFML/Window/Window.hpp>
#include <catch2/catch_test_macros.hpp>
TEST_CASE("[Window] sfWindow")
{
SECTION("sfContextAttribute")
{
STATIC_CHECK(sfContextDefault == static_cast<int>(sf::ContextSettings::Attribute::Default));
STATIC_CHECK(sfContextCore == static_cast<int>(sf::ContextSettings::Attribute::Core));
STATIC_CHECK(sfContextDebug == static_cast<int>(sf::ContextSettings::Attribute::Debug));
}
}