mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-20 22:13:29 +08:00
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
This commit is contained in:
13
src/unity.c
13
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_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_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 };
|
struct _Unity Unity = { 0 };
|
||||||
|
|
||||||
@ -266,16 +267,6 @@ void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual
|
|||||||
// Assertion & Control Helpers
|
// 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)
|
int UnityCheckArraysForNull(const void* expected, const void* actual, const UNITY_LINE_TYPE lineNumber, const char* msg)
|
||||||
{
|
{
|
||||||
//return true if they are both NULL
|
//return true if they are both NULL
|
||||||
|
Reference in New Issue
Block a user