Skip to content

Commit

Permalink
Merge pull request #797 from goblint/assert-test-fixes
Browse files Browse the repository at this point in the history
Fix some asserts in tests
  • Loading branch information
sim642 authored Jul 28, 2022
2 parents 95ba94f + 0063784 commit 1dcd967
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/regression/01-cpa/22-null_ptr.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int main(){
// filtering out the null pointer possibility
if (x){
// __goblint_check(x != 0);
__goblint_check(*x = 1);
__goblint_check(*x == 1);
b = 2;
__goblint_check(*x != 0);
b = 0;
Expand Down
1 change: 0 additions & 1 deletion tests/regression/08-malloc_null/02-paths-malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ int main(void) {
exit(-1);
}

__goblint_check(0); // FAIL
*u = 40; // NOWARN
*v = 40; // NOWARN

Expand Down
6 changes: 3 additions & 3 deletions tests/regression/30-fast_global_inits/04-non-zero.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ int main(void) {
__goblint_check(global_array[1] == 0); //UNKNOWN
__goblint_check(global_array[2] == 3); //UNKNOWN
__goblint_check(global_array[3] == 42); //UNKNOWN
__goblint_check(global_array[3] == 11); //UNKNOWN
__goblint_check(global_array[4] == 11); //UNKNOWN
__goblint_check(global_array[1] == -1); //FAIL

__goblint_check(global_array_multi[0][0] == 9); //UNKNOWN
__goblint_check(global_array_multi[0][1] == 0); //UNKNOWN
__goblint_check(global_array_multi[0][2] == 3); //UNKNOWN
__goblint_check(global_array_multi[0][3] == 42); //UNKNOWN
__goblint_check(global_array_multi[0][3] == 11); //UNKNOWN
__goblint_check(global_array_multi[0][4] == 11); //UNKNOWN
__goblint_check(global_array_multi[0][1] == -1); //FAIL

__goblint_check(global_array_multi[1][0] == 9); //UNKNOWN
__goblint_check(global_array_multi[1][1] == 0); //UNKNOWN
__goblint_check(global_array_multi[1][2] == 3); //UNKNOWN
__goblint_check(global_array_multi[1][3] == 42); //UNKNOWN
__goblint_check(global_array_multi[1][3] == 11); //UNKNOWN
__goblint_check(global_array_multi[1][4] == 11); //UNKNOWN
__goblint_check(global_array_multi[1][1] == -1); //FAIL
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ int main(void) {
__goblint_check(global_array[1] == 0); //UNKNOWN
__goblint_check(global_array[2] == 3); //UNKNOWN
__goblint_check(global_array[3] == 42); //UNKNOWN
__goblint_check(global_array[3] == 11); //UNKNOWN
__goblint_check(global_array[4] == 11); //UNKNOWN

__goblint_check(global_array_multi[0][0] == 9); //UNKNOWN
__goblint_check(global_array_multi[0][1] == 0); //UNKNOWN
__goblint_check(global_array_multi[0][2] == 3); //UNKNOWN
__goblint_check(global_array_multi[0][3] == 42); //UNKNOWN
__goblint_check(global_array_multi[0][3] == 11); //UNKNOWN
__goblint_check(global_array_multi[0][4] == 11); //UNKNOWN


__goblint_check(global_array_multi[1][0] == 9); //UNKNOWN
__goblint_check(global_array_multi[1][1] == 0); //UNKNOWN
__goblint_check(global_array_multi[1][2] == 3); //UNKNOWN
__goblint_check(global_array_multi[1][3] == 42); //UNKNOWN
__goblint_check(global_array_multi[1][3] == 11); //UNKNOWN
__goblint_check(global_array_multi[1][4] == 11); //UNKNOWN
}

0 comments on commit 1dcd967

Please sign in to comment.