From b05b1f1997eac2a597ecda5c71f37e4c794f4349 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sun, 8 Sep 2024 10:07:12 -0600 Subject: [PATCH] Add tests for `sfContextAttribute` --- test/CMakeLists.txt | 1 + test/Window/Window.test.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/Window/Window.test.cpp diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8b67ec5..6ae18fd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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) diff --git a/test/Window/Window.test.cpp b/test/Window/Window.test.cpp new file mode 100644 index 0000000..9ea4e46 --- /dev/null +++ b/test/Window/Window.test.cpp @@ -0,0 +1,15 @@ +#include + +#include + +#include + +TEST_CASE("[Window] sfWindow") +{ + SECTION("sfContextAttribute") + { + STATIC_CHECK(sfContextDefault == static_cast(sf::ContextSettings::Attribute::Default)); + STATIC_CHECK(sfContextCore == static_cast(sf::ContextSettings::Attribute::Core)); + STATIC_CHECK(sfContextDebug == static_cast(sf::ContextSettings::Attribute::Debug)); + } +}