1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-29 19:24:27 +01:00

- Applied details to FAIL messages as well

This commit is contained in:
Mark VanderVoord
2015-12-10 18:42:45 -05:00
parent 28195baaba
commit 86b0d628fd

View File

@@ -1211,12 +1211,27 @@ void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
if (msg != NULL) if (msg != NULL)
{ {
UNITY_OUTPUT_CHAR(':'); UNITY_OUTPUT_CHAR(':');
#ifndef UNITY_EXCLUDE_DETAILS
if (Unity.CurrentDetail1)
{
UnityPrint(UnityStrDetail1Name);
UnityPrint(Unity.CurrentDetail1);
if (Unity.CurrentDetail2)
{
UnityPrint(UnityStrDetail2Name);
UnityPrint(Unity.CurrentDetail2);
}
UnityPrint(UnityStrSpacer);
}
#endif
if (msg[0] != ' ') if (msg[0] != ' ')
{ {
UNITY_OUTPUT_CHAR(' '); UNITY_OUTPUT_CHAR(' ');
} }
UnityPrint(msg); UnityPrint(msg);
} }
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }