From 7c270e05417e0a50e6ed530cb0304dfa427ffd74 Mon Sep 17 00:00:00 2001 From: jsalling Date: Tue, 3 May 2016 20:31:37 -0500 Subject: [PATCH] Test that details are printed in a direct TEST_FAIL call --- test/tests/testunity.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/tests/testunity.c b/test/tests/testunity.c index 850472b..eb6601a 100644 --- a/test/tests/testunity.c +++ b/test/tests/testunity.c @@ -3722,6 +3722,8 @@ void testNotEqualDoubleArraysLengthZero(void) #endif } +// ===================== THESE TEST WILL RUN IF YOUR CONFIG INCLUDES DETAIL SUPPORT ================== + void testThatDetailsCanBeHandleOneDetail(void) { #ifdef UNITY_EXCLUDE_DETAILS @@ -3735,6 +3737,19 @@ void testThatDetailsCanBeHandleOneDetail(void) #endif } +void testThatDetailsCanHandleTestFail(void) +{ +#ifdef UNITY_EXCLUDE_DETAILS + TEST_IGNORE(); +#else + UNITY_SET_DETAILS("Detail1","Detail2"); + + EXPECT_ABORT_BEGIN + TEST_FAIL_MESSAGE("Should Fail And Say Detail1 and Detail2"); + VERIFY_FAILS_END +#endif +} + void testThatDetailsCanBeHandleTwoDetails(void) { #ifdef UNITY_EXCLUDE_DETAILS