~ubuntu-branches/ubuntu/trusty/qtdeclarative-opensource-src/trusty-updates

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmlecmascript/data/switchStatement.3.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import Qt.test 1.0
 
2
 
 
3
MyQmlObject {
 
4
    value: {
 
5
        var value = 0
 
6
        switch (stringProperty) {
 
7
        default:
 
8
            value = value + 1
 
9
        case "A":
 
10
            value = value + 1
 
11
            value = value + 1
 
12
            /* should fall through */
 
13
        case "S":
 
14
            value = value + 1
 
15
            value = value + 1
 
16
            value = value + 1
 
17
            break;
 
18
        case "D": { // with curly braces
 
19
            value = value + 1
 
20
            value = value + 1
 
21
            value = value + 1
 
22
            break;
 
23
        }
 
24
        case "F": {
 
25
            value = value + 1
 
26
            value = value + 1
 
27
            value = value + 1
 
28
        }
 
29
        /* should fall through */
 
30
        }
 
31
    }
 
32
}
 
33