As a developer using CMocka, explain how to verify parameters passed to a mocked function. Identify the CMocka functions used in the test setup to define expected parameter values and the macro used within the mocked function to assert those values. Describe their roles and how they collaborate for parameter verification.
Navigate to the 'Modules' page. Go to the 'Checking Parameters' module to identify functions for setting expected parameter values. Return to the 'Modules' page. Go to the 'Mock Objects' module to identify the macro for asserting received parameters. Synthesize the information from both modules to explain the functions' roles and usage in parameter verification.
Identifies `expect_value()` and `expect_string()` (or similar `expect_*` functions like `expect_in_range()`, `expect_not_value()`) as used for setting expected parameters. Identifies `check_expected()` as the macro used within the mocked function for assertion. Explains that `expect_*` functions are called in the test setup (e.g., before the function under test is invoked) to define expectations. Explains that `check_expected()` is called inside the mocked function to perform the actual parameter assertion. Provides a concise explanation of how these functions work together (e.g., `expect_*` pushes values onto a stack, `check_expected()` pops and compares) to verify parameters passed to a mocked function in CMocka.