include: Document assert_non_null().
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 17 Oct 2012 15:27:37 +0000 (17:27 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 19 Oct 2012 16:12:51 +0000 (18:12 +0200)
include/cmocka.h

index efb472fc069603350864a59d63734d0308343b17..c3b50f776cfb8f54a71a8c7b92779751432f7666 100755 (executable)
@@ -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__)