From ebf6aa079a312a005f071558b563e1c59478bb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 16 Aug 2026 18:27:57 +0200 Subject: [PATCH] Platform: don't print a confusing warning in GlfwApplication test. --- src/Magnum/Platform/Test/GlfwApplicationTest.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Platform/Test/GlfwApplicationTest.cpp b/src/Magnum/Platform/Test/GlfwApplicationTest.cpp index a24430660..964128f0d 100644 --- a/src/Magnum/Platform/Test/GlfwApplicationTest.cpp +++ b/src/Magnum/Platform/Test/GlfwApplicationTest.cpp @@ -476,8 +476,13 @@ GlfwApplicationTest::GlfwApplicationTest(const Arguments& arguments): Platform:: importer->openData(rs.getRaw("icon-64.tga")) && (image64 = importer->image2D(0))) setWindowIcon({*image16, *image32, *image64}); else Warning{} << "Can't load the plugin / images, not setting window icon"; - /* This shouldn't blow up */ - CORRADE_INTERNAL_ASSERT(!isKeyPressed(Key::Unknown) && !isKeyPressed(Key(0x7fffffff))); + /* This shouldn't blow up. The second prints an error about invalid key + from GLFW however, suppress that. */ + CORRADE_INTERNAL_ASSERT(!isKeyPressed(Key::Unknown)); + { + Error silenceError{nullptr}; + CORRADE_INTERNAL_ASSERT(!isKeyPressed(Key(0x7fffffff))); + } } }}}}