aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/v4/data/unaryPlus.qml
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-02-15 10:27:44 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-16 08:31:10 +0100
commit64a5087df7896524bf6af30067f442d1fc8458bc (patch)
tree5492a8c315062110be7c445c9fe5cfe8812fa7c9 /tests/auto/declarative/v4/data/unaryPlus.qml
parent2df9abf7047afbe20b19d156ac37b58d9b047575 (diff)
Set the type for unary expressions in v4.
Previously unary expressions were being discarded because the type was not set. Also add tests verifying the results. Change-Id: Icbb493fbb6f036e59c8a4a1fe232c118312a63a5 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tests/auto/declarative/v4/data/unaryPlus.qml')
-rw-r--r--tests/auto/declarative/v4/data/unaryPlus.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/declarative/v4/data/unaryPlus.qml b/tests/auto/declarative/v4/data/unaryPlus.qml
new file mode 100644
index 0000000000..cd5315a7cc
--- /dev/null
+++ b/tests/auto/declarative/v4/data/unaryPlus.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+
+Item {
+ property real test1: +i1.p2
+ property int test2: +i1.p2
+ property real test3: +i1.p1
+ property int test4: +i1.p1
+ property real test5: +i1.p3
+ property int test6: +i1.p3
+ property real test7: +i1.p4
+ property int test8: +i1.p4
+ property real test9: +i1.p5
+ property int test10: +i1.p5
+
+ QtObject {
+ id: i1
+ property real p1: -3.7
+ property int p2: 18
+ property real p3: -3.3
+ property int p4: -7
+ property real p5: 4.4
+ }
+}
+