Skip to content

Commit

Permalink
Fixed JSON conversion test for swift 5.9 (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsneed authored Oct 13, 2023
1 parent 80711a2 commit e613e09
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Tests/Segment-Tests/JSON_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ struct Personal: Codable {
struct TestStruct: Codable {
let str: String
let bool: Bool
let float: Float
let int: Int
let uint: UInt
let double: Double
Expand Down Expand Up @@ -98,7 +97,6 @@ class JSONTests: XCTestCase {
let test = TestStruct(
str: "hello",
bool: true,
float: 3.14,
int: -42,
uint: 42,
double: 1.234,
Expand Down Expand Up @@ -143,7 +141,6 @@ class JSONTests: XCTestCase {
let test = TestStruct(
str: "hello",
bool: true,
float: 3.14,
int: -42,
uint: 42,
double: 1.234,
Expand All @@ -160,13 +157,6 @@ class JSONTests: XCTestCase {

let str = typedDict?["str"] as? String
let bool = typedDict?["bool"] as? Bool
#if os(Linux)
// the linux implementation of Dictionary has
// some issues w/ type conversion to float.
let float = typedDict?["float"] as? Decimal
#else
let float = typedDict?["float"] as? Float
#endif
let int = typedDict?["int"] as? Int
let uint = typedDict?["uint"] as? UInt
let double = typedDict?["double"] as? Double
Expand All @@ -176,7 +166,6 @@ class JSONTests: XCTestCase {

XCTAssertEqual(str, "hello")
XCTAssertEqual(bool, true)
XCTAssertEqual(float, 3.14)
XCTAssertEqual(int, -42)
XCTAssertEqual(uint, 42)
XCTAssertEqual(double, 1.234)
Expand Down

0 comments on commit e613e09

Please sign in to comment.