MCPcopy Index your code
hub / github.com/ThrowTheSwitch/Unity / UnityAssertFloatsNotWithin

Function UnityAssertFloatsNotWithin

src/unity.c:1032–1050  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1030
1031/*-----------------------------------------------*/
1032void UnityAssertFloatsNotWithin(const UNITY_FLOAT delta,
1033 const UNITY_FLOAT expected,
1034 const UNITY_FLOAT actual,
1035 const char* msg,
1036 const UNITY_LINE_TYPE lineNumber)
1037{
1038 RETURN_IF_FAIL_OR_IGNORE;
1039
1040 if (UnityFloatsWithin(delta, expected, actual))
1041 {
1042 UnityTestResultsFailBegin(lineNumber);
1043 UnityPrint(UnityStrExpected);
1044 UnityPrintFloat((UNITY_DOUBLE)expected);
1045 UnityPrint(UnityStrNotEqual);
1046 UnityPrintFloat((UNITY_DOUBLE)actual);
1047 UnityAddMsgIfSpecified(msg);
1048 UNITY_FAIL_AND_BAIL;
1049 }
1050}
1051
1052/*-----------------------------------------------*/
1053void UnityAssertGreaterOrLessFloat(const UNITY_FLOAT threshold,

Callers

nothing calls this directly

Calls 5

UnityFloatsWithinFunction · 0.85
UnityPrintFunction · 0.85
UnityPrintFloatFunction · 0.85
UnityAddMsgIfSpecifiedFunction · 0.85

Tested by

no test coverage detected