diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2023-01-29 15:15:33 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2023-02-01 08:38:44 +0100 |
commit | a6b7cbca1cbc1d6d96efa8c9fc8f560ee0a135d1 (patch) | |
tree | 32238d6bc13dfd44c81d210695a6582c94d08947 | |
parent | 5e3411c7b97f5a706f7358c168df14814cae42dc (diff) | |
download | cmocka-a6b7cbca1cbc1d6d96efa8c9fc8f560ee0a135d1.zip cmocka-a6b7cbca1cbc1d6d96efa8c9fc8f560ee0a135d1.tar.gz cmocka-a6b7cbca1cbc1d6d96efa8c9fc8f560ee0a135d1.tar.bz2 |
include: Improve expect_check() documentation
-rw-r--r-- | include/cmocka.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/include/cmocka.h b/include/cmocka.h index 8fd945d..250ff4e 100644 --- a/include/cmocka.h +++ b/include/cmocka.h @@ -732,12 +732,7 @@ void will_return_ptr_maybe(#function, void *value); * @{ */ -/* - * Add a custom parameter checking function. If the event parameter is NULL - * the event structure is allocated internally by this function. If event - * parameter is provided it must be allocated on the heap and doesn't need to - * be deallocated by the caller. - */ + #ifdef DOXYGEN /** * @brief Add a custom parameter checking function. @@ -755,19 +750,17 @@ void will_return_ptr_maybe(#function, void *value); * * @param[in] check_data The data to pass to the check function. */ -void expect_check(#function, #parameter, #check_function, CMockaValueData check_data); +void expect_check(function, + parameter, + CheckParameterValue check_function, + CMockaValueData check_data); #else #define expect_check(function, parameter, check_function, check_data) \ _expect_check(#function, #parameter, __FILE__, __LINE__, check_function, \ check_data, NULL, 1) #endif -/* - * Add a custom parameter checking function. If the event parameter is NULL - * the event structure is allocated internally by this function. If event - * parameter is provided it must be allocated on the heap and doesn't need to - * be deallocated by the caller. - */ + #ifdef DOXYGEN /** * @brief Add a custom parameter checking function. @@ -793,7 +786,11 @@ void expect_check(#function, #parameter, #check_function, CMockaValueData check_ * calls to check_expected() is accepted, including zero. * */ -void expect_check_count(#function, #parameter, #check_function, CMockaValueData check_data, size_t count); +void expect_check_count(function, + parameter, + CheckParameterValue check_function, + CMockaValueData check_data, + size_t count); #else #define expect_check_count(function, parameter, check_function, check_data, count) \ _expect_check(#function, #parameter, __FILE__, __LINE__, check_function, \ |