1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-25 09:21:36 +01:00

* Updated frame to not require separate pointer initialization

* Updated test runner to protect teardown (just in case someone tries to put ASSERTS in their teardown function)

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@13 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
mvandervoord
2009-01-26 15:16:38 +00:00
parent be1c104dc0
commit 12289c3f52
4 changed files with 24 additions and 17 deletions

View File

@@ -27,7 +27,6 @@ struct _Unity
unsigned char CurrentTestIgnored;
const char *TestFile;
float DefaultDelta;
jmp_buf* volatile pAbortFrame;
jmp_buf AbortFrame;
};
@@ -67,16 +66,15 @@ void UnityFail(const char *message, int line);
void UnityIgnore(const char *message, int line);
#define TEST_PROTECT() (setjmp(*Unity.pAbortFrame) == 0)
#define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
#define TEST_ABORT() {longjmp(*Unity.pAbortFrame, 1);}
#define TEST_ABORT() {longjmp(Unity.AbortFrame, 1);}
#define ABORT_IF_NECESSARY() \
if( Unity.CurrentTestFailed || Unity.CurrentTestIgnored ) {TEST_ABORT();}
#define RUN_TEST(func) \
Unity.CurrentTestName = #func; \
Unity.pAbortFrame = &Unity.AbortFrame; \
Unity.NumberOfTests ++; \
runTest(func); \
UnityConcludeTest();