aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/switchStatement.4.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/switchStatement.4.qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/switchStatement.4.qml31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/switchStatement.4.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.4.qml
new file mode 100644
index 0000000000..43ba199a04
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/switchStatement.4.qml
@@ -0,0 +1,31 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ value: {
+ var value = 0
+ switch (stringProperty) {
+ case "A":
+ value = value + 1
+ value = value + 1
+ /* should fall through */
+ case "S":
+ value = value + 1
+ value = value + 1
+ value = value + 1
+ break;
+ case "D": { // with curly braces
+ value = value + 1
+ value = value + 1
+ value = value + 1
+ break;
+ }
+ case "F": {
+ value = value + 1
+ value = value + 1
+ value = value + 1
+ }
+ /* should fall through */
+ }
+ }
+}
+