Changed the compiler switch behaviour for printf (default: disabled).

Macro UNITY_EXCLUDE_PRINT_FORMATTED changed to UNITY_INCLUDE_PRINT_FORMATTED.
Enable printf via "-DUNITY_INCLUDE_PRINT_FORMATTED" compiler option.
This commit is contained in:
Fabian Zahn
2019-01-24 18:42:51 +01:00
parent 5918ee0cdf
commit 95ccc6edc1
2 changed files with 6 additions and 6 deletions

View File

@ -141,7 +141,7 @@ void UnityPrint(const char* string)
} }
/*-----------------------------------------------*/ /*-----------------------------------------------*/
#ifndef UNITY_EXCLUDE_PRINT_FORMATTED #ifdef UNITY_INCLUDE_PRINT_FORMATTED
void UnityPrintFormatted(const char* format, ...) void UnityPrintFormatted(const char* format, ...)
{ {
const char* pch = format; const char* pch = format;
@ -251,7 +251,7 @@ void UnityPrintFormatted(const char* format, ... )
va_end(va); va_end(va);
} }
#endif /* ! UNITY_EXCLUDE_PRINT_FORMATTED */ #endif /* ! UNITY_INCLUDE_PRINT_FORMATTED */
/*-----------------------------------------------*/ /*-----------------------------------------------*/
void UnityPrintLen(const char* string, const UNITY_UINT32 length) void UnityPrintLen(const char* string, const UNITY_UINT32 length)

View File

@ -23,7 +23,7 @@
#include <stddef.h> #include <stddef.h>
#endif #endif
#ifndef UNITY_EXCLUDE_PRINT_FORMATTED #ifdef UNITY_INCLUDE_PRINT_FORMATTED
#include <stdarg.h> #include <stdarg.h>
#endif #endif
@ -496,7 +496,7 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
void UnityPrint(const char* string); void UnityPrint(const char* string);
#ifndef UNITY_EXCLUDE_PRINT_FORMATTED #ifdef UNITY_INCLUDE_PRINT_FORMATTED
void UnityPrintFormatted(const char* format, ...); void UnityPrintFormatted(const char* format, ...);
#endif #endif