Skip to content

Commit

Permalink
No calls to assert macros until after UnityConcludeTest clears Curren…
Browse files Browse the repository at this point in the history
…tTestFailed
  • Loading branch information
paulcdca committed Feb 29, 2024
1 parent 64939db commit 772c6bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/tests/test_unity_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,9 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void)
Unity.CurrentTestFailed = 1;
startPutcharSpy(); /* Suppress output */
startFlushSpy();
TEST_ASSERT_EQUAL(0, getFlushSpyCalls());
UNITY_UINT savedGetFlushSpyCalls = getFlushSpyCalls();
UnityConcludeTest();
TEST_ASSERT_EQUAL(0, savedGetFlushSpyCalls);
endPutcharSpy();
TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures);
#if defined(UNITY_OUTPUT_FLUSH) && defined(UNITY_OUTPUT_FLUSH_HEADER_DECLARATION)
Expand Down

0 comments on commit 772c6bb

Please sign in to comment.