aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/switchStatement.6.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/switchStatement.6.qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/switchStatement.6.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/switchStatement.6.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.6.qml
new file mode 100644
index 0000000000..6fb71eb345
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/switchStatement.6.qml
@@ -0,0 +1,13 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ function one(kind) { return 123 }
+ function two(kind) { return 321 }
+
+ value: switch (stringProperty) {
+ case "A": case "S": one(stringProperty); break;
+ case "D": case "F": two(stringProperty); break;
+ default: 0
+ }
+}
+