mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Add more sf::Context
tests
This commit is contained in:
parent
544a9a8a79
commit
49cf5058e5
@ -165,4 +165,21 @@ TEST_CASE("[Window] sf::Context", runDisplayTests())
|
|||||||
SUCCEED(std::string("OpenGL renderer: ") + renderer);
|
SUCCEED(std::string("OpenGL renderer: ") + renderer);
|
||||||
SUCCEED(std::string("OpenGL version: ") + version);
|
SUCCEED(std::string("OpenGL version: ") + version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SECTION("isExtensionAvailable()")
|
||||||
|
{
|
||||||
|
CHECK(!sf::Context::isExtensionAvailable("2024-04-01"));
|
||||||
|
CHECK(!sf::Context::isExtensionAvailable("let's assume this extension does not exist"));
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("getFunction()")
|
||||||
|
{
|
||||||
|
const sf::Context context; // Windows requires an active context to use getFunction
|
||||||
|
CHECK(sf::Context::getFunction("glEnable"));
|
||||||
|
CHECK(sf::Context::getFunction("glGetError"));
|
||||||
|
CHECK(sf::Context::getFunction("glGetIntegerv"));
|
||||||
|
CHECK(sf::Context::getFunction("glGetString"));
|
||||||
|
CHECK(sf::Context::getFunction("glGetStringi"));
|
||||||
|
CHECK(sf::Context::getFunction("glIsEnabled"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user