diff --git a/src/Magnum/GL/Test/ContextGLTest.cpp b/src/Magnum/GL/Test/ContextGLTest.cpp index 63c234f0b..b91841b5d 100644 --- a/src/Magnum/GL/Test/ContextGLTest.cpp +++ b/src/Magnum/GL/Test/ContextGLTest.cpp @@ -29,11 +29,15 @@ #include "Magnum/GL/Extensions.h" #include "Magnum/GL/OpenGLTester.h" +#include "Magnum/Platform/GLContext.h" + namespace Magnum { namespace GL { namespace Test { namespace { struct ContextGLTest: OpenGLTester { explicit ContextGLTest(); + void constructNoCreate(); + void isVersionSupported(); #ifndef MAGNUM_TARGET_GLES void isVersionSupportedES(); @@ -44,7 +48,8 @@ struct ContextGLTest: OpenGLTester { }; ContextGLTest::ContextGLTest() { - addTests({&ContextGLTest::isVersionSupported, + addTests({&ContextGLTest::constructNoCreate, + &ContextGLTest::isVersionSupported, #ifndef MAGNUM_TARGET_GLES &ContextGLTest::isVersionSupportedES, #endif @@ -53,6 +58,16 @@ ContextGLTest::ContextGLTest() { &ContextGLTest::isExtensionDisabled}); } +void ContextGLTest::constructNoCreate() { + { + char dummyArgv[] = "dummy"; + char* argv[] = {dummyArgv}; + Platform::GLContext context{NoCreate, 1, argv}; + } + + CORRADE_VERIFY(true); +} + void ContextGLTest::isVersionSupported() { const Version v = Context::current().version(); CORRADE_VERIFY(Context::current().isVersionSupported(v));