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

Function UnityAssertFloatsWithin

src/unity.c:1013–1029  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1011
1012/*-----------------------------------------------*/
1013void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
1014 const UNITY_FLOAT expected,
1015 const UNITY_FLOAT actual,
1016 const char* msg,
1017 const UNITY_LINE_TYPE lineNumber)
1018{
1019 RETURN_IF_FAIL_OR_IGNORE;
1020
1021
1022 if (!UnityFloatsWithin(delta, expected, actual))
1023 {
1024 UnityTestResultsFailBegin(lineNumber);
1025 UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)expected, (UNITY_DOUBLE)actual);
1026 UnityAddMsgIfSpecified(msg);
1027 UNITY_FAIL_AND_BAIL;
1028 }
1029}
1030
1031/*-----------------------------------------------*/
1032void UnityAssertFloatsNotWithin(const UNITY_FLOAT delta,

Callers

nothing calls this directly

Calls 3

UnityFloatsWithinFunction · 0.85
UnityAddMsgIfSpecifiedFunction · 0.85

Tested by

no test coverage detected