mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-10-18 12:53:23 +08:00
- Cleaned up UnitPointer_Set (thanks Eric)
- Cleaned up a casting warning error - Removed a couple semicolons from the end of macros SHAME!
This commit is contained in:
@ -117,7 +117,7 @@ void UnityTestRunner(unityfunction* setup,
|
||||
|
||||
void UnityIgnoreTest(const char * printableName, const char * group, const char * name)
|
||||
{
|
||||
if (testSelected(name) && groupSelected(group))
|
||||
if (testSelected(name) && groupSelected(group))
|
||||
{
|
||||
Unity.NumberOfTests++;
|
||||
Unity.CurrentTestIgnored = 1;
|
||||
@ -291,7 +291,7 @@ typedef struct _PointerPair
|
||||
} PointerPair;
|
||||
|
||||
enum {MAX_POINTERS=50};
|
||||
static PointerPair pointer_store[MAX_POINTERS];
|
||||
static PointerPair pointer_store[MAX_POINTERS+1];
|
||||
static int pointer_index = 0;
|
||||
|
||||
void UnityPointer_Init(void)
|
||||
@ -302,12 +302,16 @@ void UnityPointer_Init(void)
|
||||
void UnityPointer_Set(void ** pointer, void * newValue)
|
||||
{
|
||||
if (pointer_index >= MAX_POINTERS)
|
||||
{
|
||||
TEST_FAIL_MESSAGE("Too many pointers set");
|
||||
|
||||
pointer_store[pointer_index].pointer = pointer;
|
||||
pointer_store[pointer_index].old_value = *pointer;
|
||||
*pointer = newValue;
|
||||
pointer_index++;
|
||||
}
|
||||
else
|
||||
{
|
||||
pointer_store[pointer_index].pointer = pointer;
|
||||
pointer_store[pointer_index].old_value = *pointer;
|
||||
*pointer = newValue;
|
||||
pointer_index++;
|
||||
}
|
||||
}
|
||||
|
||||
void UnityPointer_UndoAllSets(void)
|
||||
|
Reference in New Issue
Block a user