Lines Matching refs:parameter

184  * Now the mock object can check if the parameter it received is the parameter
307 * @param[in] count The parameter returns the number of times the value should
352 * the expect_*() functions provided. A mock function parameter can then be
355 * Successive calls to expect_*() macros for a parameter queues values to check
356 * the specified parameter. check_expected() checks a function parameter
357 * against the next value queued using expect_*(), if the parameter check fails
359 * no more parameter values are queued a test failure occurs.
371 * Now the chef_cook function can check if the parameter we got passed is the
372 * parameter which is expected by the test driver. This can be done the
389 * Add a custom parameter checking function. If the event parameter is NULL
391 * parameter is provided it must be allocated on the heap and doesn't need to
396 * @brief Add a custom parameter checking function.
398 * If the event parameter is NULL the event structure is allocated internally
399 * by this function. If the parameter is provided it must be allocated on the
402 * @param[in] #function The function to add a custom parameter checking
405 * @param[in] #parameter The parameters passed to the function.
411 void expect_check(#function, #parameter, #check_function, const void *check_data);
413 #define expect_check(function, parameter, check_function, check_data) \
414 _expect_check(#function, #parameter, __FILE__, __LINE__, check_function, \
420 * @brief Add an event to check if the parameter value is part of the provided
427 * @param[in] #parameter The name of the parameter passed to the function.
433 void expect_in_set(#function, #parameter, LargestIntegralType value_array[]);
435 #define expect_in_set(function, parameter, value_array) \
436 expect_in_set_count(function, parameter, value_array, 1)
441 * @brief Add an event to check if the parameter value is part of the provided
448 * @param[in] #parameter The name of the parameter passed to the function.
452 * @param[in] count The count parameter returns the number of times the value
458 void expect_in_set_count(#function, #parameter, LargestIntegralType value_array[], size_t count);
460 #define expect_in_set_count(function, parameter, value_array, count) \
461 _expect_in_set(#function, #parameter, __FILE__, __LINE__, value_array, \
467 * @brief Add an event to check if the parameter value is not part of the
474 * @param[in] #parameter The name of the parameter passed to the function.
480 void expect_not_in_set(#function, #parameter, LargestIntegralType value_array[]);
482 #define expect_not_in_set(function, parameter, value_array) \
483 expect_not_in_set_count(function, parameter, value_array, 1)
488 * @brief Add an event to check if the parameter value is not part of the
495 * @param[in] #parameter The name of the parameter passed to the function.
499 * @param[in] count The count parameter returns the number of times the value
505 void expect_not_in_set_count(#function, #parameter, LargestIntegralType value_array[], size_t count);
507 #define expect_not_in_set_count(function, parameter, value_array, count) \
509 #function, #parameter, __FILE__, __LINE__, value_array, \
516 * @brief Add an event to check a parameter is inside a numerical range.
523 * @param[in] #parameter The name of the parameter passed to the function.
531 void expect_in_range(#function, #parameter, LargestIntegralType minimum, LargestIntegralType maximum);
533 #define expect_in_range(function, parameter, minimum, maximum) \
534 expect_in_range_count(function, parameter, minimum, maximum, 1)
539 * @brief Add an event to repeatedly check a parameter is inside a
546 * @param[in] #parameter The name of the parameter passed to the function.
552 * @param[in] count The count parameter returns the number of times the value
558 void expect_in_range_count(#function, #parameter, LargestIntegralType minimum, LargestIntegralType maximum, size_t count);
560 #define expect_in_range_count(function, parameter, minimum, maximum, count) \
561 _expect_in_range(#function, #parameter, __FILE__, __LINE__, minimum, \
567 * @brief Add an event to check a parameter is outside a numerical range.
574 * @param[in] #parameter The name of the parameter passed to the function.
582 void expect_not_in_range(#function, #parameter, LargestIntegralType minimum, LargestIntegralType maximum);
584 #define expect_not_in_range(function, parameter, minimum, maximum) \
585 expect_not_in_range_count(function, parameter, minimum, maximum, 1)
590 * @brief Add an event to repeatedly check a parameter is outside a
597 * @param[in] #parameter The name of the parameter passed to the function.
603 * @param[in] count The count parameter returns the number of times the value
609 void expect_not_in_range_count(#function, #parameter, LargestIntegralType minimum, LargestIntegralType maximum, size_t count);
611 #define expect_not_in_range_count(function, parameter, minimum, maximum, \
613 _expect_not_in_range(#function, #parameter, __FILE__, __LINE__, \
619 * @brief Add an event to check if a parameter is the given value.
625 * @param[in] #parameter The name of the parameter passed to the function.
631 void expect_value(#function, #parameter, LargestIntegralType value);
633 #define expect_value(function, parameter, value) \
634 expect_value_count(function, parameter, value, 1)
639 * @brief Add an event to repeatedly check if a parameter is the given value.
645 * @param[in] #parameter The name of the parameter passed to the function.
649 * @param[in] count The count parameter returns the number of times the value
655 void expect_value_count(#function, #parameter, LargestIntegralType value, size_t count);
657 #define expect_value_count(function, parameter, value, count) \
658 _expect_value(#function, #parameter, __FILE__, __LINE__, \
664 * @brief Add an event to check if a parameter isn't the given value.
670 * @param[in] #parameter The name of the parameter passed to the function.
676 void expect_not_value(#function, #parameter, LargestIntegralType value);
678 #define expect_not_value(function, parameter, value) \
679 expect_not_value_count(function, parameter, value, 1)
684 * @brief Add an event to repeatedly check if a parameter isn't the given value.
690 * @param[in] #parameter The name of the parameter passed to the function.
694 * @param[in] count The count parameter returns the number of times the value
700 void expect_not_value_count(#function, #parameter, LargestIntegralType value, size_t count);
702 #define expect_not_value_count(function, parameter, value, count) \
703 _expect_not_value(#function, #parameter, __FILE__, __LINE__, \
709 * @brief Add an event to check if the parameter value is equal to the
716 * @param[in] #parameter The name of the parameter passed to the function.
722 void expect_string(#function, #parameter, const char *string);
724 #define expect_string(function, parameter, string) \
725 expect_string_count(function, parameter, string, 1)
730 * @brief Add an event to check if the parameter value is equal to the
737 * @param[in] #parameter The name of the parameter passed to the function.
741 * @param[in] count The count parameter returns the number of times the value
747 void expect_string_count(#function, #parameter, const char *string, size_t count);
749 #define expect_string_count(function, parameter, string, count) \
750 _expect_string(#function, #parameter, __FILE__, __LINE__, \
756 * @brief Add an event to check if the parameter value isn't equal to the
763 * @param[in] #parameter The name of the parameter passed to the function.
769 void expect_not_string(#function, #parameter, const char *string);
771 #define expect_not_string(function, parameter, string) \
772 expect_not_string_count(function, parameter, string, 1)
777 * @brief Add an event to check if the parameter value isn't equal to the
784 * @param[in] #parameter The name of the parameter passed to the function.
788 * @param[in] count The count parameter returns the number of times the value
794 void expect_not_string_count(#function, #parameter, const char *string, size_t count);
796 #define expect_not_string_count(function, parameter, string, count) \
797 _expect_not_string(#function, #parameter, __FILE__, __LINE__, \
803 * @brief Add an event to check if the parameter does match an area of memory.
809 * @param[in] #parameter The name of the parameter passed to the function.
817 void expect_memory(#function, #parameter, void *memory, size_t size);
819 #define expect_memory(function, parameter, memory, size) \
820 expect_memory_count(function, parameter, memory, size, 1)
825 * @brief Add an event to repeatedly check if the parameter does match an area
832 * @param[in] #parameter The name of the parameter passed to the function.
838 * @param[in] count The count parameter returns the number of times the value
844 void expect_memory_count(#function, #parameter, void *memory, size_t size, size_t count);
846 #define expect_memory_count(function, parameter, memory, size, count) \
847 _expect_memory(#function, #parameter, __FILE__, __LINE__, \
853 * @brief Add an event to check if the parameter doesn't match an area of
860 * @param[in] #parameter The name of the parameter passed to the function.
868 void expect_not_memory(#function, #parameter, void *memory, size_t size);
870 #define expect_not_memory(function, parameter, memory, size) \
871 expect_not_memory_count(function, parameter, memory, size, 1)
876 * @brief Add an event to repeatedly check if the parameter doesn't match an
883 * @param[in] #parameter The name of the parameter passed to the function.
889 * @param[in] count The count parameter returns the number of times the value
895 void expect_not_memory_count(#function, #parameter, void *memory, size_t size, size_t count);
897 #define expect_not_memory_count(function, parameter, memory, size, count) \
898 _expect_not_memory(#function, #parameter, __FILE__, __LINE__, \
905 * @brief Add an event to check if a parameter (of any value) has been passed.
911 * @param[in] #parameter The name of the parameter passed to the function.
915 void expect_any(#function, #parameter);
917 #define expect_any(function, parameter) \
918 expect_any_count(function, parameter, 1)
923 * @brief Add an event to repeatedly check if a parameter (of any value) has
930 * @param[in] #parameter The name of the parameter passed to the function.
932 * @param[in] count The count parameter returns the number of times the value
938 void expect_any_count(#function, #parameter, size_t count);
940 #define expect_any_count(function, parameter, count) \
941 _expect_any(#function, #parameter, __FILE__, __LINE__, count)
946 * @brief Determine whether a function parameter is correct.
953 * @param[in] #parameter The parameter to check.
955 void check_expected(#parameter);
957 #define check_expected(parameter) \
958 _check_expected(__func__, #parameter, __FILE__, __LINE__, \
959 cast_to_largest_integral_type(parameter))
964 * @brief Determine whether a function parameter is correct.
971 * @param[in] #parameter The pointer to check.
973 void check_expected_ptr(#parameter);
975 #define check_expected_ptr(parameter) \
976 _check_expected(__func__, #parameter, __FILE__, __LINE__, \
977 cast_ptr_to_largest_integral_type(parameter))
1855 /* Function that determines whether a function parameter value is correct. */
1905 /* Event that's called to check a parameter value. */
1923 const char* const function, const char* const parameter,
1930 const char* const function, const char* const parameter,
1934 const char* const function, const char* const parameter,
1939 const char* const function, const char* const parameter,
1944 const char* const function, const char* const parameter,
1950 const char* const function, const char* const parameter,
1954 const char* const function, const char* const parameter,
1959 const char* const function, const char* const parameter,
1963 const char* const function, const char* const parameter,
1968 const char* const function, const char* const parameter,
1972 const char* const function, const char* const parameter,
1977 const char* const function, const char* const parameter,