mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 08:25:58 +01:00
Float-double types typo was fixed
This commit is contained in:
@@ -1191,7 +1191,7 @@ void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
|
|||||||
{
|
{
|
||||||
RETURN_IF_FAIL_OR_IGNORE;
|
RETURN_IF_FAIL_OR_IGNORE;
|
||||||
|
|
||||||
if (!UnityDoublesWithin(delta, 0, expected, actual))
|
if (!UnityDoublesWithin(delta, (UNITY_DOUBLE)0, expected, actual))
|
||||||
{
|
{
|
||||||
UnityTestResultsFailBegin(lineNumber);
|
UnityTestResultsFailBegin(lineNumber);
|
||||||
UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual);
|
UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual);
|
||||||
@@ -1209,7 +1209,7 @@ void UnityAssertDoublesNotWithin(const UNITY_DOUBLE delta,
|
|||||||
{
|
{
|
||||||
RETURN_IF_FAIL_OR_IGNORE;
|
RETURN_IF_FAIL_OR_IGNORE;
|
||||||
|
|
||||||
if (UnityDoublesWithin(delta, 0, expected, actual))
|
if (UnityDoublesWithin(delta, (UNITY_DOUBLE)0, expected, actual))
|
||||||
{
|
{
|
||||||
UnityTestResultsFailBegin(lineNumber);
|
UnityTestResultsFailBegin(lineNumber);
|
||||||
UnityPrint(UnityStrExpected);
|
UnityPrint(UnityStrExpected);
|
||||||
@@ -1238,7 +1238,7 @@ void UnityAssertGreaterOrLessDouble(const UNITY_DOUBLE threshold,
|
|||||||
if (!(actual < threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
|
if (!(actual < threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
|
||||||
if (!(actual > threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
|
if (!(actual > threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
|
||||||
|
|
||||||
if ((compare & UNITY_EQUAL_TO) && UnityDoublesWithin((UNITY_FLOAT)0, threshold * UNITY_DOUBLE_PRECISION, threshold, actual)) { failed = 0; }
|
if ((compare & UNITY_EQUAL_TO) && UnityDoublesWithin((UNITY_DOUBLE)0, threshold * UNITY_DOUBLE_PRECISION, threshold, actual)) { failed = 0; }
|
||||||
|
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user