mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-27 10:14:28 +01:00
- catch optional fixtures plugin up to mainline unity (somewhat. like fixing line endings)
This commit is contained in:
15
src/unity.c
15
src/unity.c
@@ -260,31 +260,44 @@ void UnityPrintFloat(_UF number)
|
||||
|
||||
//-----------------------------------------------
|
||||
|
||||
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)
|
||||
{
|
||||
#ifndef UNITY_FIXTURES
|
||||
UnityPrint(file);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
UnityPrintNumber((_U_SINT)line);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
UnityPrint(Unity.CurrentTestName);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
#else
|
||||
UNITY_UNUSED(file);
|
||||
UNITY_UNUSED(line);
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line);
|
||||
static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line)
|
||||
{
|
||||
#ifndef UNITY_FIXTURES
|
||||
UnityTestResultsBegin(Unity.TestFile, line);
|
||||
#else
|
||||
UNITY_UNUSED(line);
|
||||
#endif
|
||||
UnityPrint(UnityStrFail);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
}
|
||||
@@ -312,6 +325,7 @@ void UnityConcludeTest(void)
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
static void UnityAddMsgIfSpecified(const char* msg);
|
||||
static void UnityAddMsgIfSpecified(const char* msg)
|
||||
{
|
||||
if (msg)
|
||||
@@ -322,6 +336,7 @@ 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);
|
||||
|
||||
@@ -555,6 +555,8 @@ extern const char UnityStrErr64[];
|
||||
#define UNITY_END() UnityEnd()
|
||||
#endif
|
||||
|
||||
#define UNITY_UNUSED(x) (void)(sizeof(x))
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Basic Fail and Ignore
|
||||
//-------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user