mirror of
https://github.com/ThrowTheSwitch/Unity
synced 2025-05-23 02:29:33 -04:00
Merge pull request #414 from art-of-dom/silent-unity-fixture
silent mode in unity fixture
This commit is contained in:
commit
c9b1d217fd
extras/fixture/src
@ -79,15 +79,21 @@ void UnityTestRunner(unityfunction* setup,
|
||||
Unity.TestFile = file;
|
||||
Unity.CurrentTestName = printableName;
|
||||
Unity.CurrentTestLineNumber = line;
|
||||
if (!UnityFixture.Verbose)
|
||||
UNITY_OUTPUT_CHAR('.');
|
||||
else
|
||||
if (UnityFixture.Verbose)
|
||||
{
|
||||
UnityPrint(printableName);
|
||||
#ifndef UNITY_REPEAT_TEST_NAME
|
||||
Unity.CurrentTestName = NULL;
|
||||
#endif
|
||||
}
|
||||
else if (UnityFixture.Silent)
|
||||
{
|
||||
/* Do Nothing */
|
||||
}
|
||||
else
|
||||
{
|
||||
UNITY_OUTPUT_CHAR('.');
|
||||
}
|
||||
|
||||
Unity.NumberOfTests++;
|
||||
UnityMalloc_StartTest();
|
||||
@ -120,13 +126,19 @@ void UnityIgnoreTest(const char* printableName, const char* group, const char* n
|
||||
{
|
||||
Unity.NumberOfTests++;
|
||||
Unity.TestIgnores++;
|
||||
if (!UnityFixture.Verbose)
|
||||
UNITY_OUTPUT_CHAR('!');
|
||||
else
|
||||
if (UnityFixture.Verbose)
|
||||
{
|
||||
UnityPrint(printableName);
|
||||
UNITY_PRINT_EOL();
|
||||
}
|
||||
else if (UnityFixture.Silent)
|
||||
{
|
||||
/* Do Nothing */
|
||||
}
|
||||
else
|
||||
{
|
||||
UNITY_OUTPUT_CHAR('!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,6 +362,7 @@ int UnityGetCommandLineOptions(int argc, const char* argv[])
|
||||
{
|
||||
int i;
|
||||
UnityFixture.Verbose = 0;
|
||||
UnityFixture.Silent = 0;
|
||||
UnityFixture.GroupFilter = 0;
|
||||
UnityFixture.NameFilter = 0;
|
||||
UnityFixture.RepeatCount = 1;
|
||||
@ -364,6 +377,11 @@ int UnityGetCommandLineOptions(int argc, const char* argv[])
|
||||
UnityFixture.Verbose = 1;
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-s") == 0)
|
||||
{
|
||||
UnityFixture.Silent = 1;
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-g") == 0)
|
||||
{
|
||||
i++;
|
||||
|
@ -16,6 +16,7 @@ extern "C"
|
||||
struct UNITY_FIXTURE_T
|
||||
{
|
||||
int Verbose;
|
||||
int Silent;
|
||||
unsigned int RepeatCount;
|
||||
const char* NameFilter;
|
||||
const char* GroupFilter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user