diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-03-15 00:25:54 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-03-15 00:28:57 (GMT) |
commit | 774cb9eca9ea243436dbf61cdb7081fc270cdec9 (patch) | |
tree | 3b22eb846a78540a13be39665be96580a985d765 /tests/auto/declarative/qdeclarativelanguage | |
parent | a1a9929acaeccd7027605ffeb9794b034b146c92 (diff) | |
download | Qt-774cb9eca9ea243436dbf61cdb7081fc270cdec9.zip Qt-774cb9eca9ea243436dbf61cdb7081fc270cdec9.tar.gz Qt-774cb9eca9ea243436dbf61cdb7081fc270cdec9.tar.bz2 |
Remove bindings before assigning constants in VME
Change-Id: I4c246cbcf8d0168cb4af028d6d04088fe20cdbba
Task-number: QTBUG-17276
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage')
4 files changed, 29 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType.qml b/tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType.qml new file mode 100644 index 0000000..4526cf0 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType.qml @@ -0,0 +1,7 @@ +import QtQuick 1.0 + +QtObject { + property InlineAssignmentsOverrideBindingsType2 nested: InlineAssignmentsOverrideBindingsType2 { + value: 19 * 33 + } +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType2.qml b/tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType2.qml new file mode 100644 index 0000000..4127ca4 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/InlineAssignmentsOverrideBindingsType2.qml @@ -0,0 +1,5 @@ +import QtQuick 1.0 + +QtObject { + property int value +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/inlineAssignmentsOverrideBindings.qml b/tests/auto/declarative/qdeclarativelanguage/data/inlineAssignmentsOverrideBindings.qml new file mode 100644 index 0000000..8f3c5ce --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/inlineAssignmentsOverrideBindings.qml @@ -0,0 +1,6 @@ +import QtQuick 1.0 + +InlineAssignmentsOverrideBindingsType { + property int test: nested.value + nested.value: 11 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index f3f41a9..5a2591f 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -134,6 +134,7 @@ private slots: void dontDoubleCallClassBegin(); void reservedWords_data(); void reservedWords(); + void inlineAssignmentsOverrideBindings(); void basicRemote_data(); void basicRemote(); @@ -1413,9 +1414,18 @@ void tst_qdeclarativelanguage::testType(const QString& qml, const QString& type, } } +// QTBUG-17276 +void tst_qdeclarativelanguage::inlineAssignmentsOverrideBindings() +{ + QDeclarativeComponent component(&engine, TEST_FILE("inlineAssignmentsOverrideBindings.qml")); -// Import tests (QT-558) + QObject *o = component.create(); + QVERIFY(o != 0); + QCOMPARE(o->property("test").toInt(), 11); + delete o; +} +// Import tests (QT-558) void tst_qdeclarativelanguage::importsBuiltin_data() { // QT-610 |