From 4049959edce4c94c8f2af0b24c77f59f13609fe6 Mon Sep 17 00:00:00 2001 From: mkarlesky Date: Thu, 8 Jul 2010 17:42:15 +0000 Subject: [PATCH] removed unnecessary function overhead introduced in previous commit git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@83 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e --- src/unity.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/unity.c b/src/unity.c index e9a0f2f..508ff25 100644 --- a/src/unity.c +++ b/src/unity.c @@ -10,7 +10,8 @@ #define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; UNITY_OUTPUT_CHAR('\n'); longjmp(Unity.AbortFrame, 1); } #define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; UNITY_OUTPUT_CHAR('\n'); longjmp(Unity.AbortFrame, 1); } -#define UNITY_SKIP_EXECUTION { if (UnityCheckSkipConditions()) {return;} } +/// return prematurely if we are already in failure or ignore state +#define UNITY_SKIP_EXECUTION { if ((Unity.CurrentTestFailed != 0) || (Unity.CurrentTestIgnored != 0)) {return;} } struct _Unity Unity = { 0 }; @@ -266,16 +267,6 @@ void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual // Assertion & Control Helpers //----------------------------------------------- -int UnityCheckSkipConditions(void) -{ - // are we already in failure or ignore state? - if ((Unity.CurrentTestFailed != 0) || (Unity.CurrentTestIgnored != 0)) - return 1; - - return 0; -} - -//----------------------------------------------- int UnityCheckArraysForNull(const void* expected, const void* actual, const UNITY_LINE_TYPE lineNumber, const char* msg) { //return true if they are both NULL