vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c in ceedling-0.20.3 vs vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c in ceedling-0.21.0
- old
+ new
@@ -73,11 +73,10 @@
const char* name,
const char* file, unsigned int line)
{
if (testSelected(name) && groupSelected(group))
{
- Unity.CurrentTestFailed = 0;
Unity.TestFile = file;
Unity.CurrentTestName = printableName;
Unity.CurrentTestLineNumber = line;
if (!UnityFixture.Verbose)
UNITY_OUTPUT_CHAR('.');
@@ -110,16 +109,18 @@
void UnityIgnoreTest(const char* printableName, const char* group, const char* name)
{
if (testSelected(name) && groupSelected(group))
{
Unity.NumberOfTests++;
- Unity.CurrentTestIgnored = 1;
+ Unity.TestIgnores++;
if (!UnityFixture.Verbose)
UNITY_OUTPUT_CHAR('!');
else
+ {
UnityPrint(printableName);
- UnityConcludeFixtureTest();
+ UNITY_PRINT_EOL();
+ }
}
}
//-------------------------------------------------
@@ -204,10 +205,13 @@
guard->size = size;
guard->guard_space = 0;
mem = (char*)&(guard[1]);
memcpy(&mem[size], end, sizeof(end));
+#ifndef UNITY_FIXTURE_MALLOC_OVERRIDES_H_
+ free(guard);
+#endif
return (void*)mem;
}
static int isOverrun(void* mem)
{
@@ -401,24 +405,21 @@
void UnityConcludeFixtureTest(void)
{
if (Unity.CurrentTestIgnored)
{
- if (UnityFixture.Verbose)
- {
- UNITY_PRINT_EOL();
- }
Unity.TestIgnores++;
+ UNITY_PRINT_EOL();
}
else if (!Unity.CurrentTestFailed)
{
if (UnityFixture.Verbose)
{
UnityPrint(" PASS");
UNITY_PRINT_EOL();
}
}
- else if (Unity.CurrentTestFailed)
+ else // Unity.CurrentTestFailed
{
Unity.TestFailures++;
UNITY_PRINT_EOL();
}