aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2011-05-12 11:44:17 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2011-05-12 11:44:17 +0200
commitae8f9b5f1192801e9d4591ef8be2d95cc9e48fac (patch)
treee076aa9d8a400c137b643ac2e7314dc7e15c80d5 /tests
parentf31d94f2d4438106558dede0de1a423cade960a9 (diff)
Added auto tests for properties initialized using JS statements
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/propertyInit.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/propertyInit.2.qml6
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyInit.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/propertyInit.1.qml
new file mode 100644
index 0000000000..a7ef16af68
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/propertyInit.1.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.0
+
+QtObject {
+ property int test: { var _ = 1; _ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyInit.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/propertyInit.2.qml
new file mode 100644
index 0000000000..a165de8d16
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/propertyInit.2.qml
@@ -0,0 +1,6 @@
+import QtQuick 1.0
+
+QtObject {
+ property int test: if (b == 1) 123; else 321;
+ property int b: 1
+}