MCPcopy Index your code
hub / github.com/DaveGamble/cJSON / UnityFail

Function UnityFail

tests/unity/src/unity.c:1280–1311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1278 *-----------------------------------------------*/
1279
1280void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
1281{
1282 RETURN_IF_FAIL_OR_IGNORE;
1283
1284 UnityTestResultsBegin(Unity.TestFile, line);
1285 UnityPrint(UnityStrFail);
1286 if (msg != NULL)
1287 {
1288 UNITY_OUTPUT_CHAR(':');
1289
1290#ifndef UNITY_EXCLUDE_DETAILS
1291 if (Unity.CurrentDetail1)
1292 {
1293 UnityPrint(UnityStrDetail1Name);
1294 UnityPrint(Unity.CurrentDetail1);
1295 if (Unity.CurrentDetail2)
1296 {
1297 UnityPrint(UnityStrDetail2Name);
1298 UnityPrint(Unity.CurrentDetail2);
1299 }
1300 UnityPrint(UnityStrSpacer);
1301 }
1302#endif
1303 if (msg[0] != ' ')
1304 {
1305 UNITY_OUTPUT_CHAR(' ');
1306 }
1307 UnityPrint(msg);
1308 }
1309
1310 UNITY_FAIL_AND_BAIL;
1311}
1312
1313/*-----------------------------------------------*/
1314void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)

Callers

nothing calls this directly

Calls 2

UnityTestResultsBeginFunction · 0.85
UnityPrintFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…