summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-09-01 01:54:14 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-09-01 01:54:14 (GMT)
commitce698d243f31d2b9adcdf2b6b40f5844c200b159 (patch)
tree6e1704313de68bb0fa31ff5a975662a458bf95ad /tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
parentb8cca95c0395369cdfb17c198aff085badcddd94 (diff)
downloadQt-ce698d243f31d2b9adcdf2b6b40f5844c200b159.zip
Qt-ce698d243f31d2b9adcdf2b6b40f5844c200b159.tar.gz
Qt-ce698d243f31d2b9adcdf2b6b40f5844c200b159.tar.bz2
Support JS "in" operator on QML objects
QTBUG-12837
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 496cc05..76ca964 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -159,6 +159,7 @@ private slots:
void qtbug_11600();
void nonscriptable();
void deleteLater();
+ void in();
void include();
@@ -2553,6 +2554,16 @@ void tst_qdeclarativeecmascript::deleteLater()
delete o;
}
+void tst_qdeclarativeecmascript::in()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("in.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ delete o;
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"