aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-11-17 23:14:19 -0800
committerThiago Macieira <thiago.macieira@intel.com>2014-11-18 09:34:01 +0100
commit205336ebc859e670a4d06524ce65a22befc0eab4 (patch)
treedd752d4a22accb77ac56883d87e957e89cfbb04a
parent54ec039a975c746991600056a8c352fa697fe50b (diff)
Change test data from 6.7 to 6.5
6.5 is an exact binary number (4 + 2 + 0.5), so all conversions to string will result in "6.5", regardless of how many digits of precision are used. This is done in advance of changing QVariant to add more digits of precision, which would cause toString() of 6.7 to result in "6.7000000000000002". Change-Id: I19ea4c5bb02b99f0655c0b9bc9dc09f06ec654e5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--tests/auto/qml/qqmlecmascript/data/compiled.qml2
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/compiled.qml b/tests/auto/qml/qqmlecmascript/data/compiled.qml
index 7c46306772..700384093b 100644
--- a/tests/auto/qml/qqmlecmascript/data/compiled.qml
+++ b/tests/auto/qml/qqmlecmascript/data/compiled.qml
@@ -40,7 +40,7 @@ QtObject {
property int d: 176
property string e: "Hello"
property string f: "World"
- property variant g: 6.7
+ property variant g: 6.5
property variant h: "!"
property variant i: true
property string j: "#112233"
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 0f1e77a7a5..2a01a3493b 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -3540,8 +3540,8 @@ void tst_qqmlecmascript::compiled()
QCOMPARE(object->property("test17").toInt(), 4);
QCOMPARE(object->property("test18").toReal(), qreal(176));
QCOMPARE(object->property("test19").toInt(), 6);
- QCOMPARE(object->property("test20").toReal(), qreal(6.7));
- QCOMPARE(object->property("test21").toString(), QLatin1String("6.7"));
+ QCOMPARE(object->property("test20").toReal(), qreal(6.5));
+ QCOMPARE(object->property("test21").toString(), QLatin1String("6.5"));
QCOMPARE(object->property("test22").toString(), QLatin1String("!"));
QCOMPARE(object->property("test23").toBool(), true);
QCOMPARE(qvariant_cast<QColor>(object->property("test24")), QColor(0x11,0x22,0x33));