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

Function UnityAssertFloatsWithin

tests/unity/src/unity.c:754–770  ·  view source on GitHub ↗

-----------------------------------------------*/

Source from the content-addressed store, hash-verified

752
753/*-----------------------------------------------*/
754void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
755 const UNITY_FLOAT expected,
756 const UNITY_FLOAT actual,
757 const char* msg,
758 const UNITY_LINE_TYPE lineNumber)
759{
760 RETURN_IF_FAIL_OR_IGNORE;
761
762
763 if (!UnityFloatsWithin(delta, expected, actual))
764 {
765 UnityTestResultsFailBegin(lineNumber);
766 UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)expected, (UNITY_DOUBLE)actual);
767 UnityAddMsgIfSpecified(msg);
768 UNITY_FAIL_AND_BAIL;
769 }
770}
771
772/*-----------------------------------------------*/
773void UnityAssertFloatSpecial(const UNITY_FLOAT actual,

Callers

nothing calls this directly

Calls 3

UnityFloatsWithinFunction · 0.85
UnityAddMsgIfSpecifiedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…