From bc9068efda77bbd91b9f136b716fb5659409d5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 4 Jul 2019 19:30:14 +0200 Subject: [PATCH] GL: harden multi-Context test. --- src/Magnum/GL/Test/ContextGLTest.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Magnum/GL/Test/ContextGLTest.cpp b/src/Magnum/GL/Test/ContextGLTest.cpp index a53821494..1e79fc27e 100644 --- a/src/Magnum/GL/Test/ContextGLTest.cpp +++ b/src/Magnum/GL/Test/ContextGLTest.cpp @@ -28,6 +28,7 @@ #include "Magnum/GL/Context.h" #include "Magnum/GL/Extensions.h" #include "Magnum/GL/OpenGLTester.h" +#include "Magnum/Platform/GLContext.h" #ifndef CORRADE_TARGET_EMSCRIPTEN #include @@ -78,6 +79,15 @@ void ContextGLTest::makeCurrent() { CORRADE_VERIFY(!Context::hasCurrent()); + { + const char* argv[]{"", "--magnum-log", "off"}; + Platform::GLContext ctx{Int(Containers::arraySize(argv)), argv}; + + CORRADE_VERIFY(Context::hasCurrent()); + } + + CORRADE_VERIFY(!Context::hasCurrent()); + Context::makeCurrent(¤t); CORRADE_VERIFY(Context::hasCurrent());