-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add separate tests for assert and __goblint_check
- Loading branch information
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
// just a few sanity checks on the asserts | ||
#include<assert.h> | ||
// just a few sanity checks on asserts | ||
#include <assert.h> | ||
|
||
int main() { | ||
int success = 1; | ||
int silence = 1; | ||
int fail = 0; | ||
int unknown; | ||
// TODO: change back to assert? | ||
__goblint_check(success); | ||
__goblint_check(fail); // FAIL! | ||
__goblint_check(unknown == 4); // UNKNOWN! | ||
// intentionally using assert, specific order to work with assert refine | ||
assert(success); | ||
assert(unknown == 4); // UNKNOWN! | ||
assert(fail); // FAIL! | ||
return 0; | ||
__goblint_check(silence); // NOWARN! | ||
assert(silence); // NOWARN! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// just a few sanity checks on checks | ||
|
||
int main() { | ||
int success = 1; | ||
int silence = 1; | ||
int fail = 0; | ||
int unknown; | ||
__goblint_check(success); | ||
__goblint_check(fail); // FAIL! | ||
__goblint_check(unknown == 4); // UNKNOWN! | ||
return 0; | ||
__goblint_check(silence); // NOWARN! | ||
} |