mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
25fa30afc6
Test output now shows the module name left-aligned so you can easily browse to see what modules have what tests and know what module a failing test is coming from.
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
#include <SFML/Window/ContextSettings.hpp>
|
|
|
|
#include <doctest/doctest.h>
|
|
|
|
TEST_CASE("[Window] sf::ContextSettings")
|
|
{
|
|
SUBCASE("Construction")
|
|
{
|
|
SUBCASE("Default constructor")
|
|
{
|
|
const sf::ContextSettings contextSettings;
|
|
CHECK(contextSettings.depthBits == 0);
|
|
CHECK(contextSettings.stencilBits == 0);
|
|
CHECK(contextSettings.antialiasingLevel == 0);
|
|
CHECK(contextSettings.majorVersion == 1);
|
|
CHECK(contextSettings.minorVersion == 1);
|
|
CHECK(contextSettings.attributeFlags == sf::ContextSettings::Default);
|
|
CHECK(contextSettings.sRgbCapable == false);
|
|
}
|
|
|
|
SUBCASE("Verbose constructor")
|
|
{
|
|
const sf::ContextSettings contextSettings(1, 1, 2, 3, 5, sf::ContextSettings::Core, true);
|
|
CHECK(contextSettings.depthBits == 1);
|
|
CHECK(contextSettings.stencilBits == 1);
|
|
CHECK(contextSettings.antialiasingLevel == 2);
|
|
CHECK(contextSettings.majorVersion == 3);
|
|
CHECK(contextSettings.minorVersion == 5);
|
|
CHECK(contextSettings.attributeFlags == sf::ContextSettings::Core);
|
|
CHECK(contextSettings.sRgbCapable == true);
|
|
}
|
|
}
|
|
}
|