![]() | IGNORE_TEST |
|
26 Dec 2011, 02:27
jiameifang (1 post) |
When I run IGNORE_TEST(LedDriver, OutOfBoundsToDo), the ignored number is 0, not 1. (page 90 of pdf file) I just modify UnityIgnoreTest as follows. It works ok. I am not sure it is a bug or I have missed somthing. void UnityIgnoreTest(const char * printableName) |
|
15 Jul 2012, 17:10
Dennis Lambe (6 posts) |
This definitely looks like a bug. I have a slightly more elaborate patch that also makes IGNORE look better in Vebose mode (-v). Where are the unit tests for IGNORE_TEST? I went to update them and found there weren’t any in the first place!
diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixtu
index ec0b4c5..8d17092 100644
--- a/extras/fixture/src/unity_fixture.c
+++ b/extras/fixture/src/unity_fixture.c
@@ -116,11 +116,15 @@ 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();
}
@@ -360,6 +364,10 @@ void UnityConcludeFixtureTest()
{
if (Unity.CurrentTestIgnored)
{
+ if (UnityFixture.Verbose)
+ {
+ UNITY_OUTPUT_CHAR('\n');
+ }
Unity.TestIgnores++;
}
else if (!Unity.CurrentTestFailed)
diff --git a/extras/fixture/src/unity_fixture.h b/extras/fixture/src/unity_fixtu
index da1f871..43c9f7c 100644
--- a/extras/fixture/src/unity_fixture.h
+++ b/extras/fixture/src/unity_fixture.h
@@ -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##_()
diff --git a/extras/fixture/src/unity_fixture_internals.h b/extras/fixture/src/u
index db23f67..46cbbcb 100644
--- a/extras/fixture/src/unity_fixture_internals.h
+++ b/extras/fixture/src/unity_fixture_internals.h
@@ -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();
|
|
16 Jul 2012, 22:34
James Grenning (130 posts) |
these are bugs. thanks for reporting them. |
|
22 Nov 2012, 16:01
Dawid Babula (1 post) |
Hi, can you please tell me did you fix this bug, because I cannot see any commit on the GitHub which will be telling something about this. Looking forward for hearing from you. Dawid |
|
09 Jan 2013, 17:47
Dennis Lambe (6 posts) |
I got the fix for these bugs merged upstream. Details here: |
| You must be logged in to comment |

