Skip to content

Commit 3870091

Browse files
committed
[stdlib] Correct test for NSNumber bridging
1 parent 7443340 commit 3870091

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

test/stdlib/TestNSNumberBridging.swift

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -658,16 +658,12 @@ func testNSNumberBridgeFromUInt() {
658658
let uint = (number!) as? UInt
659659
expectEqual(UInt(exactly: interestingValue), uint)
660660

661-
// these are disabled because of https://bugs.swift.org/browse/SR-4634
662-
if uint! != UInt(UInt32.max) && uint! != UInt(UInt32.max - 1) {
663-
let float = (number!) as? Float
664-
let expectedFloat = Float(uint!)
665-
testFloat(expectedFloat, float)
666-
}
667-
668-
661+
let float = (number!) as? Float
662+
let expectedFloat = Float(exactly: uint!)
663+
testFloat(expectedFloat, float)
664+
669665
let double = (number!) as? Double
670-
let expectedDouble = Double(uint!)
666+
let expectedDouble = Double(exactly: uint!)
671667
testDouble(expectedDouble, double)
672668
}
673669
let bridged = interestingValue as NSNumber

0 commit comments

Comments
 (0)