Skip to content

Commit

Permalink
Update Swift to Swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tattn committed Sep 20, 2018
1 parent 32a3612 commit be2b4d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 6 additions & 5 deletions MoreCodable.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,12 @@
TargetAttributes = {
24A4FF3E20302322001618E1 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 0920;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
24A4FF5320302490001618E1 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -446,7 +447,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -467,7 +468,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.MoreCodable;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -481,7 +482,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.MoreCodableTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -495,7 +496,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.MoreCodableTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
11 changes: 4 additions & 7 deletions Tests/CodableDictionaryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,18 @@ class CodableDictionaryTests: XCTestCase {
func testEnumKey() {
enum Key: String, Codable, CodingKey {
case foo
case bar
}

let originalEnumKeyedDictionary: [Key: Int] = [
.foo: 100,
.bar: 200
.foo: 100
]

let enumKeyedDictionary: CodableDictionary<Key, Int> = [
.foo: 100,
.bar: 200
.foo: 100
]

let json = "{\"foo\":100,\"bar\":200}"
let unexpectedJSON = "[\"foo\",100,\"bar\",200]"
let json = "{\"foo\":100}"
let unexpectedJSON = "[\"foo\",100]"

do {
let encodedData = try! jsonEncoder.encode(originalEnumKeyedDictionary)
Expand Down

0 comments on commit be2b4d0

Please sign in to comment.