doc: Document assert_null().
authorAndreas Schneider <asn@cryptomilk.org>
Mon, 5 Nov 2012 17:37:03 +0000 (18:37 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 5 Nov 2012 17:37:03 +0000 (18:37 +0100)
include/cmocka.h

index 8234e7015807c5e9f35155b6a2c713b767e254c4..1b6144fe49ac3e5c40c47d0a960e989336c3823f 100755 (executable)
@@ -392,9 +392,22 @@ void assert_non_null(void *pointer);
                                         __FILE__, __LINE__)
 #endif
 
-/* Assert that the given pointer is NULL. */
+#ifdef DOXYGEN
+/**
+ * @brief Assert that the given pointer is 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_non_null()
+ */
+void assert_null(void *pointer);
+#else
 #define assert_null(c) _assert_true(!(cast_ptr_to_largest_integral_type(c)), #c, \
 __FILE__, __LINE__)
+#endif
 
 /* Assert that the two given integers are equal, otherwise fail. */
 #define assert_int_equal(a, b) \