summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-08-18 09:24:09 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-18 08:05:38 +0200
commit0c9bd2829866b1071effcd53003c8356a3170094 (patch)
treeef21ceaae8fab079737236c73b63201d6ef045a6
parent3817a82ebdb777e54e7594f205f3cd69a12cc874 (diff)
test: mark tst_qrawfont as expected failure on qpa
The necessary font handling code for qrawfont currently seems to be unimplemented for all qpa backends. Task-number: QTBUG-20976 Change-Id: I2b5c511936892e2754c0ee809b7a558f44d1d132 Reviewed-on: http://codereview.qt.nokia.com/3116 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
-rw-r--r--tests/auto/qrawfont/tst_qrawfont.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qrawfont/tst_qrawfont.cpp b/tests/auto/qrawfont/tst_qrawfont.cpp
index eb78057b5e..1c18f2f1e8 100644
--- a/tests/auto/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/qrawfont/tst_qrawfont.cpp
@@ -49,6 +49,8 @@ class tst_QRawFont: public QObject
Q_OBJECT
#if !defined(QT_NO_RAWFONT)
private slots:
+ void init();
+
void invalidRawFont();
void explicitRawFontNotLoadedInDatabase_data();
@@ -107,6 +109,20 @@ Q_DECLARE_METATYPE(QFont::Style)
Q_DECLARE_METATYPE(QFont::Weight)
Q_DECLARE_METATYPE(QFontDatabase::WritingSystem)
+void tst_QRawFont::init()
+{
+#ifdef Q_WS_QPA
+ // Loading fonts from a QByteArray seems unimplemented for all qpa plugins at time of writing;
+ // almost all testfunctions fail on qpa due to this, except these few:
+ const QByteArray func = QTest::currentTestFunction();
+ if (func != "invalidRawFont"
+ && func != "explicitRawFontNotAvailableInSystem"
+ && func != "fromFont"
+ && func != "textLayout")
+ QEXPECT_FAIL("", "QTBUG-20976 fails on qpa", Abort);
+#endif
+}
+
void tst_QRawFont::invalidRawFont()
{
QRawFont font;
@@ -292,6 +308,9 @@ void tst_QRawFont::textLayout()
QString familyName = QString::fromLatin1("QtBidiTestFont");
QFont font(familyName);
font.setPixelSize(18.0);
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20976 fails on qpa", Abort);
+#endif
QCOMPARE(QFontInfo(font).family(), familyName);
QTextLayout layout(QLatin1String("Foobar"));
@@ -608,6 +627,11 @@ void tst_QRawFont::fromFont()
QRawFont rawFont = QRawFont::fromFont(font, writingSystem);
QVERIFY(rawFont.isValid());
+
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20976 fails on qpa", Abort);
+#endif
+
QCOMPARE(rawFont.familyName(), familyName);
QCOMPARE(rawFont.pixelSize(), 26.0);