summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-26 04:29:19 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-28 23:50:06 (GMT)
commit078ff776e37aebe5b7e88e4b4f21da1158fac3c7 (patch)
treed3e4a466b6d7df796cfd5031760b53c210d3635e /tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
parent921d6882caa4f4be78c747493295d3bdd3f1f673 (diff)
downloadQt-078ff776e37aebe5b7e88e4b4f21da1158fac3c7.zip
Qt-078ff776e37aebe5b7e88e4b4f21da1158fac3c7.tar.gz
Qt-078ff776e37aebe5b7e88e4b4f21da1158fac3c7.tar.bz2
Autotest tweaks.
Diffstat (limited to 'tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
index 483d588..8ab7b0b 100644
--- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
+++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
@@ -69,14 +69,20 @@ void tst_qdeclarativebinding::binding()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-binding.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
-
QVERIFY(rect != 0);
+
+ QDeclarativeBind *binding3 = qobject_cast<QDeclarativeBind*>(rect->findChild<QDeclarativeBind*>("binding3"));
+ QVERIFY(binding3 != 0);
+
QCOMPARE(rect->color(), QColor("yellow"));
QCOMPARE(rect->property("text").toString(), QString("Hello"));
+ QCOMPARE(binding3->when(), false);
rect->setProperty("changeColor", true);
QCOMPARE(rect->color(), QColor("red"));
+ QCOMPARE(binding3->when(), true);
+
QDeclarativeBind *binding = qobject_cast<QDeclarativeBind*>(rect->findChild<QDeclarativeBind*>("binding1"));
QVERIFY(binding != 0);
QCOMPARE(binding->object(), qobject_cast<QObject*>(rect));