Skip to content

Commit aed2e62

Browse files
committed
Float-double types typo was fixed
1 parent 9c45c78 commit aed2e62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/unity.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
11911191
{
11921192
RETURN_IF_FAIL_OR_IGNORE;
11931193

1194-
if (!UnityDoublesWithin(delta, 0, expected, actual))
1194+
if (!UnityDoublesWithin(delta, (UNITY_DOUBLE)0, expected, actual))
11951195
{
11961196
UnityTestResultsFailBegin(lineNumber);
11971197
UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual);
@@ -1209,7 +1209,7 @@ void UnityAssertDoublesNotWithin(const UNITY_DOUBLE delta,
12091209
{
12101210
RETURN_IF_FAIL_OR_IGNORE;
12111211

1212-
if (UnityDoublesWithin(delta, 0, expected, actual))
1212+
if (UnityDoublesWithin(delta, (UNITY_DOUBLE)0, expected, actual))
12131213
{
12141214
UnityTestResultsFailBegin(lineNumber);
12151215
UnityPrint(UnityStrExpected);
@@ -1238,7 +1238,7 @@ void UnityAssertGreaterOrLessDouble(const UNITY_DOUBLE threshold,
12381238
if (!(actual < threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
12391239
if (!(actual > threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
12401240

1241-
if ((compare & UNITY_EQUAL_TO) && UnityDoublesWithin((UNITY_FLOAT)0, threshold * UNITY_DOUBLE_PRECISION, threshold, actual)) { failed = 0; }
1241+
if ((compare & UNITY_EQUAL_TO) && UnityDoublesWithin((UNITY_DOUBLE)0, threshold * UNITY_DOUBLE_PRECISION, threshold, actual)) { failed = 0; }
12421242

12431243
if (failed)
12441244
{

0 commit comments

Comments
 (0)