提交 77af37ad 编写于 作者: T ThingamaByte, LLC

- catch optional fixtures plugin up to mainline unity (somewhat. like fixing line endings)

上级 06c95fcb
......@@ -43,6 +43,7 @@ CFLAGS += -Wundef
CFLAGS += -Wold-style-definition
CFLAGS += -Wmissing-prototypes
CFLAGS += -Wmissing-declarations
CFLAGS += -DUNITY_FIXTURES
TARGET_BASE1=all_tests
TARGET1 = $(TARGET_BASE1)$(TARGET_EXTENSION)
......@@ -63,7 +64,7 @@ all: clean default
default:
$(C_COMPILER) $(CFLAGS) $(INC_DIRS) $(SYMBOLS) $(SRC_FILES1) -o $(TARGET1)
./$(TARGET1)
./$(TARGET1) -v
clean:
$(CLEANUP)
......
......@@ -374,10 +374,10 @@ void UnityConcludeFixtureTest(void)
{
if (Unity.CurrentTestIgnored)
{
if (UnityFixture.Verbose)
{
//if (UnityFixture.Verbose)
//{
UNITY_OUTPUT_CHAR('\n');
}
//}
Unity.TestIgnores++;
}
else if (!Unity.CurrentTestFailed)
......@@ -391,6 +391,7 @@ void UnityConcludeFixtureTest(void)
else if (Unity.CurrentTestFailed)
{
Unity.TestFailures++;
UNITY_OUTPUT_CHAR('\n');
}
Unity.CurrentTestFailed = 0;
......
......@@ -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
//-------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册