Skip to content

Commit

Permalink
Add NOT_EQUAL* and NOT_WITHIN* checks for floats and doubles
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Reichelt Gjertsen committed Dec 3, 2021
1 parent 5a3d82b commit 244edf6
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,25 @@ The bit is specified 0-31 for a 32-bit integer.
### Numerical Assertions: Floats

TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual)
TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual)

Asserts that the actual value is within plus or minus delta of the expected value.

TEST_ASSERT_FLOAT_NOT_WITHIN(delta, expected, actual)
TEST_ASSERT_DOUBLE_NOT_WITHIN(delta, expected, actual)

Asserts that the actual value is NOT within plus or minus delta of the expected value.

TEST_ASSERT_EQUAL_FLOAT(expected, actual)
TEST_ASSERT_EQUAL_DOUBLE(expected, actual)

Asserts that two floating point values are "equal" within a small % delta of the expected value.

TEST_ASSERT_NOT_EQUAL_FLOAT(expected, actual)
TEST_ASSERT_NOT_EQUAL_DOUBLE(expected, actual)

Asserts that two floating point values are NOT "equal" within a small % delta of the expected value.

TEST_ASSERT_LESS_THAN_FLOAT(threshold, actual)
TEST_ASSERT_LESS_THAN_DOUBLE(threshold, actual)
TEST_ASSERT_GREATER_THAN_FLOAT(threshold, actual)
Expand Down
18 changes: 18 additions & 0 deletions docs/UnityAssertionsReference.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ Asserts that the `actual` value is within +/- `delta` of the `expected` value.
The nature of floating point representation is such that exact evaluations of
equality are not guaranteed.
#### `TEST_ASSERT_FLOAT_WITHIN (delta, expected, actual)`
Asserts that the `actual` value is NOT within +/- `delta` of the `expected` value.
#### `TEST_ASSERT_EQUAL_FLOAT (expected, actual)`
Asserts that the `actual` value is "close enough to be considered equal" to the
Expand All @@ -563,6 +567,11 @@ Asserting section for more details on this. Omitting a user-specified delta in a
floating point assertion is both a shorthand convenience and a requirement of
code generation conventions for CMock.
#### `TEST_ASSERT_NOT_EQUAL_FLOAT (expected, actual)`
Asserts that the `actual` value is NOT "close enough to be considered equal" to the
`expected` value.
#### `TEST_ASSERT_EQUAL_FLOAT_ARRAY (expected, actual, num_elements)`
See Array assertion section for details. Note that individual array element
Expand Down Expand Up @@ -631,6 +640,10 @@ Asserts that the `actual` value is within +/- `delta` of the `expected` value.
The nature of floating point representation is such that exact evaluations of
equality are not guaranteed.
#### `TEST_ASSERT_DOUBLE_NOT_WITHIN (delta, expected, actual)`
Asserts that the `actual` value is NOT within +/- `delta` of the `expected` value.
#### `TEST_ASSERT_EQUAL_DOUBLE (expected, actual)`
Asserts that the `actual` value is "close enough to be considered equal" to the
Expand All @@ -639,6 +652,11 @@ Asserting section for more details. Omitting a user-specified delta in a
floating point assertion is both a shorthand convenience and a requirement of
code generation conventions for CMock.
#### `TEST_ASSERT_NOT_EQUAL_DOUBLE (expected, actual)`
Asserts that the `actual` value is NOT "close enough to be considered equal" to the
`expected` value.
#### `TEST_ASSERT_EQUAL_DOUBLE_ARRAY (expected, actual, num_elements)`
See Array assertion section for details. Note that individual array element
Expand Down
42 changes: 42 additions & 0 deletions src/unity.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,27 @@ void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
}
}

/*-----------------------------------------------*/
void UnityAssertFloatsNotWithin(const UNITY_FLOAT delta,
const UNITY_FLOAT expected,
const UNITY_FLOAT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
RETURN_IF_FAIL_OR_IGNORE;

if (UnityFloatsWithin(delta, expected, actual))
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrExpected);
UnityPrintFloat((UNITY_DOUBLE)expected);
UnityPrint(UnityStrNotEqual);
UnityPrintFloat((UNITY_DOUBLE)actual);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
}

/*-----------------------------------------------*/
void UnityAssertGreaterOrLessFloat(const UNITY_FLOAT threshold,
const UNITY_FLOAT actual,
Expand Down Expand Up @@ -1145,6 +1166,27 @@ void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
}
}

/*-----------------------------------------------*/
void UnityAssertDoublesNotWithin(const UNITY_DOUBLE delta,
const UNITY_DOUBLE expected,
const UNITY_DOUBLE actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
RETURN_IF_FAIL_OR_IGNORE;

if (UnityDoublesWithin(delta, expected, actual))
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrExpected);
UnityPrintFloat((UNITY_DOUBLE)expected);
UnityPrint(UnityStrNotEqual);
UnityPrintFloat((UNITY_DOUBLE)actual);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
}

