mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-25 18:57:58 +08:00
Consistent use of * in types in the Fixture, whitespace only
This commit is contained in:
@ -48,7 +48,7 @@ int UnityMain(int argc, const char* argv[], void (*runAllTests)(void))
|
|||||||
return UnityFailureCount();
|
return UnityFailureCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int selected(const char * filter, const char * name)
|
static int selected(const char* filter, const char* name)
|
||||||
{
|
{
|
||||||
if (filter == 0)
|
if (filter == 0)
|
||||||
return 1;
|
return 1;
|
||||||
@ -66,12 +66,12 @@ static int groupSelected(const char* group)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UnityTestRunner(unityfunction* setup,
|
void UnityTestRunner(unityfunction* setup,
|
||||||
unityfunction* testBody,
|
unityfunction* testBody,
|
||||||
unityfunction* teardown,
|
unityfunction* teardown,
|
||||||
const char * printableName,
|
const char* printableName,
|
||||||
const char * group,
|
const char* group,
|
||||||
const char * name,
|
const char* name,
|
||||||
const char * file, int line)
|
const char* file, int line)
|
||||||
{
|
{
|
||||||
if (testSelected(name) && groupSelected(group))
|
if (testSelected(name) && groupSelected(group))
|
||||||
{
|
{
|
||||||
@ -107,7 +107,7 @@ void UnityTestRunner(unityfunction* setup,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnityIgnoreTest(const char * printableName, const char * group, const char * name)
|
void UnityIgnoreTest(const char* printableName, const char* group, const char* name)
|
||||||
{
|
{
|
||||||
if (testSelected(name) && groupSelected(group))
|
if (testSelected(name) && groupSelected(group))
|
||||||
{
|
{
|
||||||
@ -176,7 +176,7 @@ typedef struct GuardBytes
|
|||||||
|
|
||||||
static const char end[] = "END";
|
static const char end[] = "END";
|
||||||
|
|
||||||
void * unity_malloc(size_t size)
|
void* unity_malloc(size_t size)
|
||||||
{
|
{
|
||||||
char* mem;
|
char* mem;
|
||||||
Guard* guard;
|
Guard* guard;
|
||||||
@ -198,7 +198,7 @@ void * unity_malloc(size_t size)
|
|||||||
return (void*)mem;
|
return (void*)mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int isOverrun(void * mem)
|
static int isOverrun(void* mem)
|
||||||
{
|
{
|
||||||
Guard* guard = (Guard*)mem;
|
Guard* guard = (Guard*)mem;
|
||||||
char* memAsChar = (char*)mem;
|
char* memAsChar = (char*)mem;
|
||||||
@ -207,7 +207,7 @@ static int isOverrun(void * mem)
|
|||||||
return strcmp(&memAsChar[guard->size], end) != 0;
|
return strcmp(&memAsChar[guard->size], end) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void release_memory(void * mem)
|
static void release_memory(void* mem)
|
||||||
{
|
{
|
||||||
Guard* guard = (Guard*)mem;
|
Guard* guard = (Guard*)mem;
|
||||||
guard--;
|
guard--;
|
||||||
@ -216,7 +216,7 @@ static void release_memory(void * mem)
|
|||||||
UNITY_FIXTURE_FREE(guard);
|
UNITY_FIXTURE_FREE(guard);
|
||||||
}
|
}
|
||||||
|
|
||||||
void unity_free(void * mem)
|
void unity_free(void* mem)
|
||||||
{
|
{
|
||||||
int overrun;
|
int overrun;
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ void* unity_calloc(size_t num, size_t size)
|
|||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* unity_realloc(void * oldMem, size_t size)
|
void* unity_realloc(void* oldMem, size_t size)
|
||||||
{
|
{
|
||||||
Guard* guard = (Guard*)oldMem;
|
Guard* guard = (Guard*)oldMem;
|
||||||
// char* memAsChar = (char*)oldMem;
|
// char* memAsChar = (char*)oldMem;
|
||||||
@ -276,9 +276,9 @@ void* unity_realloc(void * oldMem, size_t size)
|
|||||||
//Automatic pointer restoration functions
|
//Automatic pointer restoration functions
|
||||||
typedef struct _PointerPair
|
typedef struct _PointerPair
|
||||||
{
|
{
|
||||||
struct _PointerPair * next;
|
struct _PointerPair* next;
|
||||||
void ** pointer;
|
void** pointer;
|
||||||
void * old_value;
|
void* old_value;
|
||||||
} PointerPair;
|
} PointerPair;
|
||||||
|
|
||||||
enum {MAX_POINTERS=50};
|
enum {MAX_POINTERS=50};
|
||||||
|
@ -17,15 +17,15 @@ typedef struct _UNITY_FIXTURE_T
|
|||||||
} UNITY_FIXTURE_T;
|
} UNITY_FIXTURE_T;
|
||||||
|
|
||||||
typedef void unityfunction(void);
|
typedef void unityfunction(void);
|
||||||
void UnityTestRunner(unityfunction * setup,
|
void UnityTestRunner(unityfunction* setup,
|
||||||
unityfunction * body,
|
unityfunction* body,
|
||||||
unityfunction * teardown,
|
unityfunction* teardown,
|
||||||
const char * printableName,
|
const char* printableName,
|
||||||
const char * group,
|
const char* group,
|
||||||
const char * name,
|
const char* name,
|
||||||
const char * file, int line);
|
const char* file, int line);
|
||||||
|
|
||||||
void UnityIgnoreTest(const char * printableName, const char * group, const char * name);
|
void UnityIgnoreTest(const char* printableName, const char* group, const char* name);
|
||||||
void UnityMalloc_StartTest(void);
|
void UnityMalloc_StartTest(void);
|
||||||
void UnityMalloc_EndTest(void);
|
void UnityMalloc_EndTest(void);
|
||||||
UNITY_COUNTER_TYPE UnityFailureCount(void);
|
UNITY_COUNTER_TYPE UnityFailureCount(void);
|
||||||
@ -34,7 +34,7 @@ UNITY_COUNTER_TYPE UnityTestsCount(void);
|
|||||||
int UnityGetCommandLineOptions(int argc, const char* argv[]);
|
int UnityGetCommandLineOptions(int argc, const char* argv[]);
|
||||||
void UnityConcludeFixtureTest(void);
|
void UnityConcludeFixtureTest(void);
|
||||||
|
|
||||||
void UnityPointer_Set(void ** ptr, void * newValue);
|
void UnityPointer_Set(void** ptr, void* newValue);
|
||||||
void UnityPointer_UndoAllSets(void);
|
void UnityPointer_UndoAllSets(void);
|
||||||
void UnityPointer_Init(void);
|
void UnityPointer_Init(void);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user