source:
CIVL/mods/dev.civl.abc/examples/side-effects/out_enums.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 261 bytes | |
| Rev | Line | |
|---|---|---|
| [aad342c] | 1 | #include<assert.h> |
| 2 | ||
| 3 | //========================= enums.c ======================== | |
| 4 | typedef enum color{ | |
| 5 | RED, | |
| 6 | BLUE | |
| 7 | } color_t; | |
| 8 | color_t f() | |
| 9 | { | |
| 10 | return RED; | |
| 11 | } | |
| 12 | int main() | |
| 13 | { | |
| 14 | int x = 0; | |
| 15 | int $sef$0 = f(); | |
| 16 | if($sef$0 == RED) | |
| 17 | { | |
| 18 | x = 1; | |
| 19 | } | |
| 20 | assert(x == 1); | |
| 21 | } |
Note:
See TracBrowser
for help on using the repository browser.
