summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/json/tst_qtjson.cpp
diff options
context:
space:
mode:
authorSergio Ahumada <sahumada@blackberry.com>2014-02-26 09:18:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-28 07:46:31 +0100
commit82e699cab0eb6a209c06607e297803fd127f5e63 (patch)
treeeaf8460b1320a46b9ff1686dc49ddaa489f2770f /tests/auto/corelib/json/tst_qtjson.cpp
parent1e29bf5b07ef60b8a8c14915bc3bcce4209b04ef (diff)
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>
Diffstat (limited to 'tests/auto/corelib/json/tst_qtjson.cpp')
-rw-r--r--tests/auto/corelib/json/tst_qtjson.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp
index aee5875613..6736a33405 100644
--- a/tests/auto/corelib/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/json/tst_qtjson.cpp
@@ -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);