diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.qml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.qml new file mode 100644 index 0000000000..7b99c4b6ad --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.qml @@ -0,0 +1,22 @@ +import QtQuick 2.0 +import Qt.test 1.0 + +Item { + id: testOwnership + property bool test: false + + property var varProperty + + function runTest() { + if (varProperty != undefined) return; + varProperty = { a: 10, b: 11 } + if (varProperty.a != 10) return; + + gc(); // Shouldn't collect + + if (varProperty.a != 10) return; + + test = true; + } +} + |