-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrol_switch.bcsctrl
More file actions
38 lines (37 loc) · 1.04 KB
/
Copy pathcontrol_switch.bcsctrl
File metadata and controls
38 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
control InvalidSwitchTestController {
enum Mode {
OFF,
ECO,
COMFORT
}
enum Status {
ON,
OFF
}
var mode_should_fail: Mode;
unit TestUnit {
var status_should_fail: Status; // Moved to unit level
switch (mode_should_fail){
case Status.OFF{
// Nested variable declarations no longer allowed
status_should_fail = Status.ON;
}
case Mode.ECO{
// Nested variable declarations no longer allowed
status_should_fail = Status.OFF;
}
case Mode.ECO{
// Nested variable declarations no longer allowed
status_should_fail = Status.ON;
}
case true{
// Nested variable declarations no longer allowed
status_should_fail = Status.OFF;
}
default{
// Nested variable declarations no longer allowed
status_should_fail = Status.ON;
}
}
}
}