diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/switchStatement.3.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/switchStatement.3.qml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/switchStatement.3.qml b/tests/auto/qml/qqmlecmascript/data/switchStatement.3.qml new file mode 100644 index 0000000000..5b05d88767 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/switchStatement.3.qml @@ -0,0 +1,33 @@ +import Qt.test 1.0 + +MyQmlObject { + value: { + var value = 0 + switch (stringProperty) { + default: + value = value + 1 + 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 */ + } + } +} + |