aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint/data/qjsroot.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmllint/data/qjsroot.qml')
-rw-r--r--tests/auto/qml/qmllint/data/qjsroot.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/qjsroot.qml b/tests/auto/qml/qmllint/data/qjsroot.qml
new file mode 100644
index 0000000000..c5995b9576
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/qjsroot.qml
@@ -0,0 +1,20 @@
+import QtQuick
+
+QtObject {
+ property var locale: Qt.locale()
+ property date currentDate: new Date()
+ property RegularExpressionValidator validator: RegularExpressionValidator { regularExpression: /20([0-9]+)/ };
+ property double pi: 3.14
+
+ // Test date
+ property string dateString: currentDate.toLocaleDateString();
+
+ // Test string
+ property int dateStringDotIndex: dateString.indexOf(".")
+
+ // Test regularExpression
+ property var dateStringReplace: validator.regularExpression.exec(dateString)
+
+ // Test double
+ property string fixedPi: pi.toFixed(1)
+}