Skip to content

Commit 389f9b7

Browse files
author
Dotsenko Andrey
committed
Add documentation for ck_assert_ptr_null and ck_assert_ptr_nonnull macros
1 parent a196f1b commit 389f9b7

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

doc/check.texi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,17 @@ used for comparison is different for each function and is indicated by
12231223
the last two letters of the function name. The abbreviations @code{eq} and
12241224
@code{ne} correspond to @code{==} and @code{!=} respectively.
12251225

1226+
@item ck_assert_ptr_null
1227+
@itemx ck_assert_ptr_nonnull
1228+
1229+
Compares a pointers against null and displays predefined message with
1230+
condition and value of the input parameter on failure.
1231+
@code{ck_assert_ptr_null} checks that pointer is equal to NULL and
1232+
@code{ck_assert_ptr_nonnull} checks that pointer is not equal to NULL.
1233+
@code{ck_assert_ptr_nonnull} is highly recommended to use in situations
1234+
when a function call can return NULL as error indication (like functions
1235+
that use malloc, calloc, strdup, mmap, etc).
1236+
12261237
@item ck_assert_mem_eq
12271238
@itemx ck_assert_mem_ne
12281239
@itemx ck_assert_mem_lt

0 commit comments

Comments
 (0)