We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 693c28a commit 704f1faCopy full SHA for 704f1fa
cpp/ql/test/library-tests/controlflow/guards/test.cpp
@@ -52,3 +52,37 @@ bool testWithCatch0(int v)
52
53
return false;
54
}
55
+
56
+void use1(int);
57
+void use2(int);
58
+void use3(int);
59
60
+void test_switches_simple(int i) {
61
+ switch(i) {
62
+ case 0:
63
+ use1(i);
64
+ break;
65
+ case 1:
66
+ use2(i);
67
+ /* NOTE: fallthrough */
68
+ case 2:
69
+ use3(i);
70
+ }
71
+}
72
73
+void test_switches_range(int i) {
74
75
+ case 0 ... 10:
76
77
78
+ case 11 ... 20:
79
80
81
82
83
+void test_switches_default(int i) {
84
85
+ default:
86
87
88
0 commit comments