From 3cbe49900a6f0b061be4b9d992632c3cdab7b23a Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sun, 31 Mar 2024 18:12:31 -0400 Subject: [PATCH] Don't call assertions until after we've concluded test framework tinkering in core test (#718) --- test/tests/test_unity_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests/test_unity_core.c b/test/tests/test_unity_core.c index 094d48a5..6638fb94 100644 --- a/test/tests/test_unity_core.c +++ b/test/tests/test_unity_core.c @@ -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());