Use V4 binding for non-final properties where possible
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlecmascript / data / assignDate.qml
1 import Qt.test 1.0
2 import QtQuick 2.0
3
4 MyTypeObject {
5     Component.onCompleted: {
6         var dateVar = new Date("2009-05-12")
7         var dateTimeVar = new Date("2009-05-12T00:00:01")
8         var dateTimeVar2 = new Date("2009-05-12T23:59:59")
9
10         dateProperty = dateVar
11         dateTimeProperty = dateTimeVar
12         dateTimeProperty2 = dateTimeVar2
13
14         // Commented properties do not currently test true:
15         boolProperty = //(dateProperty.getTime() == dateVar.getTime()) &&
16                        (dateProperty.getFullYear() == 2009) &&
17                        (dateProperty.getMonth() == 5-1) &&
18                        //(dateProperty.getDate() == 12) &&
19                        (dateProperty.getHours() == 0) &&
20                        (dateTimeProperty.getTime() == dateTimeVar.getTime()) &&
21                        (dateTimeProperty.getFullYear() == 2009) &&
22                        (dateTimeProperty.getMonth() == 5-1) &&
23                        //(dateTimeProperty.getDate() == 12) &&
24                        //(dateTimeProperty.getHours() == 0) &&
25                        (dateTimeProperty.getMinutes() == 0) &&
26                        (dateTimeProperty.getSeconds() == 1) &&
27                        (dateTimeProperty2.getTime() == dateTimeVar2.getTime()) &&
28                        (dateTimeProperty2.getFullYear() == 2009) &&
29                        (dateTimeProperty2.getMonth() == 5-1) &&
30                        //(dateTimeProperty2.getDate() == 12) &&
31                        //(dateTimeProperty2.getHours() == 23) &&
32                        (dateTimeProperty2.getMinutes() == 59) &&
33                        (dateTimeProperty2.getSeconds() == 59)
34     }
35 }