提交 47bf32ed 编写于 作者: D Dennis Lambe Jr

Made unity_fixture IGNORE_TEST() respect the -v verbose flag.

More details here: http://forums.pragprog.com/forums/123/topics/10126
上级 e21881c5
...@@ -112,11 +112,14 @@ void UnityTestRunner(unityfunction* setup, ...@@ -112,11 +112,14 @@ void UnityTestRunner(unityfunction* setup,
} }
} }
void UnityIgnoreTest() void UnityIgnoreTest(const char * printableName)
{ {
Unity.NumberOfTests++; Unity.NumberOfTests++;
Unity.CurrentTestIgnored = 1; Unity.CurrentTestIgnored = 1;
UNITY_OUTPUT_CHAR('!'); if (!UnityFixture.Verbose)
UNITY_OUTPUT_CHAR('!');
else
UnityPrint(printableName);
UnityConcludeFixtureTest(); UnityConcludeFixtureTest();
} }
...@@ -357,6 +360,10 @@ void UnityConcludeFixtureTest() ...@@ -357,6 +360,10 @@ void UnityConcludeFixtureTest()
{ {
if (Unity.CurrentTestIgnored) if (Unity.CurrentTestIgnored)
{ {
if (UnityFixture.Verbose)
{
UNITY_OUTPUT_CHAR('\n');
}
Unity.TestIgnores++; Unity.TestIgnores++;
} }
else if (!Unity.CurrentTestFailed) else if (!Unity.CurrentTestFailed)
...@@ -375,4 +382,3 @@ void UnityConcludeFixtureTest() ...@@ -375,4 +382,3 @@ void UnityConcludeFixtureTest()
Unity.CurrentTestFailed = 0; Unity.CurrentTestFailed = 0;
Unity.CurrentTestIgnored = 0; Unity.CurrentTestIgnored = 0;
} }
...@@ -41,7 +41,7 @@ int UnityMain(int argc, char* argv[], void (*runAllTests)()); ...@@ -41,7 +41,7 @@ int UnityMain(int argc, char* argv[], void (*runAllTests)());
void TEST_##group##_##name##_();\ void TEST_##group##_##name##_();\
void TEST_##group##_##name##_run()\ void TEST_##group##_##name##_run()\
{\ {\
UnityIgnoreTest();\ UnityIgnoreTest("IGNORE_TEST(" #group ", " #name ")");\
}\ }\
void TEST_##group##_##name##_() void TEST_##group##_##name##_()
......
...@@ -25,7 +25,7 @@ void UnityTestRunner(unityfunction * setup, ...@@ -25,7 +25,7 @@ void UnityTestRunner(unityfunction * setup,
const char * name, const char * name,
const char * file, int line); const char * file, int line);
void UnityIgnoreTest(); void UnityIgnoreTest(const char * printableName);
void UnityMalloc_StartTest(); void UnityMalloc_StartTest();
void UnityMalloc_EndTest(); void UnityMalloc_EndTest();
int UnityFailureCount(); int UnityFailureCount();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册