From d971d388c20048394bcf70574a48957e4fe353b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 8 Sep 2015 10:33:06 +0200 Subject: [PATCH] MagnumFont: at least some test for glyph cache creation. Had to create some non-zero-size TGA file for it to pass. --- .../MagnumFont/Test/MagnumFontGLTest.cpp | 13 +++++++++++-- src/MagnumPlugins/MagnumFont/Test/font.tga | Bin 18 -> 24 bytes 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/MagnumPlugins/MagnumFont/Test/MagnumFontGLTest.cpp b/src/MagnumPlugins/MagnumFont/Test/MagnumFontGLTest.cpp index b35720265..3a3818fca 100644 --- a/src/MagnumPlugins/MagnumFont/Test/MagnumFontGLTest.cpp +++ b/src/MagnumPlugins/MagnumFont/Test/MagnumFontGLTest.cpp @@ -100,8 +100,17 @@ void MagnumFontGLTest::layout() { } void MagnumFontGLTest::createGlyphCache() { - /** @todo */ - CORRADE_SKIP("Not yet implemented"); + MagnumFont font; + CORRADE_VERIFY(font.openFile(Utility::Directory::join(MAGNUMFONT_TEST_DIR, "font.conf"), 0.0f)); + + /* Just testing that nothing crashes, asserts or errors */ + std::unique_ptr cache = font.createGlyphCache(); + + MAGNUM_VERIFY_NO_ERROR(); + CORRADE_VERIFY(cache); + CORRADE_COMPARE(cache->glyphCount(), 3); + + /** @todo properly test contents */ } }}} diff --git a/src/MagnumPlugins/MagnumFont/Test/font.tga b/src/MagnumPlugins/MagnumFont/Test/font.tga index 8389c0da6bd4912d61d9a5896ee2441c3f22600d..711486718a0f3ccfad7e39ebfaae81823912afae 100644 GIT binary patch literal 24 XcmZQzU}k^;CLo)Gfsu)sg_R8e0SEvl literal 18 OcmZQzU}iuD91H*eQUDA9