提交 6695e9e9 编写于 作者: M Mark VanderVoord 提交者: GitHub

Merge pull request #242 from jsalling/feature/fixture-test-name

Fixture - Remove duplicate output of test name in verbose mode
......@@ -43,7 +43,6 @@ CFLAGS += -Wundef
CFLAGS += -Wold-style-definition
CFLAGS += -Wmissing-prototypes
CFLAGS += -Wmissing-declarations
CFLAGS += -DUNITY_FIXTURES
TARGET_BASE1=all_tests
TARGET1 = $(TARGET_BASE1)$(TARGET_EXTENSION)
......
......@@ -81,7 +81,12 @@ void UnityTestRunner(unityfunction* setup,
if (!UnityFixture.Verbose)
UNITY_OUTPUT_CHAR('.');
else
{
UnityPrint(printableName);
#ifndef UNITY_REPEAT_TEST_NAME
Unity.CurrentTestName = NULL;
#endif
}
Unity.NumberOfTests++;
UnityMalloc_StartTest();
......
......@@ -355,28 +355,19 @@ void UnityPrintOk(void)
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((UNITY_INT)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(':');
}
......
......@@ -575,8 +575,6 @@ extern const char UnityStrErr64[];
#define UNITY_END() UnityEnd()
#endif
#define UNITY_UNUSED(x) (void)(sizeof(x))
/*-----------------------------------------------
* Command Line Argument Support
*-----------------------------------------------*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册