提交 f8c585cb 编写于 作者: M Mark VanderVoord 提交者: GitHub

Merge pull request #236 from jsalling/bugfix/one-test-failure

Fix test that failed when any other test failed
......@@ -2272,15 +2272,18 @@ void putcharSpy(int c)
void testFailureCountIncrementsAndIsReturnedAtEnd(void)
{
UNITY_UINT savedFailures = Unity.TestFailures;
Unity.CurrentTestFailed = 1;
startPutcharSpy(); // Suppress output
UnityConcludeTest();
TEST_ASSERT_EQUAL(1, Unity.TestFailures);
endPutcharSpy();
TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures);
startPutcharSpy(); // Suppress output
int failures = UnityEnd();
Unity.TestFailures--;
endPutcharSpy();
TEST_ASSERT_EQUAL(1, failures);
TEST_ASSERT_EQUAL(savedFailures + 1, failures);
}
void testCstringsEscapeSequence(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册