mirror of
https://github.com/SFML/SFML.git
synced 2025-01-31 13:45:13 +08:00
Fixed window tests not accepting a context with better than requested settings.
This commit is contained in:
parent
b16114fa23
commit
116c101a77
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user