Skip to content

Commit 16bf7c1

Browse files
committed
Work around CGFloat(native: ...) description on Linux
This should be removed once we get the following: swiftlang/swift-corelibs-foundation#585
1 parent a2f87fe commit 16bf7c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Tests/NimbleTests/Matchers/BeCloseToTest.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ final class BeCloseToTest: XCTestCase, XCTestCaseProvider {
5252
expect(CGFloat(1.2)).to(beCloseTo(1.2001))
5353
expect(CGFloat(1.2)).to(beCloseTo(CGFloat(1.2001)))
5454

55-
failsWithErrorMessage("expected to be close to <1.2001> (within 1), got <1.2>") {
55+
let got: String
56+
#if _runtime(_ObjC)
57+
got = "1.2"
58+
#else
59+
got = "CGFloat(native: 1.2)"
60+
#endif
61+
failsWithErrorMessage("expected to be close to <1.2001> (within 1), got <\(got)>") {
5662
expect(CGFloat(1.2)).to(beCloseTo(1.2001, within: 1.0))
5763
}
5864
}

0 commit comments

Comments
 (0)