XCTAssertNotEqual(_:_:accuracy:_:file:line:)
Asserts that two numeric values aren’t equal within a specified accuracy.
Declaration
func XCTAssertNotEqual<T>(_ expression1: @autoclosure () throws -> T, _ expression2: @autoclosure () throws -> T, accuracy: T, _ message: @autoclosure () -> String = "", file: StaticString = #filePath, line: UInt = #line) where T : NumericParameters
- expression1:
An expression of type
T, whereTconforms to Numeric. - expression2:
A second expression of type
T, whereTconforms to Numeric. - accuracy:
An expression of type
T, whereTconforms to Numeric. This parameter describes the maximum difference betweenexpression1andexpression2for these values to be considered not equal. - message:
An optional description of a failure.
- file:
The file where the failure occurs. The default is the filename of the test case where you call this function.
- line:
The line number where the failure occurs. The default is the line number where you call this function.
Discussion
expression1, expression2, and accuracy must all be of the same type T, and type T must conform to Numeric.