Struct MutinyMockExpectedCall¶
Defined in File mock.h
Struct Documentation¶
-
struct MutinyMockExpectedCall¶
[source] Vtable for recording a call expectation from C code.
Obtained from MutinyMockSupport::expect_one_call() or similar. Chain the
with_*_parametersfunction pointers to constrain parameters, then calland_return_*_valueto configure the return value.Public Members
-
struct MutinyMockExpectedCall *(*with_bool_parameters)(const char *name, int value)¶
Constrain a bool parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_int_parameters)(const char *name, int value)¶
Constrain an int parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_unsigned_int_parameters)(const char *name, unsigned int value)¶
Constrain an unsigned int parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_long_int_parameters)(const char *name, long int value)¶
Constrain a long int parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_unsigned_long_int_parameters)(const char *name, unsigned long int value)¶
Constrain an unsigned long int parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_long_long_int_parameters)(const char *name, long long value)¶
Constrain a long long parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_unsigned_long_long_int_parameters)(const char *name, unsigned long long value)¶
Constrain an unsigned long long parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_double_parameters)(const char *name, double value)¶
Constrain a double parameter (exact).
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_double_parameters_and_tolerance)(const char *name, double value, double tolerance)¶
Constrain a double parameter with tolerance.
- Param name:
Name.
- Param value:
Value.
- Param tolerance:
Max difference.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_string_parameters)(const char *name, const char *value)¶
Constrain a string parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_pointer_parameters)(const char *name, void *value)¶
Constrain a void* parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_const_pointer_parameters)(const char *name, const void *value)¶
Constrain a const void* parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_function_pointer_parameters)(const char *name, void (*value)(void))¶
Constrain a function pointer parameter.
- Param name:
Name.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_memory_buffer_parameter)(const char *name, const unsigned char *value, size_t size)¶
Constrain a memory buffer parameter.
- Param name:
Name.
- Param value:
Buffer.
- Param size:
Size.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_parameter_of_type)(const char *type, const char *name, const void *value)¶
Constrain a custom-type object parameter.
- Param type:
Type name.
- Param name:
Name.
- Param value:
Object pointer.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_output_parameter_returning)(const char *name, const void *value, size_t size)¶
Configure an output parameter (plain
memcpy).- Param name:
Name.
- Param value:
Source data.
- Param size:
Bytes to copy.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_output_parameter_of_type_returning)(const char *type, const char *name, const void *value)¶
Configure a custom-type output parameter.
- Param type:
Type name.
- Param name:
Name.
- Param value:
Source object.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_unmodified_output_parameter)(const char *name)¶
Expect an output parameter to be passed but leave the buffer unchanged.
- Param name:
Name.
- Return:
this.
-
struct MutinyMockExpectedCall *(*ignore_other_parameters)(void)¶
Allow the actual call to pass extra unlisted parameters.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_bool_value)(int value)¶
Configure a bool return value.
- Param value:
Value to return.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_unsigned_int_value)(unsigned int value)¶
Configure an unsigned int return value.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_int_value)(int value)¶
Configure an int return value.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_long_int_value)(long int value)¶
Configure a long int return value.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_unsigned_long_int_value)(unsigned long int value)¶
Configure an unsigned long int return value.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_long_long_int_value)(long long value)¶
Configure a
long longreturn value.- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_unsigned_long_long_int_value)(unsigned long long value)¶
Configure an
unsigned long longreturn value.- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_double_value)(double value)¶
Configure a double return value.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_string_value)(const char *value)¶
Configure a string return value.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_pointer_value)(void *value)¶
Configure a
void*return value.- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_const_pointer_value)(const void *value)¶
Configure a
const void*return value.- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*and_return_function_pointer_value)(void (*value)(void))¶
Configure a function pointer return value.
- Param value:
Value.
- Return:
this.
-
struct MutinyMockExpectedCall *(*with_bool_parameters)(const char *name, int value)¶