push
travis-ci
11151 of 14171 relevant lines covered (78.69%)
0.79 hits per line
1 |
|
|
2 |
NONE = 0
|
1✔ |
3 |
HALT = 1 << 0 |
1✔ |
4 |
FAULT = 1 << 1 |
1✔ |
5 |
BREAK = 1 << 2 |
1✔ |
6 |
|
|
7 |
|
|
8 |
def VMStateStr(_VMState): |
1✔ |
9 |
if _VMState == NONE:
|
1✔ |
10 |
return "NONE" |
× |
11 |
|
|
12 |
state = [] |
1✔ |
13 |
if _VMState & HALT:
|
1✔ |
14 |
state.append("HALT")
|
1✔ |
15 |
if _VMState & FAULT:
|
1✔ |
16 |
state.append("FAULT")
|
× |
17 |
if _VMState & BREAK:
|
1✔ |
18 |
state.append("BREAK")
|
1✔ |
19 |
|
|
20 |
return ", ".join(state) |
1✔ |