tst_qtjson: Mark some test as XFAIL on BlackBerry 10

These tests seem to fail because denormalized numbers are not
supported on QNX yet, so marking them as expected failures.

 - testNumbers_2()
 - toJsonLargeNumericValues()
 - parseNumbers()

Task-number: QTBUG-37066
Change-Id: Ifec95b936fb70253395dee4d1ca18e85870486a3
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
This commit is contained in:
Sergio Ahumada 2014-02-26 09:18:35 +01:00 committed by The Qt Project
parent 1e29bf5b07
commit 82e699cab0

View File

@ -360,6 +360,10 @@ void tst_QtJson::testNumbers_2()
QJsonDocument jDocument2(QJsonDocument::fromJson(ba));
for (int power = 0; power <= 1075; power++) {
floatValues_1[power] = jDocument2.object().value(QString::number(power)).toDouble();
#ifdef Q_OS_BLACKBERRY
if (power >= 970)
QEXPECT_FAIL("", "See QTBUG-37066", Abort);
#endif
QVERIFY2(floatValues[power] == floatValues_1[power], QString("floatValues[%1] != floatValues_1[%1]").arg(power).toLatin1());
}
@ -1299,11 +1303,17 @@ void tst_QtJson::toJsonLargeNumericValues()
" ]\n"
"}\n";
#ifdef Q_OS_BLACKBERRY
QEXPECT_FAIL("", "See QTBUG-37066", Continue);
#endif
QCOMPARE(json, expected);
QJsonDocument doc;
doc.setObject(object);
json = doc.toJson();
#ifdef Q_OS_BLACKBERRY
QEXPECT_FAIL("", "See QTBUG-37066", Continue);
#endif
QCOMPARE(json, expected);
}
@ -1705,6 +1715,10 @@ void tst_QtJson::parseNumbers()
json += numbers[i].str;
json += " ]";
QJsonDocument doc = QJsonDocument::fromJson(json);
#ifdef Q_OS_BLACKBERRY
if (0 == QString::compare(numbers[i].str, "1.1e-308"))
QEXPECT_FAIL("", "See QTBUG-37066", Abort);
#endif
QVERIFY(!doc.isEmpty());
QCOMPARE(doc.isArray(), true);
QCOMPARE(doc.isObject(), false);