Skip to content

Commit

Permalink
fix(*): Revert unwanted commits
Browse files Browse the repository at this point in the history
 - Revert accidently created commit from another pull-request -> tristanhimmelman#1081
  • Loading branch information
emrcftci committed May 16, 2020
1 parent fd1f2f6 commit 880ea1f
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 33 deletions.
40 changes: 22 additions & 18 deletions ObjectMapper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -728,11 +728,11 @@
};
6AAC8F7519F03C2900E7A677 = {
CreatedOnToolsVersion = 6.0.1;
LastSwiftMigration = 1120;
LastSwiftMigration = 0900;
};
6AAC8F8019F03C2900E7A677 = {
CreatedOnToolsVersion = 6.0.1;
LastSwiftMigration = 1120;
LastSwiftMigration = 0900;
};
CD1602FE1AC023D5000CD69A = {
CreatedOnToolsVersion = 6.2;
Expand Down Expand Up @@ -1108,7 +1108,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
Expand Down Expand Up @@ -1137,7 +1137,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
Expand All @@ -1156,7 +1156,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.tristanhimmelman.ObjectMapper-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
Expand All @@ -1174,7 +1174,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.tristanhimmelman.ObjectMapper-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Release;
Expand All @@ -1200,7 +1200,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
Expand Down Expand Up @@ -1228,7 +1228,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
Expand Down Expand Up @@ -1363,7 +1363,8 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.tristanhimmelman.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(PROJECT_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -1384,7 +1385,8 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.tristanhimmelman.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(PROJECT_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -1402,7 +1404,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.heart.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -1414,7 +1417,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.heart.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down Expand Up @@ -1442,7 +1446,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand Down Expand Up @@ -1470,7 +1474,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -1491,7 +1495,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.heart.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -1508,7 +1512,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.heart.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -1532,7 +1536,7 @@
PRODUCT_NAME = ObjectMapper;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -1557,7 +1561,7 @@
PRODUCT_NAME = ObjectMapper;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 2 additions & 2 deletions Tests/ObjectMapperTests/ImmutableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ class ImmutableObjectTests: XCTestCase {
XCTAssertEqual(immutable.delimiterNestedDictionary, ["a": 10, "b": 20, "c": 30])

let JSON2: [String: Any] = [ "prop1": "prop1", "prop2": NSNull() ]
let immutable2 = try? mapper.map(JSON: JSON2) as Struct
let immutable2 = try? mapper.map(JSON: JSON2)
XCTAssertNil(immutable2)

// TODO: ImmutableMappable to JSON
let JSONFromObject = mapper.toJSON(immutable)
let objectFromJSON = try? mapper.map(JSON: JSONFromObject) as Struct
let objectFromJSON = try? mapper.map(JSON: JSONFromObject)
XCTAssertNotNil(objectFromJSON)
assertImmutableObjectsEqual(objectFromJSON!, immutable)
}
Expand Down
12 changes: 6 additions & 6 deletions Tests/ObjectMapperTests/MapContextTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class MapContextTests: XCTestCase {
let JSON = ["name": "Anton"]
let context = ImmutableContext(isDeveloper: true)

let person = try? Mapper<ImmutablePerson>(context: context).map(JSON: JSON) as ImmutablePerson
let person = try? Mapper<ImmutablePerson>(context: context).map(JSON: JSON)

XCTAssertNotNil(person)

Expand All @@ -149,7 +149,7 @@ class MapContextTests: XCTestCase {
let JSON = ["name": "Anton"]
let context = ImmutableContext(isDeveloper: true)

let person = try? ImmutablePerson(JSON: JSON, context: context) as ImmutablePerson
let person = try? ImmutablePerson(JSON: JSON, context: context)

XCTAssertNotNil(person)
XCTAssertEqual(person?.isDeveloper ?? !context.isDeveloper, context.isDeveloper)
Expand All @@ -172,7 +172,7 @@ class MapContextTests: XCTestCase {
let JSON = ["person": ["name": "Anton"]]
let context = ImmutableContext(isDeveloper: true)

let nestedPerson = try? Mapper<ImmutableNestedPerson>(context: context).map(JSON: JSON) as ImmutableNestedPerson
let nestedPerson = try? Mapper<ImmutableNestedPerson>(context: context).map(JSON: JSON)

XCTAssertNotNil(nestedPerson)
XCTAssertEqual(nestedPerson?.person.isDeveloper ?? !context.isDeveloper, context.isDeveloper)
Expand All @@ -182,7 +182,7 @@ class MapContextTests: XCTestCase {
let JSON = ["person": ["name": "Anton"]]
let context = ImmutableContext(isDeveloper: true)

let nestedPerson = try? ImmutableNestedPerson(JSON: JSON, context: context) as ImmutableNestedPerson
let nestedPerson = try? ImmutableNestedPerson(JSON: JSON, context: context)

XCTAssertNotNil(nestedPerson)
XCTAssertEqual(nestedPerson?.person.isDeveloper ?? !context.isDeveloper, context.isDeveloper)
Expand All @@ -207,7 +207,7 @@ class MapContextTests: XCTestCase {
let JSON = ["persons": [["name": "Tristan"], ["name": "Anton"]]]
let context = ImmutableContext(isDeveloper: true)

let personList = try? Mapper<ImmutablePersonList>(context: context).map(JSON: JSON) as ImmutablePersonList
let personList = try? Mapper<ImmutablePersonList>(context: context).map(JSON: JSON)

XCTAssertNotNil(personList)

Expand All @@ -220,7 +220,7 @@ class MapContextTests: XCTestCase {
let JSON = ["persons": [["name": "Tristan"], ["name": "Anton"]]]
let context = ImmutableContext(isDeveloper: true)

let personList = try? ImmutablePersonList(JSON: JSON, context: context) as ImmutablePersonList
let personList = try? ImmutablePersonList(JSON: JSON, context: context)

XCTAssertNotNil(personList)

Expand Down
10 changes: 4 additions & 6 deletions Tests/ObjectMapperTests/MappableExtensionsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ struct TestMappable: Mappable, Equatable, Hashable {
mutating func mapping(map: Map) {
value <- map["value"]
}


func hash(into hasher: inout Hasher) {

var hashValue: Int {
if let value = value {
hasher.combine(value)
} else {
hasher.combine(NSIntegerMax)
return value.hashValue
}
return NSIntegerMax
}
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/ObjectMapperTests/PerformanceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class PerformanceTests: XCTestCase {

func testPerformanceImmutable() {
self.measure {
_ = try? Mapper<PerformanceImmutableMappableObject>().mapArray(JSONString: self.JSONTestString) as [PerformanceImmutableMappableObject]
_ = try? Mapper<PerformanceImmutableMappableObject>().mapArray(JSONString: self.JSONTestString)
}
}
}
Expand Down

0 comments on commit 880ea1f

Please sign in to comment.