2022-07-25 14:36:05 +08:00
|
|
|
#include <SFML/Window/Window.hpp>
|
|
|
|
|
2023-03-10 08:38:14 +08:00
|
|
|
// Other 1st party headers
|
|
|
|
#include <SFML/Window/VideoMode.hpp>
|
|
|
|
|
2023-04-24 20:13:52 +08:00
|
|
|
#include <SFML/System/String.hpp>
|
|
|
|
|
2023-01-18 12:51:08 +08:00
|
|
|
#include <catch2/catch_test_macros.hpp>
|
2023-03-10 08:38:14 +08:00
|
|
|
|
|
|
|
#include <WindowUtil.hpp>
|
2022-07-25 14:36:05 +08:00
|
|
|
#include <type_traits>
|
|
|
|
|
2023-01-18 12:51:08 +08:00
|
|
|
TEST_CASE("[Window] sf::Window", runDisplayTests())
|
2023-03-10 08:38:14 +08:00
|
|
|
{
|
2023-01-18 12:51:08 +08:00
|
|
|
SECTION("Type traits")
|
|
|
|
{
|
|
|
|
STATIC_CHECK(!std::is_copy_constructible_v<sf::Window>);
|
|
|
|
STATIC_CHECK(!std::is_copy_assignable_v<sf::Window>);
|
|
|
|
STATIC_CHECK(!std::is_nothrow_move_constructible_v<sf::Window>);
|
|
|
|
STATIC_CHECK(!std::is_nothrow_move_assignable_v<sf::Window>);
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("Construction")
|
2023-03-10 08:38:14 +08:00
|
|
|
{
|
2023-02-15 11:42:12 +08:00
|
|
|
const sf::Window window(sf::VideoMode(sf::Vector2u(256, 256), 32),
|
|
|
|
"Window Title",
|
|
|
|
sf::Style::Default,
|
|
|
|
sf::ContextSettings());
|
2023-03-10 08:38:14 +08:00
|
|
|
CHECK(window.getSize() == sf::Vector2u(256, 256));
|
|
|
|
}
|
|
|
|
}
|