Description
What's the equivalents for XCTAssertEqual with accuracy in swift-testing
I do not find a Standard Library function to compare 2 Double with accuracy.
And the simplest way is we define one on client side. But I think this is a very common use case. Testing framework should support it out of box
Expected behavior
Support it directly in Testing framework the same as XCTest
Actual behavior
Write a compare(_ a: Double, _ b: Double, accuracy: Double) -> Bool by hand, and use #expect(compare(a, b, accuracy: accuracy))
Or
#expect(abs(a-b) <= accuracy)
Other consideration
Keeps using #expect(abs(a-b) <= accuracy) and add best practice suggestion to Migration documentation.
Steps to reproduce
No response
swift-testing version/commit hash
No response
Swift & OS version (output of swift --version && uname -a)
No response