mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 08:25:58 +01:00
Merge pull request #123 from trianglee/ignored_tests_counted
Bug fix - ignored tests were incorrectly counted when not selected for running. (Thanks!)
This commit is contained in:
@@ -115,15 +115,18 @@ void UnityTestRunner(unityfunction* setup,
|
||||
}
|
||||
}
|
||||
|
||||
void UnityIgnoreTest(const char * printableName)
|
||||
void UnityIgnoreTest(const char * printableName, const char * group, const char * name)
|
||||
{
|
||||
Unity.NumberOfTests++;
|
||||
Unity.CurrentTestIgnored = 1;
|
||||
if (!UnityFixture.Verbose)
|
||||
UNITY_OUTPUT_CHAR('!');
|
||||
else
|
||||
UnityPrint(printableName);
|
||||
UnityConcludeFixtureTest();
|
||||
if (testSelected(name) && groupSelected(group))
|
||||
{
|
||||
Unity.NumberOfTests++;
|
||||
Unity.CurrentTestIgnored = 1;
|
||||
if (!UnityFixture.Verbose)
|
||||
UNITY_OUTPUT_CHAR('!');
|
||||
else
|
||||
UnityPrint(printableName);
|
||||
UnityConcludeFixtureTest();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ int UnityMain(int argc, const char* argv[], void (*runAllTests)(void));
|
||||
void TEST_##group##_##name##_run(void);\
|
||||
void TEST_##group##_##name##_run(void)\
|
||||
{\
|
||||
UnityIgnoreTest("IGNORE_TEST(" #group ", " #name ")");\
|
||||
UnityIgnoreTest("IGNORE_TEST(" #group ", " #name ")", TEST_GROUP_##group, #name);\
|
||||
}\
|
||||
void TEST_##group##_##name##_(void)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ void UnityTestRunner(unityfunction * setup,
|
||||
const char * name,
|
||||
const char * file, int line);
|
||||
|
||||
void UnityIgnoreTest(const char * printableName);
|
||||
void UnityIgnoreTest(const char * printableName, const char * group, const char * name);
|
||||
void UnityMalloc_StartTest(void);
|
||||
void UnityMalloc_EndTest(void);
|
||||
int UnityFailureCount(void);
|
||||
|
||||
Reference in New Issue
Block a user