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

Don't call assertions until after we've concluded test framework tinkering in core test (#718)

This commit is contained in:
Mark VanderVoord
2024-03-31 18:12:31 -04:00
parent c444b63bfd
commit 3cbe49900a

View File

@@ -300,8 +300,8 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void)
startFlushSpy();
savedGetFlushSpyCalls = getFlushSpyCalls();
UnityConcludeTest();
TEST_ASSERT_EQUAL(0, savedGetFlushSpyCalls);
endPutcharSpy();
TEST_ASSERT_EQUAL(0, savedGetFlushSpyCalls);
TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures);
#if defined(UNITY_OUTPUT_FLUSH) && defined(UNITY_OUTPUT_FLUSH_HEADER_DECLARATION)
TEST_ASSERT_EQUAL(1, getFlushSpyCalls());