~ubuntu-branches/debian/sid/frama-c/sid

« back to all changes in this revision

Viewing changes to tests/jessie/behavior.c

  • Committer: Bazaar Package Importer
  • Author(s): Mehdi Dogguy
  • Date: 2009-06-03 08:19:25 UTC
  • Revision ID: james.westby@ubuntu.com-20090603081925-kihvxvt0wy3zc4ar
Tags: upstream-20081201.dfsg
ImportĀ upstreamĀ versionĀ 20081201.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
int x;
 
2
 
 
3
/*@ behavior one:
 
4
  @   assumes x == 1;
 
5
  @   ensures x == 10;
 
6
  @*/
 
7
void f(int z) {
 
8
  if (z)
 
9
    //@ for one: loop invariant 1 <= x <= 10;
 
10
    while (x < 10) x++;
 
11
  else
 
12
    //@ for one: assert x == 1;
 
13
    x = 10;
 
14
}
 
15
 
 
16
/*
 
17
Local Variables:
 
18
compile-command: "LC_ALL=C make behavior"
 
19
End:
 
20
*/