summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qglyphrun/tst_qglyphrun.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/auto/qglyphrun/tst_qglyphrun.cpp b/tests/auto/qglyphrun/tst_qglyphrun.cpp
index a5a5cd19cc..e84915428f 100644
--- a/tests/auto/qglyphrun/tst_qglyphrun.cpp
+++ b/tests/auto/qglyphrun/tst_qglyphrun.cpp
@@ -55,6 +55,7 @@ class tst_QGlyphRun: public QObject
#if !defined(QT_NO_RAWFONT)
private slots:
void initTestCase();
+ void init();
void cleanupTestCase();
void constructionAndDestruction();
@@ -78,6 +79,7 @@ private slots:
private:
int m_testFontId;
QFont m_testFont;
+ bool m_testFont_ok;
#endif // QT_NO_RAWFONT
};
@@ -88,16 +90,27 @@ Q_DECLARE_METATYPE(QGlyphRun);
void tst_QGlyphRun::initTestCase()
{
+ m_testFont_ok = false;
+
m_testFontId = QFontDatabase::addApplicationFont(SRCDIR "test.ttf");
QVERIFY(m_testFontId >= 0);
m_testFont = QFont("QtsSpecialTestFont");
#ifdef Q_WS_QPA
- QEXPECT_FAIL("", "QTBUG-20760 fails on qpa", Continue);
+ QEXPECT_FAIL("", "QTBUG-20760 fails on qpa", Abort);
#endif
QCOMPARE(QFontInfo(m_testFont).family(), QString::fromLatin1("QtsSpecialTestFont"));
+
+ m_testFont_ok = true;
+}
+
+void tst_QGlyphRun::init()
+{
+ if (!m_testFont_ok) {
+ QSKIP("Test font is not working correctly", SkipAll);
+ }
}
void tst_QGlyphRun::cleanupTestCase()
@@ -242,10 +255,6 @@ void tst_QGlyphRun::textLayoutGlyphIndexes()
QList<QGlyphRun> listOfGlyphs = layout.glyphRuns();
-#ifdef Q_WS_QPA
- QEXPECT_FAIL("", "QTBUG-20760 fails on qpa", Abort);
-#endif
-
QCOMPARE(listOfGlyphs.size(), 1);
QGlyphRun glyphs = listOfGlyphs.at(0);
@@ -292,10 +301,6 @@ void tst_QGlyphRun::drawExistingGlyphs()
drawGlyphs.save("drawExistingGlyphs_drawGlyphIndexes.png");
#endif
-#ifdef Q_WS_QPA
- QEXPECT_FAIL("", "QTBUG-20760 fails on qpa", Continue);
-#endif
-
QCOMPARE(textLayoutDraw, drawGlyphs);
}