summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-06 07:47:14 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-06 07:47:14 (GMT)
commit50a4a8ec76b98cc860de9b6e6aaf25c87e690eed (patch)
tree991eed2074217e20fea777bd83da2165f09ac01b
parent3184fbcd858244b5cd171fd0ab32c3ff565e579e (diff)
downloadQt-50a4a8ec76b98cc860de9b6e6aaf25c87e690eed.zip
Qt-50a4a8ec76b98cc860de9b6e6aaf25c87e690eed.tar.gz
Qt-50a4a8ec76b98cc860de9b6e6aaf25c87e690eed.tar.bz2
Another test
-rw-r--r--tests/auto/declarative/qmllanguage/data/dynamicObjectProperties.qml13
-rw-r--r--tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp14
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmllanguage/data/dynamicObjectProperties.qml b/tests/auto/declarative/qmllanguage/data/dynamicObjectProperties.qml
new file mode 100644
index 0000000..e69ccee
--- /dev/null
+++ b/tests/auto/declarative/qmllanguage/data/dynamicObjectProperties.qml
@@ -0,0 +1,13 @@
+import Test 1.0
+import Qt 4.6
+import Qt 4.6 as Qt
+
+Object {
+ property Object objectProperty
+ property Object objectProperty2
+ objectProperty2: Object {}
+
+ property MyComponent myComponentProperty
+ property MyComponent myComponentProperty2
+ myComponentProperty2: MyComponent {}
+}
diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
index 1bf98df..3825b62 100644
--- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
+++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
@@ -45,6 +45,7 @@ private slots:
void idProperty();
void assignSignal();
void dynamicProperties();
+ void dynamicObjectProperties();
void dynamicSignalsAndSlots();
void simpleBindings();
void autoComponentCreation();
@@ -404,6 +405,19 @@ void tst_qmllanguage::dynamicProperties()
QCOMPARE(object->property("variantProperty"), QVariant(12));
}
+// Tests the creation and assignment of dynamic object properties
+// ### Not complete
+void tst_qmllanguage::dynamicObjectProperties()
+{
+ QmlComponent component(&engine, TEST_FILE("dynamicObjectProperties.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QVERIFY(object->property("objectProperty") == qVariantFromValue((QObject*)0));
+ QVERIFY(object->property("objectProperty2") != qVariantFromValue((QObject*)0));
+}
+
// Tests the declaration of dynamic signals and slots
void tst_qmllanguage::dynamicSignalsAndSlots()
{