/*-----------------------------------------------*/
void UnityAssertGreaterOrLessDouble(const UNITY_DOUBLE threshold,
const UNITY_DOUBLE actual,
Expand Down
4 changes: 4 additions & 0 deletions src/unity.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ void verifyTest(void);

/* Floating Point (If Enabled) */
#define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_FLOAT_NOT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_NOT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_NOT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_NOT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_GREATER_THAN_FLOAT(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_FLOAT((threshold), (actual), __LINE__, NULL)
Expand All @@ -353,7 +355,9 @@ void verifyTest(void);

/* Double (If Enabled) */
#define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_DOUBLE_NOT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_NOT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_NOT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_NOT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_GREATER_THAN_DOUBLE(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_DOUBLE((threshold), (actual), __LINE__, NULL)
Expand Down
17 changes: 17 additions & 0 deletions src/unity_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,12 @@ void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
const char* msg,
const UNITY_LINE_TYPE lineNumber);

void UnityAssertFloatsNotWithin(const UNITY_FLOAT delta,
const UNITY_FLOAT expected,
const UNITY_FLOAT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber);

void UnityAssertGreaterOrLessFloat(const UNITY_FLOAT threshold,
const UNITY_FLOAT actual,
const UNITY_COMPARISON_T compare,
Expand All @@ -674,6 +680,12 @@ void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
const char* msg,
const UNITY_LINE_TYPE lineNumber);

void UnityAssertDoublesNotWithin(const UNITY_DOUBLE delta,
const UNITY_DOUBLE expected,
const UNITY_DOUBLE actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber);

void UnityAssertGreaterOrLessDouble(const UNITY_DOUBLE threshold,
const UNITY_DOUBLE actual,
const UNITY_COMPARISON_T compare,
Expand Down Expand Up @@ -1007,6 +1019,7 @@ int UnityTestMatches(void);

#ifdef UNITY_EXCLUDE_FLOAT
#define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
#define UNITY_TEST_ASSERT_FLOAT_NOT_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
#define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
#define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
#define UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
Expand All @@ -1022,7 +1035,9 @@ int UnityTestMatches(void);
#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
#else
#define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UnityAssertFloatsWithin((UNITY_FLOAT)(delta), (UNITY_FLOAT)(expected), (UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line))
#define UNITY_TEST_ASSERT_FLOAT_NOT_WITHIN(delta, expected, actual, line, message) UnityAssertFloatsNotWithin((UNITY_FLOAT)(delta), (UNITY_FLOAT)(expected), (UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line))
#define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((UNITY_FLOAT)(expected) * (UNITY_FLOAT)UNITY_FLOAT_PRECISION, (UNITY_FLOAT)(expected), (UNITY_FLOAT)(actual), (UNITY_LINE_TYPE)(line), (message))
#define UNITY_TEST_ASSERT_NOT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_ASSERT_FLOAT_NOT_WITHIN((UNITY_FLOAT)(expected) * (UNITY_FLOAT)UNITY_FLOAT_PRECISION, (UNITY_FLOAT)(expected), (UNITY_FLOAT)(actual), (UNITY_LINE_TYPE)(line), (message))
#define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualFloatArray((UNITY_FLOAT*)(expected), (UNITY_FLOAT*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements, line, message) UnityAssertEqualFloatArray(UnityFloatToPtr(expected), (UNITY_FLOAT*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_GREATER_THAN_FLOAT(threshold, actual, line, message) UnityAssertGreaterOrLessFloat((UNITY_FLOAT)(threshold), (UNITY_FLOAT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line))
Expand Down Expand Up @@ -1054,7 +1069,9 @@ int UnityTestMatches(void);
#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
#else
#define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UnityAssertDoublesWithin((UNITY_DOUBLE)(delta), (UNITY_DOUBLE)(expected), (UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line))
#define UNITY_TEST_ASSERT_DOUBLE_NOT_WITHIN(delta, expected, actual, line, message) UnityAssertDoublesNotWithin((UNITY_DOUBLE)(delta), (UNITY_DOUBLE)(expected), (UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line))
#define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((UNITY_DOUBLE)(expected) * (UNITY_DOUBLE)UNITY_DOUBLE_PRECISION, (UNITY_DOUBLE)(expected), (UNITY_DOUBLE)(actual), (UNITY_LINE_TYPE)(line), (message))
#define UNITY_TEST_ASSERT_NOT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_ASSERT_DOUBLE_NOT_WITHIN((UNITY_DOUBLE)(expected) * (UNITY_DOUBLE)UNITY_DOUBLE_PRECISION, (UNITY_DOUBLE)(expected), (UNITY_DOUBLE)(actual), (UNITY_LINE_TYPE)(line), (message))
#define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualDoubleArray((UNITY_DOUBLE*)(expected), (UNITY_DOUBLE*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements, line, message) UnityAssertEqualDoubleArray(UnityDoubleToPtr(expected), (UNITY_DOUBLE*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_GREATER_THAN_DOUBLE(threshold, actual, line, message) UnityAssertGreaterOrLessDouble((UNITY_DOUBLE)(threshold), (UNITY_DOUBLE)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line))
Expand Down
38 changes: 38 additions & 0 deletions test/tests/test_unity_doubles.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ void testDoublesWithinDelta(void)
TEST_ASSERT_DOUBLE_WITHIN(1.0, 187245.0, 187246.0);
TEST_ASSERT_DOUBLE_WITHIN(0.05, 9273.2549, 9273.2049);
TEST_ASSERT_DOUBLE_WITHIN(0.007, -726.93725, -726.94424);

EXPECT_ABORT_BEGIN
TEST_ASSERT_DOUBLE_NOT_WITHIN(0.05, 9273.2549, 9273.2049);
VERIFY_FAILS_END
#endif
}

