|
|
|
@ -85,6 +85,9 @@ struct AbstractFontTest: TestSuite::Tester { |
|
|
|
void createGlyphCacheNotSupported(); |
|
|
|
void createGlyphCacheNotSupported(); |
|
|
|
void createGlyphCacheNotImplemented(); |
|
|
|
void createGlyphCacheNotImplemented(); |
|
|
|
void createGlyphCacheNoFont(); |
|
|
|
void createGlyphCacheNoFont(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void debugFeature(); |
|
|
|
|
|
|
|
void debugFeatures(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
AbstractFontTest::AbstractFontTest() { |
|
|
|
AbstractFontTest::AbstractFontTest() { |
|
|
|
@ -131,7 +134,10 @@ AbstractFontTest::AbstractFontTest() { |
|
|
|
&AbstractFontTest::createGlyphCache, |
|
|
|
&AbstractFontTest::createGlyphCache, |
|
|
|
&AbstractFontTest::createGlyphCacheNotSupported, |
|
|
|
&AbstractFontTest::createGlyphCacheNotSupported, |
|
|
|
&AbstractFontTest::createGlyphCacheNotImplemented, |
|
|
|
&AbstractFontTest::createGlyphCacheNotImplemented, |
|
|
|
&AbstractFontTest::createGlyphCacheNoFont}); |
|
|
|
&AbstractFontTest::createGlyphCacheNoFont, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&AbstractFontTest::debugFeature, |
|
|
|
|
|
|
|
&AbstractFontTest::debugFeatures}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void AbstractFontTest::openData() { |
|
|
|
void AbstractFontTest::openData() { |
|
|
|
@ -1022,6 +1028,20 @@ void AbstractFontTest::createGlyphCacheNoFont() { |
|
|
|
CORRADE_COMPARE(out.str(), "Text::AbstractFont::createGlyphCache(): no font opened\n"); |
|
|
|
CORRADE_COMPARE(out.str(), "Text::AbstractFont::createGlyphCache(): no font opened\n"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void AbstractFontTest::debugFeature() { |
|
|
|
|
|
|
|
std::ostringstream out; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Debug{&out} << AbstractFont::Feature::OpenData << AbstractFont::Feature(0xf0); |
|
|
|
|
|
|
|
CORRADE_COMPARE(out.str(), "Text::AbstractFont::Feature::OpenData Text::AbstractFont::Feature(0xf0)\n"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void AbstractFontTest::debugFeatures() { |
|
|
|
|
|
|
|
std::ostringstream out; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Debug{&out} << (AbstractFont::Feature::OpenData|AbstractFont::Feature::PreparedGlyphCache) << AbstractFont::Features{}; |
|
|
|
|
|
|
|
CORRADE_COMPARE(out.str(), "Text::AbstractFont::Feature::OpenData|Text::AbstractFont::Feature::PreparedGlyphCache Text::AbstractFont::Features{}\n"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}}}} |
|
|
|
}}}} |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_TEST_MAIN(Magnum::Text::Test::AbstractFontTest) |
|
|
|
CORRADE_TEST_MAIN(Magnum::Text::Test::AbstractFontTest) |
|
|
|
|