1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Refactored the test evaluation of the flushSpy

This commit is contained in:
Fabian Zahn
2018-02-18 18:44:58 +01:00
parent 436a46d8ef
commit e038ae2ade
2 changed files with 4 additions and 5 deletions

View File

@@ -3357,17 +3357,17 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void)
UNITY_UINT savedFailures = Unity.TestFailures;
Unity.CurrentTestFailed = 1;
startPutcharSpy(); // Suppress output
#ifdef USING_FLUSH_SPY
startFlushSpy();
TEST_ASSERT_EQUAL(0, getFlushSpyCalls());
#endif
UnityConcludeTest();
endPutcharSpy();
TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures);
#ifdef USING_FLUSH_SPY
#if defined(UNITY_OUTPUT_FLUSH) && defined(UNITY_OUTPUT_FLUSH_HEADER_DECLARATION)
TEST_ASSERT_EQUAL(1, getFlushSpyCalls());
endFlushSpy();
#else
TEST_ASSERT_EQUAL(0, getFlushSpyCalls());
#endif
endFlushSpy();
startPutcharSpy(); // Suppress output
int failures = UnityEnd();