Skip to content

Commit 99a4da4

Browse files
committed
Add 00-sanity/39-assert-ptr test
Based on 00-sanity/01-assert. Related to #1682 (comment).
1 parent 8dd4762 commit 99a4da4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include <stdlib.h>
2+
#include <assert.h>
3+
4+
int main() {
5+
int* success = malloc(sizeof(int));
6+
int* silence = malloc(sizeof(int));
7+
int* fail = NULL;
8+
int* unknown;
9+
// intentionally using assert, specific order to work with assert refine
10+
assert(success);
11+
assert(unknown); // UNKNOWN!
12+
assert(fail); // FAIL!
13+
return 0;
14+
assert(silence); // NOWARN!
15+
}

0 commit comments

Comments
 (0)