Macro

XCTAssertEqualWithAccuracy

Asserts that two expressions have the same value within a certain accuracy.

Declaration

#define XCTAssertEqualWithAccuracy(expression1, expression2, accuracy, ...)

Parameters

expression1

An expression of C scalar type.

expression2

An expression of C scalar type.

accuracy

An expression of C scalar type describing the maximum difference between expression1 and expression2 for these values to be considered equal.

...

An optional description of the failure. A literal NSString, optionally with string format specifiers.

Discussion

Generates a failure when the difference between expression1 and expression2 is greater than accuracy.

See Also

Testing for Equality Within a Given Accuracy

XCTAssertNotEqualWithAccuracy

Asserts that two expressions do not have the same value within a certain accuracy.