From 5fc2b092d3346eef4bfc6215639d6890f094f49a Mon Sep 17 00:00:00 2001 From: jsalling Date: Mon, 23 Nov 2015 14:21:43 -0600 Subject: [PATCH] Move UNITY_PRINT_EOL to internals to allow access to it. Unity fixture needs access to this macro to be consistent. Add #ifndef wrapper for easier redefinition on systems that use "\r\n". --- src/unity.c | 1 - src/unity_internals.h | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/unity.c b/src/unity.c index 341fa0e..5e4018a 100644 --- a/src/unity.c +++ b/src/unity.c @@ -11,7 +11,6 @@ #define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); } /// return prematurely if we are already in failure or ignore state #define UNITY_SKIP_EXECUTION { if ((Unity.CurrentTestFailed != 0) || (Unity.CurrentTestIgnored != 0)) {return;} } -#define UNITY_PRINT_EOL { UNITY_OUTPUT_CHAR('\n'); } struct _Unity Unity; diff --git a/src/unity_internals.h b/src/unity_internals.h index ad815f3..95e1a74 100644 --- a/src/unity_internals.h +++ b/src/unity_internals.h @@ -291,6 +291,10 @@ typedef UNITY_DOUBLE_TYPE _UD; extern int UNITY_OUTPUT_CHAR(int); #endif +#ifndef UNITY_PRINT_EOL +#define UNITY_PRINT_EOL { UNITY_OUTPUT_CHAR('\n'); } +#endif + #ifndef UNITY_OUTPUT_START #define UNITY_OUTPUT_START() #endif