提交 b29ad2ee 编写于 作者: J jsalling

Removing unnecessary function prototypes, inline PrintOk/Fail

上级 04e10f95
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册