diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-07-19 19:46:35 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-07-19 19:46:35 (GMT) |
commit | 5875da6cae352bbcbe64f537ccfcfab08ad98b3f (patch) | |
tree | 1f707443b228c25e2d0389133b8e697e88a11426 /testing/035_invariant.c | |
parent | ea7a639c40a88c0de4baad4c0ffd5ae4b4065969 (diff) | |
download | Doxygen-5875da6cae352bbcbe64f537ccfcfab08ad98b3f.zip Doxygen-5875da6cae352bbcbe64f537ccfcfab08ad98b3f.tar.gz Doxygen-5875da6cae352bbcbe64f537ccfcfab08ad98b3f.tar.bz2 |
Added regression test suite
Diffstat (limited to 'testing/035_invariant.c')
-rw-r--r-- | testing/035_invariant.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/035_invariant.c b/testing/035_invariant.c new file mode 100644 index 0000000..28c08f8 --- /dev/null +++ b/testing/035_invariant.c @@ -0,0 +1,15 @@ +// objective: test \invariant, \pre and \post commands +// check: 035__invariant_8c.xml + +/** \file */ + +/** \invariant i+j=p + * \pre p\>=0 + * \post *q=2^(p+1) + */ +void func(int p,int *q) +{ + int j = p, k=1, i; + for (i=0; i<=p; i++) j--,k=k*2; + *q = k; +} |