1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-28 02:34:27 +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(); startFlushSpy();
savedGetFlushSpyCalls = getFlushSpyCalls(); savedGetFlushSpyCalls = getFlushSpyCalls();
UnityConcludeTest(); UnityConcludeTest();
TEST_ASSERT_EQUAL(0, savedGetFlushSpyCalls);
endPutcharSpy(); endPutcharSpy();
TEST_ASSERT_EQUAL(0, savedGetFlushSpyCalls);
TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures); TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures);
#if defined(UNITY_OUTPUT_FLUSH) && defined(UNITY_OUTPUT_FLUSH_HEADER_DECLARATION) #if defined(UNITY_OUTPUT_FLUSH) && defined(UNITY_OUTPUT_FLUSH_HEADER_DECLARATION)
TEST_ASSERT_EQUAL(1, getFlushSpyCalls()); TEST_ASSERT_EQUAL(1, getFlushSpyCalls());