mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-08-14 15:17:52 +00:00
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:
@@ -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()
|
|||||||
{
|
{
|
||||||
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()
|
|||||||
Unity.CurrentTestFailed = 0;
|
Unity.CurrentTestFailed = 0;
|
||||||
Unity.CurrentTestIgnored = 0;
|
Unity.CurrentTestIgnored = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
|||||||
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();
|
||||||
|
|||||||
Reference in New Issue
Block a user