How pointers should be verifies as null? #448
Answered
by
Snaipe
IsraelBuitronD
asked this question in
Q&A
-
Given version For example, let us: int *mypointer = (int*)malloc(2*sizeof(int));
free(mypointer); How should assertion be written to verify Before Thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
Snaipe
May 9, 2022
Replies: 1 comment
-
The
More examples on how to use the new assertions can be seen in the asserts.c sample |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Snaipe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
zero
criterion is what you want: https://criterion.readthedocs.io/en/v2.4.1/assert.html#c.zeroMore examples on how to use the new assertions can be seen in the asserts.c sample