diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c9751e0b9..0ac05c233 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -62,6 +62,7 @@ set(WINDOW_SRC Window/Context.test.cpp Window/ContextSettings.test.cpp Window/Cursor.test.cpp + Window/Event.test.cpp Window/GlResource.test.cpp Window/VideoMode.test.cpp Window/Window.test.cpp diff --git a/test/Window/Event.test.cpp b/test/Window/Event.test.cpp new file mode 100644 index 000000000..1fbf65a39 --- /dev/null +++ b/test/Window/Event.test.cpp @@ -0,0 +1,22 @@ +#include + +#include + +#include + +TEST_CASE("[Window] sf::Event") +{ + SECTION("Type traits") + { + STATIC_CHECK(std::is_copy_constructible_v); + STATIC_CHECK(std::is_copy_assignable_v); + STATIC_CHECK(std::is_nothrow_move_constructible_v); + STATIC_CHECK(std::is_nothrow_move_assignable_v); + } + + SECTION("Construction") + { + const sf::Event event{}; + CHECK(event.type == sf::Event::Closed); + } +}