mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-24 17:09:28 +08:00
Merge pull request #255 from jsalling/cleanup/function-prototypes
Removing unnecessary function prototypes, inline PrintOk/Fail
This commit is contained in:
25
src/unity.c
25
src/unity.c
@ -93,7 +93,6 @@ void UnityPrint(const char* string)
|
||||
}
|
||||
}
|
||||
|
||||
void UnityPrintLen(const char* string, const UNITY_UINT32 length);
|
||||
void UnityPrintLen(const char* string, const UNITY_UINT32 length)
|
||||
{
|
||||
const char* pch = string;
|
||||
@ -326,21 +325,6 @@ void UnityPrintFloat(UNITY_DOUBLE number)
|
||||
#endif /* ! UNITY_EXCLUDE_FLOAT_PRINT */
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
|
||||
void UnityPrintFail(void);
|
||||
void UnityPrintFail(void)
|
||||
{
|
||||
UnityPrint(UnityStrFail);
|
||||
}
|
||||
|
||||
void UnityPrintOk(void);
|
||||
void UnityPrintOk(void)
|
||||
{
|
||||
UnityPrint(UnityStrOk);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line);
|
||||
static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
|
||||
{
|
||||
UnityPrint(file);
|
||||
@ -352,7 +336,6 @@ static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
|
||||
}
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line);
|
||||
static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line)
|
||||
{
|
||||
UnityTestResultsBegin(Unity.TestFile, line);
|
||||
@ -384,7 +367,6 @@ void UnityConcludeTest(void)
|
||||
}
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
static void UnityAddMsgIfSpecified(const char* msg);
|
||||
static void UnityAddMsgIfSpecified(const char* msg)
|
||||
{
|
||||
if (msg)
|
||||
@ -408,7 +390,6 @@ static void UnityAddMsgIfSpecified(const char* msg)
|
||||
}
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual);
|
||||
static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual)
|
||||
{
|
||||
UnityPrint(UnityStrExpected);
|
||||
@ -1141,7 +1122,7 @@ void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
|
||||
RETURN_IF_FAIL_OR_IGNORE;
|
||||
|
||||
UnityTestResultsBegin(Unity.TestFile, line);
|
||||
UnityPrintFail();
|
||||
UnityPrint(UnityStrFail);
|
||||
if (msg != NULL)
|
||||
{
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
@ -1245,11 +1226,11 @@ int UnityEnd(void)
|
||||
UNITY_PRINT_EOL();
|
||||
if (Unity.TestFailures == 0U)
|
||||
{
|
||||
UnityPrintOk();
|
||||
UnityPrint(UnityStrOk);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityPrintFail();
|
||||
UnityPrint(UnityStrFail);
|
||||
#ifdef UNITY_DIFFERENTIATE_FINAL_FAIL
|
||||
UNITY_OUTPUT_CHAR('E'); UNITY_OUTPUT_CHAR('D');
|
||||
#endif
|
||||
|
@ -419,6 +419,7 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
void UnityPrint(const char* string);
|
||||
void UnityPrintLen(const char* string, const UNITY_UINT32 length);
|
||||
void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number);
|
||||
void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style);
|
||||
void UnityPrintNumber(const UNITY_INT number);
|
||||
|
Reference in New Issue
Block a user