From 412920402f488c2cf6eb81e7582f9b5aa7b06680 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 18 Dec 2009 08:34:53 +1000 Subject: Add autotest for d169873541ca6f6725e9ce5bfbbf9941f1823a1f. --- tests/auto/declarative/qmlecmascript/data/CustomObject.qml | 5 +++++ .../declarative/qmlecmascript/data/compositePropertyType.qml | 8 ++++++++ tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp | 9 +++++++++ 3 files changed, 22 insertions(+) create mode 100644 tests/auto/declarative/qmlecmascript/data/CustomObject.qml create mode 100644 tests/auto/declarative/qmlecmascript/data/compositePropertyType.qml diff --git a/tests/auto/declarative/qmlecmascript/data/CustomObject.qml b/tests/auto/declarative/qmlecmascript/data/CustomObject.qml new file mode 100644 index 0000000..691d9ec --- /dev/null +++ b/tests/auto/declarative/qmlecmascript/data/CustomObject.qml @@ -0,0 +1,5 @@ +import Qt 4.6 + +QtObject { + property string greeting: "hello world" +} diff --git a/tests/auto/declarative/qmlecmascript/data/compositePropertyType.qml b/tests/auto/declarative/qmlecmascript/data/compositePropertyType.qml new file mode 100644 index 0000000..80a2814 --- /dev/null +++ b/tests/auto/declarative/qmlecmascript/data/compositePropertyType.qml @@ -0,0 +1,8 @@ +import Qt 4.6 + +QtObject { + property CustomObject myObject + myObject: CustomObject { } + + Component.onCompleted: console.log(myObject.greeting) +} diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp index b9a2241..f0e54ef 100644 --- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp +++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp @@ -110,6 +110,7 @@ private slots: void transientErrors(); void shutdownErrors(); void externalScript(); + void compositePropertyType(); void bug1(); @@ -1017,6 +1018,14 @@ void tst_qmlecmascript::externalScript() } } +void tst_qmlecmascript::compositePropertyType() +{ + QmlComponent component(&engine, TEST_FILE("compositePropertyType.qml")); + QTest::ignoreMessage(QtDebugMsg, "hello world"); + QObject *object = qobject_cast(component.create()); + delete object; +} + void tst_qmlecmascript::bug1() { QmlComponent component(&engine, TEST_FILE("bug.1.qml")); -- cgit v0.12