Fixed window tests not accepting a context with better than requested settings.

This commit is contained in:
binary1248 2023-11-12 17:40:05 +01:00 committed by Chris Thrasher
parent b16114fa23
commit 116c101a77

View File

@ -45,10 +45,7 @@ TEST_CASE("[Window] sf::Window", runDisplayTests())
CHECK(window.isOpen());
CHECK(window.getSize() == sf::Vector2u(360, 240));
CHECK(window.getNativeHandle() != sf::WindowHandle());
CHECK(window.getSettings().stencilBits == 0);
CHECK(window.getSettings().antialiasingLevel == 0);
CHECK(window.getSettings().attributeFlags == sf::ContextSettings::Default);
CHECK(!window.getSettings().sRgbCapable);
}
SECTION("Mode, title, and style constructor")
@ -57,10 +54,7 @@ TEST_CASE("[Window] sf::Window", runDisplayTests())
CHECK(window.isOpen());
CHECK(window.getSize() == sf::Vector2u(360, 240));
CHECK(window.getNativeHandle() != sf::WindowHandle());
CHECK(window.getSettings().stencilBits == 0);
CHECK(window.getSettings().antialiasingLevel == 0);
CHECK(window.getSettings().attributeFlags == sf::ContextSettings::Default);
CHECK(!window.getSettings().sRgbCapable);
}
SECTION("Mode, title, style, and context settings constructor")
@ -69,6 +63,9 @@ TEST_CASE("[Window] sf::Window", runDisplayTests())
CHECK(window.isOpen());
CHECK(window.getSize() == sf::Vector2u(360, 240));
CHECK(window.getNativeHandle() != sf::WindowHandle());
CHECK(window.getSettings().depthBits >= 1);
CHECK(window.getSettings().stencilBits >= 1);
CHECK(window.getSettings().antialiasingLevel >= 1);
}
}
@ -82,10 +79,7 @@ TEST_CASE("[Window] sf::Window", runDisplayTests())
CHECK(window.isOpen());
CHECK(window.getSize() == sf::Vector2u(240, 360));
CHECK(window.getNativeHandle() != sf::WindowHandle());
CHECK(window.getSettings().stencilBits == 0);
CHECK(window.getSettings().antialiasingLevel == 0);
CHECK(window.getSettings().attributeFlags == sf::ContextSettings::Default);
CHECK(!window.getSettings().sRgbCapable);
}
SECTION("Mode, title, and style")
@ -94,10 +88,7 @@ TEST_CASE("[Window] sf::Window", runDisplayTests())
CHECK(window.isOpen());
CHECK(window.getSize() == sf::Vector2u(240, 360));
CHECK(window.getNativeHandle() != sf::WindowHandle());
CHECK(window.getSettings().stencilBits == 0);
CHECK(window.getSettings().antialiasingLevel == 0);
CHECK(window.getSettings().attributeFlags == sf::ContextSettings::Default);
CHECK(!window.getSettings().sRgbCapable);
}
SECTION("Mode, title, style, and context settings")
@ -106,6 +97,9 @@ TEST_CASE("[Window] sf::Window", runDisplayTests())
CHECK(window.isOpen());
CHECK(window.getSize() == sf::Vector2u(240, 360));
CHECK(window.getNativeHandle() != sf::WindowHandle());
CHECK(window.getSettings().depthBits >= 1);
CHECK(window.getSettings().stencilBits >= 1);
CHECK(window.getSettings().antialiasingLevel >= 1);
}
}
}