-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Variadic macro extensions to the FFF
See header comment in fff.h for details -- summary extracted below: Return value macros: SET_RETURN_VAL_SEQ(function_name, ...) Accepts a raw list of appropriately typed values SET_RETURN_VAL(function_name, value) Provided for API consistency Assertion macros: TEST_ASSERT_CALLS(function_name, expected_call_count) TEST_ASSERT_CALLED(function_name) Only one call made to the function. TEST_ASSERT_NOT_CALLED(function_name) No calls made to the function. TEST_ASSERT_CALL(function_name, ...parameters) Only one call made to the function with the specified parameter values. TEST_ASSERT_LAST_CALL(function_name, ...parameters) The final call to this function was made with the specified parameter values. TEST_ASSERT_ANY_CALL(function_name, ...parameters) At least one call was made with the specified parameter values. TEST_ASSERT_NO_CALL(function_name, ...parameters) No calls were made with the specified parameter values. TEST_ASSERT_NTH_CALL(function_name, call_index, ...parameters) A specified invocation of the function used the specified parameter values. <<Amendment 1>> Added unit tests. Added TEST_ASSERT_CALL(...), as couldn't get optional parameter verification for TEST_ASSERT_CALLED to work in c99 mode. <<Amendment 2>> Updated generator. Function name changes for consistency. Initial documentation updates. <<Amendment 3>> FFF_RETURN: Made array declaration static to allow use in a fixture setup method <<Amendment 4>> FFF_RETURN Reverted static array declaration as it prevented some types of initialisation. Reformulated macro to use dedicated struct member for single values while still allowing macro invocation to be prefixed with `static` keyboard when used outside the test body.
- Loading branch information
Cormac Cannon
committed
Apr 12, 2018
1 parent
ef24c19
commit d6d06fd
Showing
6 changed files
with
1,230 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.