aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/typeOf.js25
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/typeOf.qml26
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/typeOf.js b/tests/auto/declarative/qdeclarativeecmascript/data/typeOf.js
new file mode 100644
index 0000000000..16a34234c0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/typeOf.js
@@ -0,0 +1,25 @@
+var test1 = typeof a
+
+var b = {}
+var test2 = typeof b
+
+var c = 5
+var test3 = typeof c
+
+var d = "hello world"
+var test4 = typeof d
+
+var e = function() {}
+var test5 = typeof e
+
+var f = null
+var test6 = typeof f
+
+var g = undefined
+var test7 = typeof g
+
+var h = true
+var test8 = typeof h
+
+var i = []
+var test9 = typeof i
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/typeOf.qml b/tests/auto/declarative/qdeclarativeecmascript/data/typeOf.qml
new file mode 100644
index 0000000000..28f7debed5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/typeOf.qml
@@ -0,0 +1,26 @@
+import QtQuick 2.0
+import "typeOf.js" as TypeOf
+
+QtObject {
+ property string test1
+ property string test2
+ property string test3
+ property string test4
+ property string test5
+ property string test6
+ property string test7
+ property string test8
+ property string test9
+
+ Component.onCompleted: {
+ test1 = TypeOf.test1
+ test2 = TypeOf.test2
+ test3 = TypeOf.test3
+ test4 = TypeOf.test4
+ test5 = TypeOf.test5
+ test6 = TypeOf.test6
+ test7 = TypeOf.test7
+ test8 = TypeOf.test8
+ test9 = TypeOf.test9
+ }
+}