diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-08 04:27:04 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-08 04:27:56 (GMT) |
commit | a8247ce85808614f6ec921a37bae9fb0d447252b (patch) | |
tree | d5b280d784c239ebea328a6b6b5d23946c0c26e9 /tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | |
parent | 224189f1531bc9e2e25b9ea72038e240bd3550a9 (diff) | |
download | Qt-a8247ce85808614f6ec921a37bae9fb0d447252b.zip Qt-a8247ce85808614f6ec921a37bae9fb0d447252b.tar.gz Qt-a8247ce85808614f6ec921a37bae9fb0d447252b.tar.bz2 |
Autotest for 76f5e9e7d1eea8d688d5459b7b7b2bfa3f9057ed
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 77dd4b8..8e73afa 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -543,11 +543,20 @@ void tst_qdeclarativeecmascript::extensionObjects() QVERIFY(object != 0); QCOMPARE(object->baseProperty(), 13); QCOMPARE(object->coreProperty(), 9); - object->setProperty("extendedProperty", QVariant(11)); object->setProperty("baseExtendedProperty", QVariant(92)); QCOMPARE(object->coreProperty(), 11); QCOMPARE(object->baseProperty(), 92); + + MyExtendedObject *nested = qobject_cast<MyExtendedObject*>(qvariant_cast<QObject *>(object->property("nested"))); + QVERIFY(nested); + QCOMPARE(nested->baseProperty(), 13); + QCOMPARE(nested->coreProperty(), 9); + nested->setProperty("extendedProperty", QVariant(11)); + nested->setProperty("baseExtendedProperty", QVariant(92)); + QCOMPARE(nested->coreProperty(), 11); + QCOMPARE(nested->baseProperty(), 92); + } void tst_qdeclarativeecmascript::attachedProperties() |