Expand All @@ -50,6 +54,8 @@ void testDoublesNotWithinDelta(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_DOUBLE_NOT_WITHIN(0.05, 9273.2649, 9273.2049);

EXPECT_ABORT_BEGIN
TEST_ASSERT_DOUBLE_WITHIN(0.05, 9273.2649, 9273.2049);
VERIFY_FAILS_END
Expand All @@ -66,6 +72,10 @@ void testDoublesEqual(void)
TEST_ASSERT_EQUAL_DOUBLE(187241234567.5, 187241234567.6);
TEST_ASSERT_EQUAL_DOUBLE(9273.2512345649, 9273.25123455699);
TEST_ASSERT_EQUAL_DOUBLE(-726.12345693724, -726.1234569374);

EXPECT_ABORT_BEGIN
TEST_ASSERT_NOT_EQUAL_DOUBLE(-726.12345693724, -726.1234569374);
VERIFY_FAILS_END
#endif
}

Expand All @@ -74,6 +84,8 @@ void testDoublesNotEqual(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(9273.9649, 9273.0049);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(9273.9649, 9273.0049);
VERIFY_FAILS_END
Expand All @@ -85,6 +97,8 @@ void testDoublesNotEqualNegative1(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(-9273.9649, -9273.0049);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(-9273.9649, -9273.0049);
VERIFY_FAILS_END
Expand All @@ -96,6 +110,8 @@ void testDoublesNotEqualNegative2(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(-9273.0049, -9273.9649);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(-9273.0049, -9273.9649);
VERIFY_FAILS_END
Expand All @@ -107,6 +123,8 @@ void testDoublesNotEqualActualNaN(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(85.963, 0.0 / d_zero);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(85.963, 0.0 / d_zero);
VERIFY_FAILS_END
Expand All @@ -118,6 +136,8 @@ void testDoublesNotEqualExpectedNaN(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(0.0 / d_zero, 85.963);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(0.0 / d_zero, 85.963);
VERIFY_FAILS_END
Expand All @@ -130,6 +150,10 @@ void testDoublesEqualBothNaN(void)
TEST_IGNORE();
#else
TEST_ASSERT_EQUAL_DOUBLE(0.0 / d_zero, 0.0 / d_zero);

EXPECT_ABORT_BEGIN
TEST_ASSERT_NOT_EQUAL_DOUBLE(0.0 / d_zero, 0.0 / d_zero);
VERIFY_FAILS_END
#endif
}

Expand All @@ -138,6 +162,8 @@ void testDoublesNotEqualInfNaN(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(1.0 / d_zero, 0.0 / d_zero);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(1.0 / d_zero, 0.0 / d_zero);
VERIFY_FAILS_END
Expand All @@ -149,6 +175,8 @@ void testDoublesNotEqualNaNInf(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(0.0 / d_zero, 1.0 / d_zero);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(0.0 / d_zero, 1.0 / d_zero);
VERIFY_FAILS_END
Expand All @@ -160,6 +188,8 @@ void testDoublesNotEqualActualInf(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(321.642, 1.0 / d_zero);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(321.642, 1.0 / d_zero);
VERIFY_FAILS_END
Expand All @@ -171,6 +201,8 @@ void testDoublesNotEqualExpectedInf(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(1.0 / d_zero, 321.642);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(1.0 / d_zero, 321.642);
VERIFY_FAILS_END
Expand All @@ -183,6 +215,10 @@ void testDoublesEqualBothInf(void)
TEST_IGNORE();
#else
TEST_ASSERT_EQUAL_DOUBLE(1.0 / d_zero, 1.0 / d_zero);

EXPECT_ABORT_BEGIN
TEST_ASSERT_NOT_EQUAL_DOUBLE(1.0 / d_zero, 1.0 / d_zero);
VERIFY_FAILS_END
#endif
}

Expand All @@ -191,6 +227,8 @@ void testDoublesNotEqualPlusMinusInf(void)
#ifdef UNITY_EXCLUDE_DOUBLE
TEST_IGNORE();
#else
TEST_ASSERT_NOT_EQUAL_DOUBLE(1.0 / d_zero, -1.0 / d_zero);

EXPECT_ABORT_BEGIN
TEST_ASSERT_EQUAL_DOUBLE(1.0 / d_zero, -1.0 / d_zero);
VERIFY_FAILS_END
Expand Down
Loading

0 comments on commit 244edf6

Please sign in to comment.