From 95ccc6edc11814052552c4d306d3e3adb10ece89 Mon Sep 17 00:00:00 2001 From: Fabian Zahn Date: Thu, 24 Jan 2019 18:42:51 +0100 Subject: [PATCH] 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. --- src/unity.c | 6 +++--- src/unity_internals.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/unity.c b/src/unity.c index fa1847b..9874108 100644 --- a/src/unity.c +++ b/src/unity.c @@ -141,8 +141,8 @@ void UnityPrint(const char* string) } /*-----------------------------------------------*/ -#ifndef UNITY_EXCLUDE_PRINT_FORMATTED -void UnityPrintFormatted(const char* format, ... ) +#ifdef UNITY_INCLUDE_PRINT_FORMATTED +void UnityPrintFormatted(const char* format, ...) { const char* pch = format; va_list va; @@ -251,7 +251,7 @@ void UnityPrintFormatted(const char* format, ... ) va_end(va); } -#endif /* ! UNITY_EXCLUDE_PRINT_FORMATTED */ +#endif /* ! UNITY_INCLUDE_PRINT_FORMATTED */ /*-----------------------------------------------*/ void UnityPrintLen(const char* string, const UNITY_UINT32 length) diff --git a/src/unity_internals.h b/src/unity_internals.h index 2a30682..e91d9bc 100644 --- a/src/unity_internals.h +++ b/src/unity_internals.h @@ -23,7 +23,7 @@ #include #endif -#ifndef UNITY_EXCLUDE_PRINT_FORMATTED +#ifdef UNITY_INCLUDE_PRINT_FORMATTED #include #endif @@ -496,8 +496,8 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int void UnityPrint(const char* string); -#ifndef UNITY_EXCLUDE_PRINT_FORMATTED -void UnityPrintFormatted(const char* format, ... ); +#ifdef UNITY_INCLUDE_PRINT_FORMATTED +void UnityPrintFormatted(const char* format, ...); #endif void UnityPrintLen(const char* string, const UNITY_UINT32 length);