| 1 | #include <cgreen/cgreen.h> |
| 2 | #include <cgreen/mocks.h> |
| 3 | |
| 4 | void convert_to_uppercase(char *converted_string, const char *original_string) { |
| 5 | mock(converted_string, original_string); |
| 6 | } |
| 7 | |
| 8 | Ensure(setting_content_of_out_parameter) { |
| 9 | expect(convert_to_uppercase, |
| 10 | when(original_string, is_equal_to_string("upper case")), |
| 11 | will_set_contents_of_output_parameter(converted_string, |
| 12 | "UPPER CASE", 11)); |
| 13 | |
| 14 | } |