diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2012-10-17 17:27:37 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-10-19 18:12:51 +0200 |
commit | 596df411bc543c53fe90d6b53154ea4a872bb6a5 (patch) | |
tree | 1eca85cb0f84f5917a474a000d5f067dfae234cf | |
parent | a0843a077fb7844e769c2dd6a3154a67de0b598a (diff) | |
download | cmocka-596df411bc543c53fe90d6b53154ea4a872bb6a5.tar.gz cmocka-596df411bc543c53fe90d6b53154ea4a872bb6a5.tar.bz2 cmocka-596df411bc543c53fe90d6b53154ea4a872bb6a5.zip |
include: Document assert_non_null().
-rwxr-xr-x | include/cmocka.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/cmocka.h b/include/cmocka.h index efb472f..c3b50f7 100755 --- a/include/cmocka.h +++ b/include/cmocka.h @@ -366,9 +366,23 @@ void assert_false(scalar expression); __FILE__, __LINE__) #endif -/* Assert that the given pointer is non-NULL. */ +#ifdef DOXYGEN +/** + * @brief Assert that the given pointer is non-NULL. + * + * The function prints an error message to standard error and terminates the + * test by calling fail() if the pointer is non-NULL. + * + * @param[in] pointer The pointer to evaluate. + * + * @see assert_null() + */ +void assert_non_null(void *pointer); +#else #define assert_non_null(c) _assert_true(cast_ptr_to_largest_integral_type(c), #c, \ -__FILE__, __LINE__) + __FILE__, __LINE__) +#endif + /* Assert that the given pointer is NULL. */ #define assert_null(c) _assert_true(!(cast_ptr_to_largest_integral_type(c)), #c, \ __FILE__, __LINE__) |