Browse Source

MagnumFont: at least some test for glyph cache creation.

Had to create some non-zero-size TGA file for it to pass.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
d971d388c2
  1. 13
      src/MagnumPlugins/MagnumFont/Test/MagnumFontGLTest.cpp
  2. BIN
      src/MagnumPlugins/MagnumFont/Test/font.tga

13
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<GlyphCache> cache = font.createGlyphCache();
MAGNUM_VERIFY_NO_ERROR();
CORRADE_VERIFY(cache);
CORRADE_COMPARE(cache->glyphCount(), 3);
/** @todo properly test contents */
}
}}}

BIN
src/MagnumPlugins/MagnumFont/Test/font.tga

Binary file not shown.
Loading…
Cancel
Save