mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-27 10:14:28 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user