Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
xcode 10 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
psharanda committed Sep 19, 2018
1 parent 293cf52 commit 4e98423
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
14 changes: 7 additions & 7 deletions AnyCoder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -395,31 +395,31 @@
TargetAttributes = {
52D6D97B1BEFF229002C0205 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
};
52D6D9851BEFF229002C0205 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
};
52D6D9E11BEFFF6E002C0205 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
};
52D6D9EF1BEFFFBE002C0205 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
};
52D6DA0E1BF000BD002C0205 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
};
DD7502791C68FCFC006590AF = {
CreatedOnToolsVersion = 7.2.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
};
DD75028C1C690C7A006590AF = {
CreatedOnToolsVersion = 7.2.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
};
};
};
Expand Down
16 changes: 6 additions & 10 deletions Tests/AnyCoderTests/AnyCoderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class AnyCoderTests: XCTestCase {

let testData = try JSONSerialization.data(withJSONObject: testJson, options: [])
let refData = try JSONSerialization.data(withJSONObject: json, options: [])
XCTAssertEqual(testData, refData)
XCTAssertEqual(try JSONSerialization.jsonObject(with: testData, options: []) as! NSDictionary, try JSONSerialization.jsonObject(with: refData, options: []) as! NSDictionary)
}
catch {
XCTFail("Unexpected error thrown: \(error)")
Expand Down Expand Up @@ -279,11 +279,7 @@ class AnyCoderTests: XCTestCase {

let testData = try JSONSerialization.data(withJSONObject: testJson, options: [.prettyPrinted])
let refData = try JSONSerialization.data(withJSONObject: json, options: [.prettyPrinted])
XCTAssertEqual(testData, refData)

print(String(data: testData, encoding: .utf8)!)
print("-------")
print(String(data: refData, encoding: .utf8)!)
XCTAssertEqual(try JSONSerialization.jsonObject(with: testData, options: []) as! NSDictionary, try JSONSerialization.jsonObject(with: refData, options: []) as! NSDictionary)
}
catch {
XCTFail("Unexpected error thrown: \(error)")
Expand Down Expand Up @@ -338,7 +334,7 @@ class AnyCoderTests: XCTestCase {

let testData = try JSONSerialization.data(withJSONObject: testJson, options: [])
let refData = try JSONSerialization.data(withJSONObject: json, options: [])
XCTAssertEqual(testData, refData)
XCTAssertEqual(try JSONSerialization.jsonObject(with: testData, options: []) as! NSDictionary, try JSONSerialization.jsonObject(with: refData, options: []) as! NSDictionary)
}
catch {
XCTFail("Unexpected error thrown: \(error)")
Expand Down Expand Up @@ -692,7 +688,7 @@ class AnyCoderTests: XCTestCase {

let testData = try! JSONSerialization.data(withJSONObject: testJson, options: [])
let refData = try! JSONSerialization.data(withJSONObject: json, options: [])
XCTAssertEqual(testData, refData)
XCTAssertEqual(try JSONSerialization.jsonObject(with: testData, options: []) as! NSDictionary, try JSONSerialization.jsonObject(with: refData, options: []) as! NSDictionary)
}

func testEncodingNullIfNilFalse() {
Expand All @@ -714,7 +710,7 @@ class AnyCoderTests: XCTestCase {

let testData = try! JSONSerialization.data(withJSONObject: testJson, options: [])
let refData = try! JSONSerialization.data(withJSONObject: json, options: [])
XCTAssertEqual(testData, refData)
XCTAssertEqual(try JSONSerialization.jsonObject(with: testData, options: []) as! NSDictionary, try JSONSerialization.jsonObject(with: refData, options: []) as! NSDictionary)
}

func testKeyPath() {
Expand Down Expand Up @@ -819,7 +815,7 @@ class AnyCoderTests: XCTestCase {

let testData = try! JSONSerialization.data(withJSONObject: testJson, options: [])
let refData = try! JSONSerialization.data(withJSONObject: json, options: [])
XCTAssertEqual(testData, refData)
XCTAssertEqual(try JSONSerialization.jsonObject(with: testData, options: []) as! NSDictionary, try JSONSerialization.jsonObject(with: refData, options: []) as! NSDictionary)
}

private lazy var data:Data = {
Expand Down

0 comments on commit 4e98423

Please sign in to comment.