From e5c24572b08737dce4a2bc992bb3da743b2b8659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 2 Jun 2026 14:06:04 +0200 Subject: [PATCH] Text: actually verify openData() and openFile() return values. Not sure why I didn't test those. Code from 2012. --- src/Magnum/Text/Test/AbstractFontTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Text/Test/AbstractFontTest.cpp b/src/Magnum/Text/Test/AbstractFontTest.cpp index 74a20aa14..d0c3db92d 100644 --- a/src/Magnum/Text/Test/AbstractFontTest.cpp +++ b/src/Magnum/Text/Test/AbstractFontTest.cpp @@ -250,7 +250,7 @@ void AbstractFontTest::openData() { CORRADE_VERIFY(!font.isOpened()); const char a5[]{'\xa5'}; - font.openData(a5, 13.0f); + CORRADE_VERIFY(font.openData(a5, 13.0f)); CORRADE_VERIFY(font.isOpened()); CORRADE_COMPARE(font.size(), 13.0f); CORRADE_COMPARE(font.ascent(), 1.0f); @@ -281,7 +281,7 @@ void AbstractFontTest::openFile() { } font; CORRADE_VERIFY(!font.isOpened()); - font.openFile("hello.ttf", 13.0f); + CORRADE_VERIFY(font.openFile("hello.ttf", 13.0f)); CORRADE_VERIFY(font.isOpened()); CORRADE_COMPARE(font.size(), 13.0f); CORRADE_COMPARE(font.ascent(), 1.0f); @@ -315,7 +315,7 @@ void AbstractFontTest::openFileAsData() { /* doOpenFile() should call doOpenData() */ CORRADE_VERIFY(!font.isOpened()); - font.openFile(Utility::Path::join(TEXT_TEST_DIR, "data.bin"), 13.0f); + CORRADE_VERIFY(font.openFile(Utility::Path::join(TEXT_TEST_DIR, "data.bin"), 13.0f)); CORRADE_VERIFY(font.isOpened()); CORRADE_COMPARE(font.size(), 13.0f); CORRADE_COMPARE(font.ascent(), 1.0f);