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

More details here: http://forums.pragprog.com/forums/123/topics/10126
This commit is contained in:
Dennis Lambe Jr
2012-12-21 16:07:49 -05:00
parent e21881c53f
commit 47bf32edd6
3 changed files with 11 additions and 5 deletions
+9 -3
View File
@@ -112,11 +112,14 @@ void UnityTestRunner(unityfunction* setup,
}
}
void UnityIgnoreTest()
void UnityIgnoreTest(const char * printableName)
{
Unity.NumberOfTests++;
Unity.CurrentTestIgnored = 1;
UNITY_OUTPUT_CHAR('!');
if (!UnityFixture.Verbose)
UNITY_OUTPUT_CHAR('!');
else
UnityPrint(printableName);
UnityConcludeFixtureTest();
}
@@ -357,6 +360,10 @@ void UnityConcludeFixtureTest()
{
if (Unity.CurrentTestIgnored)
{
if (UnityFixture.Verbose)
{
UNITY_OUTPUT_CHAR('\n');
}
Unity.TestIgnores++;
}
else if (!Unity.CurrentTestFailed)
@@ -375,4 +382,3 @@ void UnityConcludeFixtureTest()
Unity.CurrentTestFailed = 0;
Unity.CurrentTestIgnored = 0;
}
+1 -1
View File
@@ -41,7 +41,7 @@ int UnityMain(int argc, char* argv[], void (*runAllTests)());
void TEST_##group##_##name##_();\
void TEST_##group##_##name##_run()\
{\
UnityIgnoreTest();\
UnityIgnoreTest("IGNORE_TEST(" #group ", " #name ")");\
}\
void TEST_##group##_##name##_()
+1 -1
View File
@@ -25,7 +25,7 @@ void UnityTestRunner(unityfunction * setup,
const char * name,
const char * file, int line);
void UnityIgnoreTest();
void UnityIgnoreTest(const char * printableName);
void UnityMalloc_StartTest();
void UnityMalloc_EndTest();
int UnityFailureCount();