Skip to content

Commit 457ac3d

Browse files
committed
fix test for latest MacOS Swift versions
1 parent 83cf5bb commit 457ac3d

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

Tests/JSONAPITests/SparseFields/SparseFieldEncoderTests.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,9 @@ class SparseFieldEncoderTests: XCTestCase {
4343
XCTAssertEqual(allThingsOnDeserialized["bool"] as? Bool, true)
4444
XCTAssertEqual(allThingsOnDeserialized["double"] as? Double, 10.5)
4545
XCTAssertEqual(allThingsOnDeserialized["string"] as? String, "hello")
46-
#if os(Linux)
47-
// There's some bug with Linux where it won't case the value to a float.
48-
// It does exist and it is == 1.2
46+
// For latest versions of MacOS and all versions of Linux, floats
47+
// decode as doubles.
4948
XCTAssertEqual(allThingsOnDeserialized["float"] as? Double, 1.2)
50-
#else
51-
XCTAssertEqual(allThingsOnDeserialized["float"] as? Float, 1.2)
52-
#endif
5349
XCTAssertEqual(allThingsOnDeserialized["int"] as? Int, 3)
5450
XCTAssertEqual(allThingsOnDeserialized["int8"] as? Int8, 4)
5551
XCTAssertEqual(allThingsOnDeserialized["int16"] as? Int16, 5)

0 commit comments

Comments
 (0)