source:
CIVL/mods/dev.civl.com/examples/contracts/result.c@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 135 bytes | |
| Rev | Line | |
|---|---|---|
| [c6e7aaf] | 1 | #include<assert.h> |
| 2 | ||
| 3 | int gimmeOne() | |
| 4 | $ensures {$result == 1} { | |
| 5 | return 1; | |
| 6 | } | |
| 7 | ||
| 8 | int main() { | |
| 9 | int x = gimmeOne(); | |
| 10 | ||
| 11 | assert(x == 1); | |
| 12 | } |
Note:
See TracBrowser
for help on using the repository browser.
