From: Dotsenko Andrey Date: Tue, 13 Dec 2016 04:44:36 +0000 (+0300) Subject: Add documentation for ck_assert_ptr_null and ck_assert_ptr_nonnull macros X-Git-Tag: 0.11.0~4^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e495e452fccd6d9ea6427ad18784b3c5031f08fd;p=check Add documentation for ck_assert_ptr_null and ck_assert_ptr_nonnull macros --- diff --git a/doc/check.texi b/doc/check.texi index 3af9ada..9d0fa22 100644 --- a/doc/check.texi +++ b/doc/check.texi @@ -1223,6 +1223,17 @@ used for comparison is different for each function and is indicated by the last two letters of the function name. The abbreviations @code{eq} and @code{ne} correspond to @code{==} and @code{!=} respectively. +@item ck_assert_ptr_null +@itemx ck_assert_ptr_nonnull + +Compares a pointers against null and displays predefined message with +condition and value of the input parameter on failure. +@code{ck_assert_ptr_null} checks that pointer is equal to NULL and +@code{ck_assert_ptr_nonnull} checks that pointer is not equal to NULL. +@code{ck_assert_ptr_nonnull} is highly recommended to use in situations +when a function call can return NULL as error indication (like functions +that use malloc, calloc, strdup, mmap, etc). + @item ck_assert_mem_eq @itemx ck_assert_mem_ne @itemx ck_assert_mem_lt