Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* A mock fprintf function that checks the value of strings printed to the
- * standard error stream. */
- int example_test_fprintf(FILE* const file, const char *format, ...) {
- int return_value;
- va_list args;
- assert_true(file == stderr);
- va_start(args, format);
- return_value = vsnprintf(temporary_buffer, sizeof(temporary_buffer), format, args);
- check_expected_ptr(temporary_buffer);
- va_end(args);
- return return_value;
- }
- /* A mock printf function that checks the value of strings printed to the
- * standard output stream. */
- int example_test_printf(const char *format, ...) {
- int return_value;
- va_list args;
- va_start(args, format);
- return_value = vsnprintf(temporary_buffer, sizeof(temporary_buffer), format, args);
- check_expected_ptr(temporary_buffer);
- va_end(args);
- return return_value;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement