summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-20 13:48:03 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-20 13:48:03 +0200
commitdfc61f6b59886f7d223722bf149342cdd46581a8 (patch)
treec37ec0a955a233976ff2d1ef3ff95f46f1769e9e /tests
parent99f6250a4ac031b70757442715b226bc339ab699 (diff)
parentee9c52d5dd38d99ea7d91cb612653f638e674ee3 (diff)
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Update docs with correct property name Fix incorrect merge Work around rendering bug in Rectangle. Remove warnings. Test e75088323ae15604139ddfd66b85cc3b8d43abeb Add XmlListModel::errorString() Fix dynamicscene example Update old keyword in docs
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp9
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
index a883e85e75..165590585d 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 4900fa2548..9a8ad647fe 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<QColor>(object->property("test24")), QColor(0x11,0x22,0x33));
+ QCOMPARE(qvariant_cast<QColor>(object->property("test25")), QColor(0x11,0x22,0x33,0xAA));
delete object;
}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index 4173a44353..7769979c9b 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -268,10 +268,12 @@ void tst_qdeclarativexmllistmodel::xml()
QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
QSignalSpy spy(model, SIGNAL(statusChanged(QDeclarativeXmlListModel::Status)));
+ QVERIFY(model->errorString().isEmpty());
QCOMPARE(model->progress(), qreal(0.0));
QCOMPARE(model->status(), QDeclarativeXmlListModel::Loading);
QTRY_COMPARE(spy.count(), 1); spy.clear();
QCOMPARE(model->status(), QDeclarativeXmlListModel::Ready);
+ QVERIFY(model->errorString().isEmpty());
QCOMPARE(model->progress(), qreal(1.0));
QCOMPARE(model->count(), 9);
@@ -284,6 +286,7 @@ void tst_qdeclarativexmllistmodel::xml()
QCOMPARE(model->status(), QDeclarativeXmlListModel::Loading);
QTRY_COMPARE(spy.count(), 1); spy.clear();
QCOMPARE(model->status(), QDeclarativeXmlListModel::Ready);
+ QVERIFY(model->errorString().isEmpty());
QCOMPARE(model->count(), count);
delete model;
@@ -309,10 +312,12 @@ void tst_qdeclarativexmllistmodel::source()
QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
QSignalSpy spy(model, SIGNAL(statusChanged(QDeclarativeXmlListModel::Status)));
+ QVERIFY(model->errorString().isEmpty());
QCOMPARE(model->progress(), qreal(0.0));
QCOMPARE(model->status(), QDeclarativeXmlListModel::Loading);
QTRY_COMPARE(spy.count(), 1); spy.clear();
QCOMPARE(model->status(), QDeclarativeXmlListModel::Ready);
+ QVERIFY(model->errorString().isEmpty());
QCOMPARE(model->progress(), qreal(1.0));
QCOMPARE(model->count(), 9);
@@ -320,6 +325,7 @@ void tst_qdeclarativexmllistmodel::source()
QCOMPARE(model->progress(), qreal(0.0));
QTRY_COMPARE(spy.count(), 1); spy.clear();
QCOMPARE(model->status(), QDeclarativeXmlListModel::Loading);
+ QVERIFY(model->errorString().isEmpty());
QEventLoop loop;
QTimer timer;
@@ -337,9 +343,12 @@ void tst_qdeclarativexmllistmodel::source()
QCOMPARE(model->status(), status);
QCOMPARE(model->count(), count);
+
if (status == QDeclarativeXmlListModel::Ready)
QCOMPARE(model->progress(), qreal(1.0));
+ QCOMPARE(model->errorString().isEmpty(), status == QDeclarativeXmlListModel::Ready);
+
delete model;
}