update UNITY_OUTPUT_CHAR to not return a value (because we never check it anyway).

add UNITY_OUTPUT_FLUSH to make sure we get the output we need on aborted tests and whatnot.
This commit is contained in:
Mark VanderVoord
2016-05-06 10:47:39 -04:00
parent 7053ef7523
commit c5c392b18a
4 changed files with 26 additions and 7 deletions

View File

@ -290,11 +290,22 @@ typedef UNITY_DOUBLE_TYPE _UD;
#ifndef UNITY_OUTPUT_CHAR
//Default to using putchar, which is defined in stdio.h
#include <stdio.h>
#define UNITY_OUTPUT_CHAR(a) putchar(a)
#define UNITY_OUTPUT_CHAR(a) (void)putchar(a)
#else
//If defined as something else, make sure we declare it here so it's ready for use
//If defined as something else, make sure we declare it here so it's ready for use
#ifndef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
extern int UNITY_OUTPUT_CHAR(int);
extern void UNITY_OUTPUT_CHAR(int);
#endif
#endif
#ifndef UNITY_OUTPUT_FLUSH
//Default to using putchar, which is defined in stdio.h
#include <stdio.h>
#define UNITY_OUTPUT_FLUSH() (void)fflush(stdout)
#else
//If defined as something else, make sure we declare it here so it's ready for use
#ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
extern void UNITY_OUTPUT_FLUSH(void);
#endif
#endif