提交 95ccc6ed 编写于 作者: F Fabian Zahn

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.
上级 5918ee0c
...@@ -141,8 +141,8 @@ void UnityPrint(const char* string) ...@@ -141,8 +141,8 @@ 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;
va_list va; va_list va;
...@@ -251,7 +251,7 @@ void UnityPrintFormatted(const char* 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)
......
...@@ -23,7 +23,7 @@ ...@@ -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,8 +496,8 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int ...@@ -496,8 +496,8 @@ 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
void UnityPrintLen(const char* string, const UNITY_UINT32 length); void UnityPrintLen(const char* string, const UNITY_UINT32 length);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册