From 33f59e150e871a1a090f478bfdfa22dc175a9d6e Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 20 May 2010 14:40:21 +1000 Subject: Test e75088323ae15604139ddfd66b85cc3b8d43abeb Task-number: QTBUG-10820 --- tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml | 4 ++++ .../declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml index a883e85..1655905 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml @@ -31,6 +31,8 @@ QtObject { property string test21: g property string test22: h property bool test23: i + property color test24: j + property color test25: k property real a: 4.5 property real b: 11.2 @@ -41,4 +43,6 @@ QtObject { property variant g: 6.7 property variant h: "!" property variant i: true + property string j: "#112233" + property string k: "#aa112233" } diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 4900fa2..9a8ad64 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -2090,6 +2090,8 @@ void tst_qdeclarativeecmascript::compiled() QCOMPARE(object->property("test21").toString(), QLatin1String("6.7")); QCOMPARE(object->property("test22").toString(), QLatin1String("!")); QCOMPARE(object->property("test23").toBool(), true); + QCOMPARE(qvariant_cast(object->property("test24")), QColor(0x11,0x22,0x33)); + QCOMPARE(qvariant_cast(object->property("test25")), QColor(0x11,0x22,0x33,0xAA)); delete object; } -- cgit v0.12