From 749e0fc1d99de0bdb4a4bac12b7af541510018c0 Mon Sep 17 00:00:00 2001 From: Ben Wetherfield Date: Mon, 15 Jul 2019 14:54:01 -0700 Subject: [PATCH 01/34] Add testing preliminaries for choice elements Add benchmark baselines Pull in tests (#11) Add Decoding support for choice elements (#15) Fix indentation (#16) Replace usage of XCTUnrwap (#19) Add nested choice tests (#18) Add falsely passing double array roundtrip test (#17) --- .../Auxiliaries/Box/SingleElementBox.swift | 24 + .../Auxiliaries/XMLCoderElement.swift | 11 +- .../XMLCoder/Auxiliaries/XMLStackParser.swift | 2 +- .../Decoder/XMLDecoderImplementation.swift | 23 +- .../XMLCoderTests/CompositeChoiceTests.swift | 86 + .../XMLCoderTests/Minimal/BoxTreeTests.swift | 15 +- Tests/XMLCoderTests/NestedChoiceTests.swift | 250 ++ Tests/XMLCoderTests/SimpleChoiceTests.swift | 111 + XMLCoder.xcodeproj/project.pbxproj | 2777 +++++++++++------ .../xcshareddata/IDEWorkspaceChecks.plist | 8 - ...76E090BF-7AFE-4988-A06A-3C423396A4A4.plist | 245 -- .../Info.plist | 33 - ...der.xcscheme => XMLCoder-Package.xcscheme} | 0 .../xcschemes/xcschememanagement.plist | 12 - 14 files changed, 2323 insertions(+), 1274 deletions(-) create mode 100644 Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift create mode 100644 Tests/XMLCoderTests/CompositeChoiceTests.swift create mode 100644 Tests/XMLCoderTests/NestedChoiceTests.swift create mode 100644 Tests/XMLCoderTests/SimpleChoiceTests.swift delete mode 100644 XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist delete mode 100644 XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist rename XMLCoder.xcodeproj/xcshareddata/xcschemes/{XMLCoder.xcscheme => XMLCoder-Package.xcscheme} (100%) delete mode 100644 XMLCoder.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist diff --git a/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift b/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift new file mode 100644 index 00000000..9e64fd69 --- /dev/null +++ b/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift @@ -0,0 +1,24 @@ +// +// SingleElementBox.swift +// XMLCoder +// +// Created by James Bean on 7/15/19. +// + +/// A `Box` which contains a single `key` and `element` pair. This is useful for disambiguating elements which could either represent +/// an element nested in a keyed or unkeyed container, or an choice between multiple known-typed values (implemented in Swift using +/// enums with associated values). +struct SingleElementBox: SimpleBox { + let key: String + let element: Box +} + +extension SingleElementBox: Box { + var isNull: Bool { + return false + } + + func xmlString() -> String? { + return nil + } +} diff --git a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift index acc800a8..0f75bab6 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift @@ -51,7 +51,10 @@ struct XMLCoderElement: Equatable { elements.append(element) } - func transformToBoxTree() -> KeyedBox { + func transformToBoxTree() -> Box { + if let value = value, self.attributes.isEmpty, self.elements.isEmpty { + return SingleElementBox(key: key, element: StringBox(value)) + } let attributes = KeyedStorage(self.attributes.map { attribute in (key: attribute.key, value: StringBox(attribute.value) as SimpleBox) }) @@ -63,9 +66,7 @@ struct XMLCoderElement: Equatable { if elements.isEmpty, let value = value { elements.append(StringBox(value), at: "value") } - let keyedBox = KeyedBox(elements: elements, attributes: attributes) - - return keyedBox + return KeyedBox(elements: elements, attributes: attributes) } func toXMLString(with header: XMLHeader? = nil, @@ -104,7 +105,7 @@ struct XMLCoderElement: Equatable { ) -> String { var string = "" string += element._toXMLString( - indented: level + 1, withCDATA: cdata, formatting: formatting + indented: level, withCDATA: cdata, formatting: formatting ) string += prettyPrinted ? "\n" : "" return string diff --git a/Sources/XMLCoder/Auxiliaries/XMLStackParser.swift b/Sources/XMLCoder/Auxiliaries/XMLStackParser.swift index 7d4aae16..e020984b 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLStackParser.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLStackParser.swift @@ -23,7 +23,7 @@ class XMLStackParser: NSObject { errorContextLength length: UInt, shouldProcessNamespaces: Bool, trimValueWhitespaces: Bool - ) throws -> KeyedBox { + ) throws -> Box { let parser = XMLStackParser(trimValueWhitespaces: trimValueWhitespaces) let node = try parser.parse( diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index fe237eba..5ce3d2cb 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -138,9 +138,10 @@ class XMLDecoderImplementation: Decoder { case let unkeyed as SharedBox: return XMLUnkeyedDecodingContainer(referencing: self, wrapping: unkeyed) case let keyed as SharedBox: - guard let firstKey = keyed.withShared({ $0.elements.keys.first }) else { fallthrough } - - return XMLUnkeyedDecodingContainer(referencing: self, wrapping: SharedBox(keyed.withShared { $0.elements[firstKey] })) + return XMLUnkeyedDecodingContainer( + referencing: self, + wrapping: SharedBox(keyed.withShared { $0.elements.map(SingleElementBox.init) }) + ) default: throw DecodingError.typeMismatch( at: codingPath, @@ -372,6 +373,20 @@ extension XMLDecoderImplementation { return urlBox.unboxed } + func unbox(_ box: SingleElementBox) throws -> T { + do { + return try unbox(box.element) + } catch { + // FIXME: Find a more economical way to unbox a `SingleElementBox` ! + return try unbox( + KeyedBox( + elements: KeyedStorage([(box.key, box.element)]), + attributes: [] + ) + ) + } + } + func unbox(_ box: Box) throws -> T { let decoded: T? let type = T.self @@ -392,6 +407,8 @@ extension XMLDecoderImplementation { type == String.self || type == NSString.self, let value = (try unbox(box) as String) as? T { decoded = value + } else if let singleElementBox = box as? SingleElementBox { + decoded = try unbox(singleElementBox) } else { storage.push(container: box) defer { diff --git a/Tests/XMLCoderTests/CompositeChoiceTests.swift b/Tests/XMLCoderTests/CompositeChoiceTests.swift new file mode 100644 index 00000000..757ca42a --- /dev/null +++ b/Tests/XMLCoderTests/CompositeChoiceTests.swift @@ -0,0 +1,86 @@ +// +// CompositeChoiceTests.swift +// XMLCoderTests +// +// Created by James Bean on 7/15/19. +// + +import XCTest +import XMLCoder + +private struct IntWrapper: Codable, Equatable { + let wrapped: Int +} + +private struct StringWrapper: Codable, Equatable { + let wrapped: String +} + +private enum IntOrStringWrapper: Equatable { + case int(IntWrapper) + case string(StringWrapper) +} + +extension IntOrStringWrapper: Codable { + enum CodingKeys: String, CodingKey { + case int + case string + } + + init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + do { + self = .int(try container.decode(IntWrapper.self, forKey: .int)) + } catch { + self = .string(try container.decode(StringWrapper.self, forKey: .string)) + } + } + + func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + switch self { + case let .int(value): + try container.encode(value, forKey: .int) + case let .string(value): + try container.encode(value, forKey: .string) + } + } +} + +class CompositeChoiceTests: XCTestCase { + func testIntOrStringWrapper() throws { + let xml = """ + + + A Word About Woke Times + + + """ + let result = try XMLDecoder().decode(IntOrStringWrapper.self, from: xml.data(using: .utf8)!) + let expected = IntOrStringWrapper.string(StringWrapper(wrapped: "A Word About Woke Times")) + XCTAssertEqual(result, expected) + } + + func testArrayOfIntOrStringWrappers() throws { + let xml = """ + + + A Word About Woke Times + + + 9000 + + + A Word About Woke Tomes + + + """ + let result = try XMLDecoder().decode([IntOrStringWrapper].self, from: xml.data(using: .utf8)!) + let expected: [IntOrStringWrapper] = [ + .string(StringWrapper(wrapped: "A Word About Woke Times")), + .int(IntWrapper(wrapped: 9000)), + .string(StringWrapper(wrapped: "A Word About Woke Tomes")), + ] + XCTAssertEqual(result, expected) + } +} diff --git a/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift b/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift index 350c15c5..6dda3c6c 100644 --- a/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift +++ b/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift @@ -9,7 +9,7 @@ import XCTest @testable import XMLCoder class BoxTreeTests: XCTestCase { - func testNestedValues() { + func testNestedValues() throws { let e1 = XMLCoderElement( key: "foo", value: "456", @@ -29,18 +29,11 @@ class BoxTreeTests: XCTestCase { attributes: [] ) - let boxTree = root.transformToBoxTree() - - guard let foo = boxTree.elements["foo"] as? UnkeyedBox else { - XCTAssert( - false, - """ - flattened.elements["foo"] is not an UnkeyedBox - """ - ) + guard let boxTree = root.transformToBoxTree() as? KeyedBox else { + XCTFail("boxtTree is not a KeyedBox") return } - + let foo = boxTree.elements["foo"] XCTAssertEqual(foo.count, 2) } } diff --git a/Tests/XMLCoderTests/NestedChoiceTests.swift b/Tests/XMLCoderTests/NestedChoiceTests.swift new file mode 100644 index 00000000..c834920d --- /dev/null +++ b/Tests/XMLCoderTests/NestedChoiceTests.swift @@ -0,0 +1,250 @@ +// +// NestedChoiceTests.swift +// XMLCoderTests +// +// Created by James Bean on 7/15/19. +// + +import XCTest +import XMLCoder + +private struct Container: Equatable { + let paragraphs: [Paragraph] +} + +private struct Paragraph: Equatable { + let entries: [Entry] +} + +private enum Entry: Equatable { + case run(Run) + case properties(Properties) + case br(Break) +} + +private struct Run: Codable, Equatable { + let id: Int + let text: String +} + +private struct Properties: Codable, Equatable { + let id: Int + let title: String +} + +private struct Break: Codable, Equatable {} + +extension Container: Codable { + enum CodingKeys: String, CodingKey { + case paragraphs = "p" + } +} + +extension Paragraph: Codable { + init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + entries = try container.decode([Entry].self) + } + + func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + try container.encode(entries) + } +} + +extension Entry: XMLChoiceCodable { + private enum CodingKeys: String, CodingKey { + case run, properties, br + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + do { + self = .run(try container.decode(Run.self, forKey: .run)) + } catch DecodingError.keyNotFound { + do { + self = .properties(try container.decode(Properties.self, forKey: .properties)) + } catch DecodingError.keyNotFound { + self = .br(try container.decode(Break.self, forKey: .br)) + } + } + } + + func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + switch self { + case let .run(value): + try container.encode(value, forKey: .run) + case let .properties(value): + try container.encode(value, forKey: .properties) + case let .br(value): + try container.encode(value, forKey: .br) + } + } +} + +class NestedChoiceTests: XCTestCase { + func testBreakDecoding() throws { + let xml = "

" + let result = try XMLDecoder().decode(Break.self, from: xml.data(using: .utf8)!) + let expected = Break() + XCTAssertEqual(result, expected) + } + + func testPropertiesDecoding() throws { + let xml = """ + + 431 + A Word About Wake Times + + """ + let result = try XMLDecoder().decode(Properties.self, from: xml.data(using: .utf8)!) + let expected = Properties(id: 431, title: "A Word About Wake Times") + XCTAssertEqual(result, expected) + } + + func testPropertiesAsEntryDecoding() throws { + let xml = """ + + + 431 + A Word About Wake Times + + + """ + let result = try XMLDecoder().decode(Entry.self, from: xml.data(using: .utf8)!) + let expected: Entry = .properties(Properties(id: 431, title: "A Word About Wake Times")) + XCTAssertEqual(result, expected) + } + + func testRunDecoding() throws { + let xml = """ + + 1518 + I am answering it again. + + """ + let result = try XMLDecoder().decode(Run.self, from: xml.data(using: .utf8)!) + let expected = Run(id: 1518, text: "I am answering it again.") + XCTAssertEqual(result, expected) + } + + func testRunAsEntryDecoding() throws { + let xml = """ + + + 1518 + I am answering it again. + + + """ + let result = try XMLDecoder().decode(Entry.self, from: xml.data(using: .utf8)!) + let expected = Entry.run(Run(id: 1518, text: "I am answering it again.")) + XCTAssertEqual(result, expected) + } + + func testEntriesDecoding() throws { + let xml = """ + + + 1518 + I am answering it again. + + + 431 + A Word About Wake Times + + + """ + let result = try XMLDecoder().decode([Entry].self, from: xml.data(using: .utf8)!) + let expected: [Entry] = [ + .run(Run(id: 1518, text: "I am answering it again.")), + .properties(Properties(id: 431, title: "A Word About Wake Times")), + ] + XCTAssertEqual(result, expected) + } + + func testParagraphDecoding() throws { + let xml = """ +

+ + 1518 + I am answering it again. + + + 431 + A Word About Wake Times + +

+ """ + let result = try XMLDecoder().decode(Paragraph.self, from: xml.data(using: .utf8)!) + let expected = Paragraph( + entries: [ + .run(Run(id: 1518, text: "I am answering it again.")), + .properties(Properties(id: 431, title: "A Word About Wake Times")), + ] + ) + XCTAssertEqual(result, expected) + } + + func testNestedEnums() throws { + let xml = """ + +

+ + 1518 + I am answering it again. + + + 431 + A Word About Wake Times + +

+

+ + 1519 + I am answering it again. + +

+
+ """ + let result = try XMLDecoder().decode(Container.self, from: xml.data(using: .utf8)!) + let expected = Container( + paragraphs: [ + Paragraph( + entries: [ + .run(Run(id: 1518, text: "I am answering it again.")), + .properties(Properties(id: 431, title: "A Word About Wake Times")), + ] + ), + Paragraph( + entries: [ + .run(Run(id: 1519, text: "I am answering it again.")), + ] + ), + ] + ) + XCTAssertEqual(result, expected) + } + + func testNestedEnumsRoundTrip() throws { + let original = Container( + paragraphs: [ + Paragraph( + entries: [ + .run(Run(id: 1518, text: "I am answering it again.")), + .properties(Properties(id: 431, title: "A Word About Wake Times")), + ] + ), + Paragraph( + entries: [ + .run(Run(id: 1519, text: "I am answering it again.")), + ] + ), + ] + ) + let encoded = try XMLEncoder().encode(original, withRootKey: "container") + let decoded = try XMLDecoder().decode(Container.self, from: encoded) + XCTAssertEqual(decoded, original) + } +} diff --git a/Tests/XMLCoderTests/SimpleChoiceTests.swift b/Tests/XMLCoderTests/SimpleChoiceTests.swift new file mode 100644 index 00000000..68f034aa --- /dev/null +++ b/Tests/XMLCoderTests/SimpleChoiceTests.swift @@ -0,0 +1,111 @@ +// +// SimpleChoiceTests.swift +// XMLCoderTests +// +// Created by James Bean on 7/15/19. +// + +import XCTest +import XMLCoder + +private enum IntOrString: Equatable { + case int(Int) + case string(String) +} + +extension IntOrString: Codable { + enum CodingKeys: String, CodingKey { + case int + case string + } + + func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + switch self { + case let .int(value): + try container.encode(value, forKey: .int) + case let .string(value): + try container.encode(value, forKey: .string) + } + } + + init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + do { + self = .int(try container.decode(Int.self, forKey: .int)) + } catch { + self = .string(try container.decode(String.self, forKey: .string)) + } + } +} + +class SimpleChoiceTests: XCTestCase { + func testIntOrStringIntDecoding() throws { + let xml = "42" + let result = try XMLDecoder().decode(IntOrString.self, from: xml.data(using: .utf8)!) + let expected = IntOrString.int(42) + XCTAssertEqual(result, expected) + } + + func testIntOrStringStringDecoding() throws { + let xml = "forty-two" + let result = try XMLDecoder().decode(IntOrString.self, from: xml.data(using: .utf8)!) + let expected = IntOrString.string("forty-two") + XCTAssertEqual(result, expected) + } + + func testIntOrStringArrayDecoding() throws { + let xml = """ + + 1 + two + three + 4 + 5 + + """ + let result = try XMLDecoder().decode([IntOrString].self, from: xml.data(using: .utf8)!) + let expected: [IntOrString] = [ + .int(1), + .string("two"), + .string("three"), + .int(4), + .int(5), + ] + XCTAssertEqual(result, expected) + } + + func testIntOrStringRoundTrip() throws { + let original = IntOrString.int(5) + let encoded = try XMLEncoder().encode(original, withRootKey: "container") + let decoded = try XMLDecoder().decode(IntOrString.self, from: encoded) + XCTAssertEqual(original, decoded) + } + + func testIntOrStringArrayRoundTrip() throws { + let original: [IntOrString] = [ + .int(1), + .string("two"), + .string("three"), + .int(4), + .int(5), + ] + let encoded = try XMLEncoder().encode(original, withRootKey: "container") + let decoded = try XMLDecoder().decode([IntOrString].self, from: encoded) + XCTAssertEqual(original, decoded) + } + + func testIntOrStringDoubleArrayRoundTrip() throws { + let original: [[IntOrString]] = [[ + .int(1), + .string("two"), + .string("three"), + .int(4), + .int(5), + ]] + let encoded = try XMLEncoder().encode(original, withRootKey: "container") + print(String(data: encoded, encoding: .utf8)) + let decoded = try XMLDecoder().decode([[IntOrString]].self, from: encoded) + XCTAssertEqual(original, decoded) + } +} diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index 36d664e7..e374a305 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -1,959 +1,1824 @@ // !$*UTF8*$! { - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXAggregateTarget section */ - "XMLCoder::XMLCoderPackageTests::ProductTarget" /* XMLCoderPackageTests */ = { - isa = PBXAggregateTarget; - buildConfigurationList = OBJ_70 /* Build configuration list for PBXAggregateTarget "XMLCoderPackageTests" */; - buildPhases = ( - ); - dependencies = ( - OBJ_73 /* PBXTargetDependency */, - ); - name = XMLCoderPackageTests; - productName = XMLCoderPackageTests; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - A61DCCD821DF9CA200C0A19D /* ClassTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A61DCCD621DF8DB300C0A19D /* ClassTests.swift */; }; - A61FE03921E4D60B0015D993 /* UnkeyedIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A61FE03721E4D4F10015D993 /* UnkeyedIntTests.swift */; }; - A61FE03C21E4EAB10015D993 /* KeyedIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A61FE03A21E4EA8B0015D993 /* KeyedIntTests.swift */; }; - B34B3C08220381AC00BCBA30 /* String+ExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34B3C07220381AB00BCBA30 /* String+ExtensionsTests.swift */; }; - B35157CE21F986DD009CA0CC /* DynamicNodeEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35157CD21F986DD009CA0CC /* DynamicNodeEncoding.swift */; }; - B3B6902E220A71DF0084D407 /* AttributedIntrinsicTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B6902D220A71DF0084D407 /* AttributedIntrinsicTest.swift */; }; - B3BE1D612202C1F600259831 /* DynamicNodeEncodingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3BE1D602202C1F600259831 /* DynamicNodeEncodingTest.swift */; }; - B3BE1D632202CB1400259831 /* XMLEncoderImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3BE1D622202CB1400259831 /* XMLEncoderImplementation.swift */; }; - B3BE1D652202CB7200259831 /* SingleValueEncodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3BE1D642202CB7200259831 /* SingleValueEncodingContainer.swift */; }; - B3BE1D682202CBF800259831 /* XMLDecoderImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3BE1D662202CBF800259831 /* XMLDecoderImplementation.swift */; }; - B3BE1D692202CBF800259831 /* SingleValueDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3BE1D672202CBF800259831 /* SingleValueDecodingContainer.swift */; }; - BF63EF0021CCDED2001D38C5 /* XMLStackParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EEFF21CCDED2001D38C5 /* XMLStackParserTests.swift */; }; - BF63EF0621CD7A74001D38C5 /* URLBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF0521CD7A74001D38C5 /* URLBox.swift */; }; - BF63EF0821CD7AF8001D38C5 /* URLBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF0721CD7AF8001D38C5 /* URLBoxTests.swift */; }; - BF63EF0A21CD7C1A001D38C5 /* URLTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF0921CD7C1A001D38C5 /* URLTests.swift */; }; - BF63EF0C21CD7F28001D38C5 /* EmptyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF0B21CD7F28001D38C5 /* EmptyTests.swift */; }; - BF63EF1821CEB6BD001D38C5 /* SharedBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF1721CEB6BD001D38C5 /* SharedBox.swift */; }; - BF63EF1E21CEC99B001D38C5 /* BenchmarkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF1D21CEC99A001D38C5 /* BenchmarkTests.swift */; }; - BF63EF6721D0F874001D38C5 /* XMLKeyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF6621D0F874001D38C5 /* XMLKeyTests.swift */; }; - BF63EF6921D0FDB5001D38C5 /* XMLHeaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF6821D0FDB5001D38C5 /* XMLHeaderTests.swift */; }; - BF63EF6B21D10284001D38C5 /* XMLElementTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF63EF6A21D10284001D38C5 /* XMLElementTests.swift */; }; - BF8171D021D3B1BD00901EB0 /* DecodingContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF8171CF21D3B1BD00901EB0 /* DecodingContainerTests.swift */; }; - BF8171F221D3D03E00901EB0 /* SharedBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF8171F121D3D03E00901EB0 /* SharedBoxTests.swift */; }; - BF9457A821CBB498005ACFDE /* NullBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF94579E21CBB497005ACFDE /* NullBox.swift */; }; - BF9457A921CBB498005ACFDE /* KeyedBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF94579F21CBB497005ACFDE /* KeyedBox.swift */; }; - BF9457AA21CBB498005ACFDE /* UnkeyedBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457A021CBB497005ACFDE /* UnkeyedBox.swift */; }; - BF9457AB21CBB498005ACFDE /* DecimalBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457A121CBB497005ACFDE /* DecimalBox.swift */; }; - BF9457AD21CBB498005ACFDE /* BoolBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457A321CBB497005ACFDE /* BoolBox.swift */; }; - BF9457AE21CBB498005ACFDE /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457A421CBB497005ACFDE /* Box.swift */; }; - BF9457AF21CBB498005ACFDE /* StringBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457A521CBB498005ACFDE /* StringBox.swift */; }; - BF9457B721CBB4DB005ACFDE /* XMLHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457B121CBB4DB005ACFDE /* XMLHeader.swift */; }; - BF9457B821CBB4DB005ACFDE /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457B221CBB4DB005ACFDE /* String+Extensions.swift */; }; - BF9457B921CBB4DB005ACFDE /* XMLStackParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457B321CBB4DB005ACFDE /* XMLStackParser.swift */; }; - BF9457BA21CBB4DB005ACFDE /* ISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457B421CBB4DB005ACFDE /* ISO8601DateFormatter.swift */; }; - BF9457BB21CBB4DB005ACFDE /* XMLKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457B521CBB4DB005ACFDE /* XMLKey.swift */; }; - BF9457BC21CBB4DB005ACFDE /* XMLCoderElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457B621CBB4DB005ACFDE /* XMLCoderElement.swift */; }; - BF9457C821CBB516005ACFDE /* BoolBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457BE21CBB516005ACFDE /* BoolBoxTests.swift */; }; - BF9457C921CBB516005ACFDE /* KeyedBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457BF21CBB516005ACFDE /* KeyedBoxTests.swift */; }; - BF9457CB21CBB516005ACFDE /* DecimalBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457C121CBB516005ACFDE /* DecimalBoxTests.swift */; }; - BF9457CC21CBB516005ACFDE /* NullBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457C221CBB516005ACFDE /* NullBoxTests.swift */; }; - BF9457CD21CBB516005ACFDE /* FloatBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457C321CBB516005ACFDE /* FloatBoxTests.swift */; }; - BF9457CE21CBB516005ACFDE /* StringBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457C421CBB516005ACFDE /* StringBoxTests.swift */; }; - BF9457CF21CBB516005ACFDE /* IntBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457C521CBB516005ACFDE /* IntBoxTests.swift */; }; - BF9457D021CBB516005ACFDE /* UIntBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457C621CBB516005ACFDE /* UIntBoxTests.swift */; }; - BF9457D121CBB516005ACFDE /* UnkeyedBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457C721CBB516005ACFDE /* UnkeyedBoxTests.swift */; }; - BF9457D521CBB59E005ACFDE /* UIntBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457D221CBB59D005ACFDE /* UIntBox.swift */; }; - BF9457D621CBB59E005ACFDE /* FloatBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457D321CBB59D005ACFDE /* FloatBox.swift */; }; - BF9457D721CBB59E005ACFDE /* IntBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457D421CBB59D005ACFDE /* IntBox.swift */; }; - BF9457DA21CBB5D2005ACFDE /* DataBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457D821CBB5D2005ACFDE /* DataBox.swift */; }; - BF9457DB21CBB5D2005ACFDE /* DateBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457D921CBB5D2005ACFDE /* DateBox.swift */; }; - BF9457DD21CBB62C005ACFDE /* DateBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457DC21CBB62C005ACFDE /* DateBoxTests.swift */; }; - BF9457E021CBB68A005ACFDE /* DataBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457DE21CBB683005ACFDE /* DataBoxTests.swift */; }; - BF9457ED21CBB6BC005ACFDE /* BoolTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457E221CBB6BC005ACFDE /* BoolTests.swift */; }; - BF9457EE21CBB6BC005ACFDE /* IntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457E321CBB6BC005ACFDE /* IntTests.swift */; }; - BF9457EF21CBB6BC005ACFDE /* NullTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457E421CBB6BC005ACFDE /* NullTests.swift */; }; - BF9457F021CBB6BC005ACFDE /* StringTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457E521CBB6BC005ACFDE /* StringTests.swift */; }; - BF9457F121CBB6BC005ACFDE /* FloatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457E621CBB6BC005ACFDE /* FloatTests.swift */; }; - BF9457F221CBB6BC005ACFDE /* UnkeyedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457E721CBB6BC005ACFDE /* UnkeyedTests.swift */; }; - BF9457F321CBB6BC005ACFDE /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457E821CBB6BC005ACFDE /* DateTests.swift */; }; - BF9457F421CBB6BC005ACFDE /* UIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457E921CBB6BC005ACFDE /* UIntTests.swift */; }; - BF9457F521CBB6BC005ACFDE /* DecimalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457EA21CBB6BC005ACFDE /* DecimalTests.swift */; }; - BF9457F621CBB6BC005ACFDE /* KeyedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457EB21CBB6BC005ACFDE /* KeyedTests.swift */; }; - BF9457F721CBB6BC005ACFDE /* DataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9457EC21CBB6BC005ACFDE /* DataTests.swift */; }; - D11815C1227788C8008836E4 /* SpacePreserveTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D11815BF227788BA008836E4 /* SpacePreserveTest.swift */; }; - D14D8A8621F1D6B300B0D31A /* SingleChildTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D14D8A8521F1D6B300B0D31A /* SingleChildTests.swift */; }; - D158F12F2229892C0032B449 /* DynamicNodeDecoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D158F12E2229892C0032B449 /* DynamicNodeDecoding.swift */; }; - D162674321F9B2AF0056D1D8 /* OptionalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D162674121F9B2850056D1D8 /* OptionalTests.swift */; }; - D1761D1F2247F04500F53CEF /* DynamicNodeDecodingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1761D1E2247F04500F53CEF /* DynamicNodeDecodingTest.swift */; }; - D1A3D4AD227AD9BF00F28969 /* KeyDecodingAndEncodingStrategyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1A3D4AB227AD9BC00F28969 /* KeyDecodingAndEncodingStrategyTests.swift */; }; - D1AC9466224E3E63004AB49B /* AttributedEnumIntrinsicTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1AC9464224E3E1F004AB49B /* AttributedEnumIntrinsicTest.swift */; }; - D1B6A2C22297EF6F005B8A6E /* BorderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1B6A2C02297EF5A005B8A6E /* BorderTest.swift */; }; - D1CAD3622293FAB80077901D /* MixedContainerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CAD3612293FAB80077901D /* MixedContainerTest.swift */; }; - D1CB1EF521EA9599009CAF02 /* RJITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_37 /* RJITest.swift */; }; - D1CFC8242226B13F00B03222 /* NamespaceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CFC8222226AFB400B03222 /* NamespaceTest.swift */; }; - D1D50D3122942EAE007098FC /* NestingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1D50D3022942EAE007098FC /* NestingTests.swift */; }; - D1E0C85321D8E65E0042A261 /* ErrorContextTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1E0C85121D8E6540042A261 /* ErrorContextTest.swift */; }; - D1E0C85521D91EBF0042A261 /* Metatypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1E0C85421D91EBF0042A261 /* Metatypes.swift */; }; - D1EC3E62225A32F500C610E3 /* BoxTreeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1EC3E61225A32F500C610E3 /* BoxTreeTests.swift */; }; - D1EC3E65225A38EC00C610E3 /* KeyedStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1EC3E64225A38EC00C610E3 /* KeyedStorage.swift */; }; - D1FC040521C7EF8200065B43 /* RJISample.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1FC040421C7EF8200065B43 /* RJISample.swift */; }; - OBJ_48 /* DecodingErrorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* DecodingErrorExtension.swift */; }; - OBJ_49 /* XMLDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* XMLDecoder.swift */; }; - OBJ_50 /* XMLDecodingStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* XMLDecodingStorage.swift */; }; - OBJ_51 /* XMLKeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* XMLKeyedDecodingContainer.swift */; }; - OBJ_52 /* XMLUnkeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* XMLUnkeyedDecodingContainer.swift */; }; - OBJ_53 /* EncodingErrorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* EncodingErrorExtension.swift */; }; - OBJ_54 /* XMLEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* XMLEncoder.swift */; }; - OBJ_55 /* XMLEncodingStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_18 /* XMLEncodingStorage.swift */; }; - OBJ_56 /* XMLKeyedEncodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* XMLKeyedEncodingContainer.swift */; }; - OBJ_57 /* XMLReferencingEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_20 /* XMLReferencingEncoder.swift */; }; - OBJ_58 /* XMLUnkeyedEncodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_21 /* XMLUnkeyedEncodingContainer.swift */; }; - OBJ_68 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; - OBJ_80 /* BooksTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_28 /* BooksTest.swift */; }; - OBJ_81 /* BreakfastTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_29 /* BreakfastTest.swift */; }; - OBJ_82 /* CDCatalog.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_30 /* CDCatalog.swift */; }; - OBJ_83 /* CDTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_31 /* CDTest.swift */; }; - OBJ_85 /* NodeEncodingStrategyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_33 /* NodeEncodingStrategyTests.swift */; }; - OBJ_86 /* NoteTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_34 /* NoteTest.swift */; }; - OBJ_87 /* PlantCatalog.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_35 /* PlantCatalog.swift */; }; - OBJ_88 /* PlantTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_36 /* PlantTest.swift */; }; - OBJ_90 /* RelationshipsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_38 /* RelationshipsTest.swift */; }; - OBJ_92 /* XMLCoder.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - D1FC040221C7ED2300065B43 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = OBJ_1 /* Project object */; - proxyType = 1; - remoteGlobalIDString = "XMLCoder::XMLCoder"; - remoteInfo = XMLCoder; - }; - D1FC040321C7EF2300065B43 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = OBJ_1 /* Project object */; - proxyType = 1; - remoteGlobalIDString = "XMLCoder::XMLCoderTests"; - remoteInfo = XMLCoderTests; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - A61DCCD621DF8DB300C0A19D /* ClassTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassTests.swift; sourceTree = ""; }; - A61FE03721E4D4F10015D993 /* UnkeyedIntTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnkeyedIntTests.swift; sourceTree = ""; }; - A61FE03A21E4EA8B0015D993 /* KeyedIntTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyedIntTests.swift; sourceTree = ""; }; - B34B3C07220381AB00BCBA30 /* String+ExtensionsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+ExtensionsTests.swift"; sourceTree = ""; }; - B35157CD21F986DD009CA0CC /* DynamicNodeEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicNodeEncoding.swift; sourceTree = ""; }; - B3B6902D220A71DF0084D407 /* AttributedIntrinsicTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttributedIntrinsicTest.swift; sourceTree = ""; }; - B3BE1D602202C1F600259831 /* DynamicNodeEncodingTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DynamicNodeEncodingTest.swift; sourceTree = ""; }; - B3BE1D622202CB1400259831 /* XMLEncoderImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLEncoderImplementation.swift; sourceTree = ""; }; - B3BE1D642202CB7200259831 /* SingleValueEncodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleValueEncodingContainer.swift; sourceTree = ""; }; - B3BE1D662202CBF800259831 /* XMLDecoderImplementation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLDecoderImplementation.swift; sourceTree = ""; }; - B3BE1D672202CBF800259831 /* SingleValueDecodingContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SingleValueDecodingContainer.swift; sourceTree = ""; }; - BF63EEFF21CCDED2001D38C5 /* XMLStackParserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLStackParserTests.swift; sourceTree = ""; }; - BF63EF0521CD7A74001D38C5 /* URLBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLBox.swift; sourceTree = ""; }; - BF63EF0721CD7AF8001D38C5 /* URLBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLBoxTests.swift; sourceTree = ""; }; - BF63EF0921CD7C1A001D38C5 /* URLTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLTests.swift; sourceTree = ""; }; - BF63EF0B21CD7F28001D38C5 /* EmptyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyTests.swift; sourceTree = ""; }; - BF63EF1721CEB6BD001D38C5 /* SharedBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedBox.swift; sourceTree = ""; }; - BF63EF1D21CEC99A001D38C5 /* BenchmarkTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BenchmarkTests.swift; sourceTree = ""; }; - BF63EF6621D0F874001D38C5 /* XMLKeyTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLKeyTests.swift; sourceTree = ""; }; - BF63EF6821D0FDB5001D38C5 /* XMLHeaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLHeaderTests.swift; sourceTree = ""; }; - BF63EF6A21D10284001D38C5 /* XMLElementTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLElementTests.swift; sourceTree = ""; }; - BF8171CF21D3B1BD00901EB0 /* DecodingContainerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecodingContainerTests.swift; sourceTree = ""; }; - BF8171F121D3D03E00901EB0 /* SharedBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedBoxTests.swift; sourceTree = ""; }; - BF94579E21CBB497005ACFDE /* NullBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NullBox.swift; sourceTree = ""; }; - BF94579F21CBB497005ACFDE /* KeyedBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyedBox.swift; sourceTree = ""; }; - BF9457A021CBB497005ACFDE /* UnkeyedBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnkeyedBox.swift; sourceTree = ""; }; - BF9457A121CBB497005ACFDE /* DecimalBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecimalBox.swift; sourceTree = ""; }; - BF9457A321CBB497005ACFDE /* BoolBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BoolBox.swift; sourceTree = ""; }; - BF9457A421CBB497005ACFDE /* Box.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Box.swift; sourceTree = ""; }; - BF9457A521CBB498005ACFDE /* StringBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringBox.swift; sourceTree = ""; }; - BF9457B121CBB4DB005ACFDE /* XMLHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLHeader.swift; sourceTree = ""; }; - BF9457B221CBB4DB005ACFDE /* String+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = ""; }; - BF9457B321CBB4DB005ACFDE /* XMLStackParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLStackParser.swift; sourceTree = ""; }; - BF9457B421CBB4DB005ACFDE /* ISO8601DateFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ISO8601DateFormatter.swift; sourceTree = ""; }; - BF9457B521CBB4DB005ACFDE /* XMLKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLKey.swift; sourceTree = ""; }; - BF9457B621CBB4DB005ACFDE /* XMLCoderElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLCoderElement.swift; sourceTree = ""; }; - BF9457BE21CBB516005ACFDE /* BoolBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BoolBoxTests.swift; sourceTree = ""; }; - BF9457BF21CBB516005ACFDE /* KeyedBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyedBoxTests.swift; sourceTree = ""; }; - BF9457C121CBB516005ACFDE /* DecimalBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecimalBoxTests.swift; sourceTree = ""; }; - BF9457C221CBB516005ACFDE /* NullBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NullBoxTests.swift; sourceTree = ""; }; - BF9457C321CBB516005ACFDE /* FloatBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloatBoxTests.swift; sourceTree = ""; }; - BF9457C421CBB516005ACFDE /* StringBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringBoxTests.swift; sourceTree = ""; }; - BF9457C521CBB516005ACFDE /* IntBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntBoxTests.swift; sourceTree = ""; }; - BF9457C621CBB516005ACFDE /* UIntBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIntBoxTests.swift; sourceTree = ""; }; - BF9457C721CBB516005ACFDE /* UnkeyedBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnkeyedBoxTests.swift; sourceTree = ""; }; - BF9457D221CBB59D005ACFDE /* UIntBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIntBox.swift; sourceTree = ""; }; - BF9457D321CBB59D005ACFDE /* FloatBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloatBox.swift; sourceTree = ""; }; - BF9457D421CBB59D005ACFDE /* IntBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntBox.swift; sourceTree = ""; }; - BF9457D821CBB5D2005ACFDE /* DataBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataBox.swift; sourceTree = ""; }; - BF9457D921CBB5D2005ACFDE /* DateBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateBox.swift; sourceTree = ""; }; - BF9457DC21CBB62C005ACFDE /* DateBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateBoxTests.swift; sourceTree = ""; }; - BF9457DE21CBB683005ACFDE /* DataBoxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataBoxTests.swift; sourceTree = ""; }; - BF9457E221CBB6BC005ACFDE /* BoolTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BoolTests.swift; sourceTree = ""; }; - BF9457E321CBB6BC005ACFDE /* IntTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntTests.swift; sourceTree = ""; }; - BF9457E421CBB6BC005ACFDE /* NullTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NullTests.swift; sourceTree = ""; }; - BF9457E521CBB6BC005ACFDE /* StringTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringTests.swift; sourceTree = ""; }; - BF9457E621CBB6BC005ACFDE /* FloatTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloatTests.swift; sourceTree = ""; }; - BF9457E721CBB6BC005ACFDE /* UnkeyedTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnkeyedTests.swift; sourceTree = ""; }; - BF9457E821CBB6BC005ACFDE /* DateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = ""; }; - BF9457E921CBB6BC005ACFDE /* UIntTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIntTests.swift; sourceTree = ""; }; - BF9457EA21CBB6BC005ACFDE /* DecimalTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecimalTests.swift; sourceTree = ""; }; - BF9457EB21CBB6BC005ACFDE /* KeyedTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyedTests.swift; sourceTree = ""; }; - BF9457EC21CBB6BC005ACFDE /* DataTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataTests.swift; sourceTree = ""; }; - D11815BF227788BA008836E4 /* SpacePreserveTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpacePreserveTest.swift; sourceTree = ""; }; - D11979B521F5CD2500A9C574 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; - D11979B621F5CD2500A9C574 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - D11979B721F5EA5400A9C574 /* XMLCoder.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XMLCoder.podspec; sourceTree = ""; }; - D14D8A8521F1D6B300B0D31A /* SingleChildTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleChildTests.swift; sourceTree = ""; }; - D158F12E2229892C0032B449 /* DynamicNodeDecoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicNodeDecoding.swift; sourceTree = ""; }; - D162674121F9B2850056D1D8 /* OptionalTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptionalTests.swift; sourceTree = ""; }; - D1761D1E2247F04500F53CEF /* DynamicNodeDecodingTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicNodeDecodingTest.swift; sourceTree = ""; }; - D1A3D4AB227AD9BC00F28969 /* KeyDecodingAndEncodingStrategyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyDecodingAndEncodingStrategyTests.swift; sourceTree = ""; }; - D1AC9464224E3E1F004AB49B /* AttributedEnumIntrinsicTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributedEnumIntrinsicTest.swift; sourceTree = ""; }; - D1B6A2C02297EF5A005B8A6E /* BorderTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BorderTest.swift; sourceTree = ""; }; - D1CAD3612293FAB80077901D /* MixedContainerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedContainerTest.swift; sourceTree = ""; }; - D1CFC8222226AFB400B03222 /* NamespaceTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NamespaceTest.swift; sourceTree = ""; }; - D1D50D3022942EAE007098FC /* NestingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NestingTests.swift; sourceTree = ""; }; - D1E0C85121D8E6540042A261 /* ErrorContextTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorContextTest.swift; sourceTree = ""; }; - D1E0C85421D91EBF0042A261 /* Metatypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Metatypes.swift; sourceTree = ""; }; - D1EC3E61225A32F500C610E3 /* BoxTreeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoxTreeTests.swift; sourceTree = ""; }; - D1EC3E63225A334C00C610E3 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - D1EC3E64225A38EC00C610E3 /* KeyedStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyedStorage.swift; sourceTree = ""; }; - D1FC040421C7EF8200065B43 /* RJISample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RJISample.swift; sourceTree = ""; }; - OBJ_10 /* DecodingErrorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecodingErrorExtension.swift; sourceTree = ""; }; - OBJ_11 /* XMLDecoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLDecoder.swift; sourceTree = ""; }; - OBJ_12 /* XMLDecodingStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLDecodingStorage.swift; sourceTree = ""; }; - OBJ_13 /* XMLKeyedDecodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLKeyedDecodingContainer.swift; sourceTree = ""; }; - OBJ_14 /* XMLUnkeyedDecodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLUnkeyedDecodingContainer.swift; sourceTree = ""; }; - OBJ_16 /* EncodingErrorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncodingErrorExtension.swift; sourceTree = ""; }; - OBJ_17 /* XMLEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLEncoder.swift; sourceTree = ""; }; - OBJ_18 /* XMLEncodingStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLEncodingStorage.swift; sourceTree = ""; }; - OBJ_19 /* XMLKeyedEncodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLKeyedEncodingContainer.swift; sourceTree = ""; }; - OBJ_20 /* XMLReferencingEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLReferencingEncoder.swift; sourceTree = ""; }; - OBJ_21 /* XMLUnkeyedEncodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLUnkeyedEncodingContainer.swift; sourceTree = ""; }; - OBJ_28 /* BooksTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BooksTest.swift; sourceTree = ""; }; - OBJ_29 /* BreakfastTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreakfastTest.swift; sourceTree = ""; }; - OBJ_30 /* CDCatalog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDCatalog.swift; sourceTree = ""; }; - OBJ_31 /* CDTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDTest.swift; sourceTree = ""; }; - OBJ_33 /* NodeEncodingStrategyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeEncodingStrategyTests.swift; sourceTree = ""; }; - OBJ_34 /* NoteTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteTest.swift; sourceTree = ""; }; - OBJ_35 /* PlantCatalog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlantCatalog.swift; sourceTree = ""; }; - OBJ_36 /* PlantTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlantTest.swift; sourceTree = ""; }; - OBJ_37 /* RJITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RJITest.swift; sourceTree = ""; }; - OBJ_38 /* RelationshipsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelationshipsTest.swift; sourceTree = ""; }; - OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; - "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = XMLCoder.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - "XMLCoder::XMLCoderTests::Product" /* XMLCoderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = XMLCoderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - OBJ_62 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - OBJ_91 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 0; - files = ( - OBJ_92 /* XMLCoder.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - BF63EEFE21CCDEC1001D38C5 /* Auxiliary */ = { - isa = PBXGroup; - children = ( - BF63EF6621D0F874001D38C5 /* XMLKeyTests.swift */, - BF63EEFF21CCDED2001D38C5 /* XMLStackParserTests.swift */, - BF63EF6821D0FDB5001D38C5 /* XMLHeaderTests.swift */, - BF63EF6A21D10284001D38C5 /* XMLElementTests.swift */, - B34B3C07220381AB00BCBA30 /* String+ExtensionsTests.swift */, - ); - path = Auxiliary; - sourceTree = ""; - }; - BF94578721CBB454005ACFDE /* Box */ = { - isa = PBXGroup; - children = ( - BF9457A421CBB497005ACFDE /* Box.swift */, - BF94579E21CBB497005ACFDE /* NullBox.swift */, - BF9457A321CBB497005ACFDE /* BoolBox.swift */, - BF9457D421CBB59D005ACFDE /* IntBox.swift */, - BF9457D221CBB59D005ACFDE /* UIntBox.swift */, - BF9457A121CBB497005ACFDE /* DecimalBox.swift */, - BF9457D321CBB59D005ACFDE /* FloatBox.swift */, - BF9457A521CBB498005ACFDE /* StringBox.swift */, - BF9457D821CBB5D2005ACFDE /* DataBox.swift */, - BF9457D921CBB5D2005ACFDE /* DateBox.swift */, - BF63EF0521CD7A74001D38C5 /* URLBox.swift */, - BF9457A021CBB497005ACFDE /* UnkeyedBox.swift */, - BF94579F21CBB497005ACFDE /* KeyedBox.swift */, - BF63EF1721CEB6BD001D38C5 /* SharedBox.swift */, - ); - path = Box; - sourceTree = ""; - }; - BF9457B021CBB4DB005ACFDE /* Auxiliaries */ = { - isa = PBXGroup; - children = ( - BF94578721CBB454005ACFDE /* Box */, - BF9457B421CBB4DB005ACFDE /* ISO8601DateFormatter.swift */, - D1EC3E64225A38EC00C610E3 /* KeyedStorage.swift */, - D1E0C85421D91EBF0042A261 /* Metatypes.swift */, - BF9457B221CBB4DB005ACFDE /* String+Extensions.swift */, - BF9457B621CBB4DB005ACFDE /* XMLCoderElement.swift */, - BF9457B121CBB4DB005ACFDE /* XMLHeader.swift */, - BF9457B321CBB4DB005ACFDE /* XMLStackParser.swift */, - BF9457B521CBB4DB005ACFDE /* XMLKey.swift */, - ); - path = Auxiliaries; - sourceTree = ""; - }; - BF9457BD21CBB516005ACFDE /* Box */ = { - isa = PBXGroup; - children = ( - BF9457C221CBB516005ACFDE /* NullBoxTests.swift */, - BF9457BE21CBB516005ACFDE /* BoolBoxTests.swift */, - BF9457C521CBB516005ACFDE /* IntBoxTests.swift */, - BF9457C621CBB516005ACFDE /* UIntBoxTests.swift */, - BF9457C121CBB516005ACFDE /* DecimalBoxTests.swift */, - BF9457C321CBB516005ACFDE /* FloatBoxTests.swift */, - BF9457C421CBB516005ACFDE /* StringBoxTests.swift */, - BF9457DE21CBB683005ACFDE /* DataBoxTests.swift */, - BF9457DC21CBB62C005ACFDE /* DateBoxTests.swift */, - BF63EF0721CD7AF8001D38C5 /* URLBoxTests.swift */, - BF9457C721CBB516005ACFDE /* UnkeyedBoxTests.swift */, - BF9457BF21CBB516005ACFDE /* KeyedBoxTests.swift */, - BF8171F121D3D03E00901EB0 /* SharedBoxTests.swift */, - ); - path = Box; - sourceTree = ""; - }; - BF9457E121CBB6BC005ACFDE /* Minimal */ = { - isa = PBXGroup; - children = ( - BF9457E221CBB6BC005ACFDE /* BoolTests.swift */, - BF9457EC21CBB6BC005ACFDE /* DataTests.swift */, - BF9457E821CBB6BC005ACFDE /* DateTests.swift */, - BF9457EA21CBB6BC005ACFDE /* DecimalTests.swift */, - BF63EF0B21CD7F28001D38C5 /* EmptyTests.swift */, - BF9457E621CBB6BC005ACFDE /* FloatTests.swift */, - BF9457E321CBB6BC005ACFDE /* IntTests.swift */, - A61FE03A21E4EA8B0015D993 /* KeyedIntTests.swift */, - BF9457EB21CBB6BC005ACFDE /* KeyedTests.swift */, - BF9457E421CBB6BC005ACFDE /* NullTests.swift */, - D162674121F9B2850056D1D8 /* OptionalTests.swift */, - BF9457E521CBB6BC005ACFDE /* StringTests.swift */, - BF9457E921CBB6BC005ACFDE /* UIntTests.swift */, - A61FE03721E4D4F10015D993 /* UnkeyedIntTests.swift */, - BF9457E721CBB6BC005ACFDE /* UnkeyedTests.swift */, - BF63EF0921CD7C1A001D38C5 /* URLTests.swift */, - D1EC3E61225A32F500C610E3 /* BoxTreeTests.swift */, - ); - path = Minimal; - sourceTree = ""; - }; - OBJ_15 /* Encoder */ = { - isa = PBXGroup; - children = ( - B35157CD21F986DD009CA0CC /* DynamicNodeEncoding.swift */, - OBJ_16 /* EncodingErrorExtension.swift */, - B3BE1D642202CB7200259831 /* SingleValueEncodingContainer.swift */, - OBJ_17 /* XMLEncoder.swift */, - B3BE1D622202CB1400259831 /* XMLEncoderImplementation.swift */, - OBJ_18 /* XMLEncodingStorage.swift */, - OBJ_19 /* XMLKeyedEncodingContainer.swift */, - OBJ_20 /* XMLReferencingEncoder.swift */, - OBJ_21 /* XMLUnkeyedEncodingContainer.swift */, - ); - path = Encoder; - sourceTree = ""; - }; - OBJ_25 /* Tests */ = { - isa = PBXGroup; - children = ( - OBJ_26 /* XMLCoderTests */, - ); - name = Tests; - sourceTree = SOURCE_ROOT; - }; - OBJ_26 /* XMLCoderTests */ = { - isa = PBXGroup; - children = ( - BF63EEFE21CCDEC1001D38C5 /* Auxiliary */, - BF9457BD21CBB516005ACFDE /* Box */, - BF9457E121CBB6BC005ACFDE /* Minimal */, - D1AC9464224E3E1F004AB49B /* AttributedEnumIntrinsicTest.swift */, - B3B6902D220A71DF0084D407 /* AttributedIntrinsicTest.swift */, - BF63EF1D21CEC99A001D38C5 /* BenchmarkTests.swift */, - OBJ_28 /* BooksTest.swift */, - D1B6A2C02297EF5A005B8A6E /* BorderTest.swift */, - OBJ_29 /* BreakfastTest.swift */, - OBJ_30 /* CDCatalog.swift */, - OBJ_31 /* CDTest.swift */, - A61DCCD621DF8DB300C0A19D /* ClassTests.swift */, - BF8171CF21D3B1BD00901EB0 /* DecodingContainerTests.swift */, - D1761D1E2247F04500F53CEF /* DynamicNodeDecodingTest.swift */, - B3BE1D602202C1F600259831 /* DynamicNodeEncodingTest.swift */, - D1E0C85121D8E6540042A261 /* ErrorContextTest.swift */, - D1CFC8222226AFB400B03222 /* NamespaceTest.swift */, - D1D50D3022942EAE007098FC /* NestingTests.swift */, - OBJ_33 /* NodeEncodingStrategyTests.swift */, - OBJ_34 /* NoteTest.swift */, - OBJ_35 /* PlantCatalog.swift */, - OBJ_36 /* PlantTest.swift */, - OBJ_38 /* RelationshipsTest.swift */, - D1FC040421C7EF8200065B43 /* RJISample.swift */, - OBJ_37 /* RJITest.swift */, - D14D8A8521F1D6B300B0D31A /* SingleChildTests.swift */, - D11815BF227788BA008836E4 /* SpacePreserveTest.swift */, - D1A3D4AB227AD9BC00F28969 /* KeyDecodingAndEncodingStrategyTests.swift */, - D1CAD3612293FAB80077901D /* MixedContainerTest.swift */, - ); - name = XMLCoderTests; - path = Tests/XMLCoderTests; - sourceTree = SOURCE_ROOT; - }; - OBJ_40 /* Products */ = { - isa = PBXGroup; - children = ( - "XMLCoder::XMLCoderTests::Product" /* XMLCoderTests.xctest */, - "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */, - ); - name = Products; - sourceTree = BUILT_PRODUCTS_DIR; - }; - OBJ_5 = { - isa = PBXGroup; - children = ( - D1EC3E63225A334C00C610E3 /* LICENSE */, - D11979B721F5EA5400A9C574 /* XMLCoder.podspec */, - D11979B521F5CD2500A9C574 /* CHANGELOG.md */, - D11979B621F5CD2500A9C574 /* README.md */, - OBJ_6 /* Package.swift */, - OBJ_7 /* Sources */, - OBJ_25 /* Tests */, - OBJ_40 /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - }; - OBJ_7 /* Sources */ = { - isa = PBXGroup; - children = ( - OBJ_8 /* XMLCoder */, - ); - name = Sources; - sourceTree = SOURCE_ROOT; - }; - OBJ_8 /* XMLCoder */ = { - isa = PBXGroup; - children = ( - BF9457B021CBB4DB005ACFDE /* Auxiliaries */, - OBJ_9 /* Decoder */, - OBJ_15 /* Encoder */, - ); - name = XMLCoder; - path = Sources/XMLCoder; - sourceTree = SOURCE_ROOT; - }; - OBJ_9 /* Decoder */ = { - isa = PBXGroup; - children = ( - OBJ_10 /* DecodingErrorExtension.swift */, - D158F12E2229892C0032B449 /* DynamicNodeDecoding.swift */, - B3BE1D672202CBF800259831 /* SingleValueDecodingContainer.swift */, - OBJ_11 /* XMLDecoder.swift */, - B3BE1D662202CBF800259831 /* XMLDecoderImplementation.swift */, - OBJ_12 /* XMLDecodingStorage.swift */, - OBJ_13 /* XMLKeyedDecodingContainer.swift */, - OBJ_14 /* XMLUnkeyedDecodingContainer.swift */, - ); - path = Decoder; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - "XMLCoder::SwiftPMPackageDescription" /* XMLCoderPackageDescription */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_64 /* Build configuration list for PBXNativeTarget "XMLCoderPackageDescription" */; - buildPhases = ( - OBJ_67 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = XMLCoderPackageDescription; - productName = XMLCoderPackageDescription; - productType = "com.apple.product-type.framework"; - }; - "XMLCoder::XMLCoder" /* XMLCoder */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_44 /* Build configuration list for PBXNativeTarget "XMLCoder" */; - buildPhases = ( - OBJ_47 /* Sources */, - OBJ_62 /* Frameworks */, - D1543A8921CEB96E0039D8EC /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = XMLCoder; - productName = XMLCoder; - productReference = "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */; - productType = "com.apple.product-type.framework"; - }; - "XMLCoder::XMLCoderTests" /* XMLCoderTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_75 /* Build configuration list for PBXNativeTarget "XMLCoderTests" */; - buildPhases = ( - OBJ_78 /* Sources */, - OBJ_91 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - OBJ_93 /* PBXTargetDependency */, - ); - name = XMLCoderTests; - productName = XMLCoderTests; - productReference = "XMLCoder::XMLCoderTests::Product" /* XMLCoderTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - OBJ_1 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 9999; - TargetAttributes = { - "XMLCoder::XMLCoder" = { - LastSwiftMigration = 1010; - }; - "XMLCoder::XMLCoderTests" = { - LastSwiftMigration = 1010; - }; - }; - }; - buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "XMLCoder" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - en, - ); - mainGroup = OBJ_5; - productRefGroup = OBJ_40 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - "XMLCoder::XMLCoder" /* XMLCoder */, - "XMLCoder::SwiftPMPackageDescription" /* XMLCoderPackageDescription */, - "XMLCoder::XMLCoderPackageTests::ProductTarget" /* XMLCoderPackageTests */, - "XMLCoder::XMLCoderTests" /* XMLCoderTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - D1543A8921CEB96E0039D8EC /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - OBJ_47 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 0; - files = ( - B3BE1D632202CB1400259831 /* XMLEncoderImplementation.swift in Sources */, - BF9457D621CBB59E005ACFDE /* FloatBox.swift in Sources */, - BF9457B721CBB4DB005ACFDE /* XMLHeader.swift in Sources */, - B3BE1D692202CBF800259831 /* SingleValueDecodingContainer.swift in Sources */, - BF9457BB21CBB4DB005ACFDE /* XMLKey.swift in Sources */, - OBJ_48 /* DecodingErrorExtension.swift in Sources */, - BF63EF1821CEB6BD001D38C5 /* SharedBox.swift in Sources */, - B3BE1D682202CBF800259831 /* XMLDecoderImplementation.swift in Sources */, - BF9457DB21CBB5D2005ACFDE /* DateBox.swift in Sources */, - BF63EF0621CD7A74001D38C5 /* URLBox.swift in Sources */, - OBJ_49 /* XMLDecoder.swift in Sources */, - OBJ_50 /* XMLDecodingStorage.swift in Sources */, - B3BE1D652202CB7200259831 /* SingleValueEncodingContainer.swift in Sources */, - BF9457D521CBB59E005ACFDE /* UIntBox.swift in Sources */, - D1EC3E65225A38EC00C610E3 /* KeyedStorage.swift in Sources */, - OBJ_51 /* XMLKeyedDecodingContainer.swift in Sources */, - OBJ_52 /* XMLUnkeyedDecodingContainer.swift in Sources */, - OBJ_53 /* EncodingErrorExtension.swift in Sources */, - BF9457B921CBB4DB005ACFDE /* XMLStackParser.swift in Sources */, - OBJ_54 /* XMLEncoder.swift in Sources */, - B35157CE21F986DD009CA0CC /* DynamicNodeEncoding.swift in Sources */, - BF9457BA21CBB4DB005ACFDE /* ISO8601DateFormatter.swift in Sources */, - OBJ_55 /* XMLEncodingStorage.swift in Sources */, - BF9457A921CBB498005ACFDE /* KeyedBox.swift in Sources */, - BF9457D721CBB59E005ACFDE /* IntBox.swift in Sources */, - BF9457AD21CBB498005ACFDE /* BoolBox.swift in Sources */, - BF9457B821CBB4DB005ACFDE /* String+Extensions.swift in Sources */, - BF9457AE21CBB498005ACFDE /* Box.swift in Sources */, - BF9457DA21CBB5D2005ACFDE /* DataBox.swift in Sources */, - BF9457AB21CBB498005ACFDE /* DecimalBox.swift in Sources */, - OBJ_56 /* XMLKeyedEncodingContainer.swift in Sources */, - D158F12F2229892C0032B449 /* DynamicNodeDecoding.swift in Sources */, - D1E0C85521D91EBF0042A261 /* Metatypes.swift in Sources */, - OBJ_57 /* XMLReferencingEncoder.swift in Sources */, - BF9457BC21CBB4DB005ACFDE /* XMLCoderElement.swift in Sources */, - BF9457AA21CBB498005ACFDE /* UnkeyedBox.swift in Sources */, - BF9457AF21CBB498005ACFDE /* StringBox.swift in Sources */, - OBJ_58 /* XMLUnkeyedEncodingContainer.swift in Sources */, - BF9457A821CBB498005ACFDE /* NullBox.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - OBJ_67 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 0; - files = ( - OBJ_68 /* Package.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - OBJ_78 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 0; - files = ( - BF9457CB21CBB516005ACFDE /* DecimalBoxTests.swift in Sources */, - BF9457F221CBB6BC005ACFDE /* UnkeyedTests.swift in Sources */, - A61FE03C21E4EAB10015D993 /* KeyedIntTests.swift in Sources */, - BF9457F321CBB6BC005ACFDE /* DateTests.swift in Sources */, - D1D50D3122942EAE007098FC /* NestingTests.swift in Sources */, - BF9457D121CBB516005ACFDE /* UnkeyedBoxTests.swift in Sources */, - BF63EF6921D0FDB5001D38C5 /* XMLHeaderTests.swift in Sources */, - BF9457F021CBB6BC005ACFDE /* StringTests.swift in Sources */, - D14D8A8621F1D6B300B0D31A /* SingleChildTests.swift in Sources */, - A61FE03921E4D60B0015D993 /* UnkeyedIntTests.swift in Sources */, - BF63EF6B21D10284001D38C5 /* XMLElementTests.swift in Sources */, - BF9457ED21CBB6BC005ACFDE /* BoolTests.swift in Sources */, - B3B6902E220A71DF0084D407 /* AttributedIntrinsicTest.swift in Sources */, - D11815C1227788C8008836E4 /* SpacePreserveTest.swift in Sources */, - D1FC040521C7EF8200065B43 /* RJISample.swift in Sources */, - D1EC3E62225A32F500C610E3 /* BoxTreeTests.swift in Sources */, - BF63EF0A21CD7C1A001D38C5 /* URLTests.swift in Sources */, - BF9457CE21CBB516005ACFDE /* StringBoxTests.swift in Sources */, - D1CFC8242226B13F00B03222 /* NamespaceTest.swift in Sources */, - BF9457D021CBB516005ACFDE /* UIntBoxTests.swift in Sources */, - OBJ_80 /* BooksTest.swift in Sources */, - D1761D1F2247F04500F53CEF /* DynamicNodeDecodingTest.swift in Sources */, - OBJ_81 /* BreakfastTest.swift in Sources */, - OBJ_82 /* CDCatalog.swift in Sources */, - BF63EF0021CCDED2001D38C5 /* XMLStackParserTests.swift in Sources */, - BF9457CC21CBB516005ACFDE /* NullBoxTests.swift in Sources */, - BF63EF1E21CEC99B001D38C5 /* BenchmarkTests.swift in Sources */, - BF9457CF21CBB516005ACFDE /* IntBoxTests.swift in Sources */, - BF9457E021CBB68A005ACFDE /* DataBoxTests.swift in Sources */, - D162674321F9B2AF0056D1D8 /* OptionalTests.swift in Sources */, - D1A3D4AD227AD9BF00F28969 /* KeyDecodingAndEncodingStrategyTests.swift in Sources */, - BF9457F521CBB6BC005ACFDE /* DecimalTests.swift in Sources */, - OBJ_83 /* CDTest.swift in Sources */, - BF63EF6721D0F874001D38C5 /* XMLKeyTests.swift in Sources */, - OBJ_85 /* NodeEncodingStrategyTests.swift in Sources */, - D1B6A2C22297EF6F005B8A6E /* BorderTest.swift in Sources */, - OBJ_86 /* NoteTest.swift in Sources */, - BF63EF0C21CD7F28001D38C5 /* EmptyTests.swift in Sources */, - B34B3C08220381AC00BCBA30 /* String+ExtensionsTests.swift in Sources */, - B3BE1D612202C1F600259831 /* DynamicNodeEncodingTest.swift in Sources */, - BF9457F721CBB6BC005ACFDE /* DataTests.swift in Sources */, - BF9457EE21CBB6BC005ACFDE /* IntTests.swift in Sources */, - BF8171F221D3D03E00901EB0 /* SharedBoxTests.swift in Sources */, - OBJ_87 /* PlantCatalog.swift in Sources */, - BF9457C921CBB516005ACFDE /* KeyedBoxTests.swift in Sources */, - OBJ_88 /* PlantTest.swift in Sources */, - D1AC9466224E3E63004AB49B /* AttributedEnumIntrinsicTest.swift in Sources */, - BF63EF0821CD7AF8001D38C5 /* URLBoxTests.swift in Sources */, - BF9457DD21CBB62C005ACFDE /* DateBoxTests.swift in Sources */, - A61DCCD821DF9CA200C0A19D /* ClassTests.swift in Sources */, - BF9457CD21CBB516005ACFDE /* FloatBoxTests.swift in Sources */, - BF9457F621CBB6BC005ACFDE /* KeyedTests.swift in Sources */, - BF9457C821CBB516005ACFDE /* BoolBoxTests.swift in Sources */, - D1E0C85321D8E65E0042A261 /* ErrorContextTest.swift in Sources */, - D1CB1EF521EA9599009CAF02 /* RJITest.swift in Sources */, - BF9457F421CBB6BC005ACFDE /* UIntTests.swift in Sources */, - D1CAD3622293FAB80077901D /* MixedContainerTest.swift in Sources */, - BF9457F121CBB6BC005ACFDE /* FloatTests.swift in Sources */, - BF8171D021D3B1BD00901EB0 /* DecodingContainerTests.swift in Sources */, - BF9457EF21CBB6BC005ACFDE /* NullTests.swift in Sources */, - OBJ_90 /* RelationshipsTest.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - OBJ_73 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = "XMLCoder::XMLCoderTests" /* XMLCoderTests */; - targetProxy = D1FC040321C7EF2300065B43 /* PBXContainerItemProxy */; - }; - OBJ_93 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = "XMLCoder::XMLCoder" /* XMLCoder */; - targetProxy = D1FC040221C7ED2300065B43 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - OBJ_3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.7.0; - DEBUG_INFORMATION_FORMAT = dwarf; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_NS_ASSERTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - ONLY_ACTIVE_ARCH = YES; - OTHER_SWIFT_FLAGS = "-DXcode"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "SWIFT_PACKAGE DEBUG"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TVOS_DEPLOYMENT_TARGET = 9.0; - USE_HEADERMAP = NO; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - OBJ_4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.7.0; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_OPTIMIZATION_LEVEL = s; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - OTHER_SWIFT_FLAGS = "-DXcode"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TVOS_DEPLOYMENT_TARGET = 9.0; - USE_HEADERMAP = NO; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - OBJ_45 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = XMLCoder.xcodeproj/XMLCoder_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = XMLCoder; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.2; - TARGET_NAME = XMLCoder; - }; - name = Debug; - }; - OBJ_46 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = XMLCoder.xcodeproj/XMLCoder_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = XMLCoder; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.2; - TARGET_NAME = XMLCoder; - }; - name = Release; - }; - OBJ_65 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - OBJ_66 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; - OBJ_71 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - OBJ_72 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - OBJ_76 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = XMLCoder.xcodeproj/XMLCoderTests_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.2; - TARGET_NAME = XMLCoderTests; - }; - name = Debug; - }; - OBJ_77 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = XMLCoder.xcodeproj/XMLCoderTests_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.2; - TARGET_NAME = XMLCoderTests; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - OBJ_2 /* Build configuration list for PBXProject "XMLCoder" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_3 /* Debug */, - OBJ_4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_44 /* Build configuration list for PBXNativeTarget "XMLCoder" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_45 /* Debug */, - OBJ_46 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_64 /* Build configuration list for PBXNativeTarget "XMLCoderPackageDescription" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_65 /* Debug */, - OBJ_66 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_70 /* Build configuration list for PBXAggregateTarget "XMLCoderPackageTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_71 /* Debug */, - OBJ_72 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_75 /* Build configuration list for PBXNativeTarget "XMLCoderTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_76 /* Debug */, - OBJ_77 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = OBJ_1 /* Project object */; + archiveVersion = "1"; + objectVersion = "46"; + objects = { + "OBJ_1" = { + isa = "PBXProject"; + attributes = { + LastSwiftMigration = "9999"; + LastUpgradeCheck = "9999"; + }; + buildConfigurationList = "OBJ_2"; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = "English"; + hasScannedForEncodings = "0"; + knownRegions = ( + "en" + ); + mainGroup = "OBJ_5"; + productRefGroup = "OBJ_124"; + projectDirPath = "."; + targets = ( + "XMLCoder::XMLCoder", + "XMLCoder::SwiftPMPackageDescription", + "XMLCoder::XMLCoderPackageTests::ProductTarget", + "XMLCoder::XMLCoderTests" + ); + }; + "OBJ_10" = { + isa = "PBXGroup"; + children = ( + "OBJ_11", + "OBJ_27", + "OBJ_28", + "OBJ_29", + "OBJ_30", + "OBJ_31", + "OBJ_32", + "OBJ_33", + "OBJ_34" + ); + name = "Auxiliaries"; + path = "Auxiliaries"; + sourceTree = ""; + }; + "OBJ_100" = { + isa = "PBXFileReference"; + path = "IntTests.swift"; + sourceTree = ""; + }; + "OBJ_101" = { + isa = "PBXFileReference"; + path = "KeyedIntTests.swift"; + sourceTree = ""; + }; + "OBJ_102" = { + isa = "PBXFileReference"; + path = "KeyedTests.swift"; + sourceTree = ""; + }; + "OBJ_103" = { + isa = "PBXFileReference"; + path = "NullTests.swift"; + sourceTree = ""; + }; + "OBJ_104" = { + isa = "PBXFileReference"; + path = "OptionalTests.swift"; + sourceTree = ""; + }; + "OBJ_105" = { + isa = "PBXFileReference"; + path = "StringTests.swift"; + sourceTree = ""; + }; + "OBJ_106" = { + isa = "PBXFileReference"; + path = "UIntTests.swift"; + sourceTree = ""; + }; + "OBJ_107" = { + isa = "PBXFileReference"; + path = "URLTests.swift"; + sourceTree = ""; + }; + "OBJ_108" = { + isa = "PBXFileReference"; + path = "UnkeyedIntTests.swift"; + sourceTree = ""; + }; + "OBJ_109" = { + isa = "PBXFileReference"; + path = "UnkeyedTests.swift"; + sourceTree = ""; + }; + "OBJ_11" = { + isa = "PBXGroup"; + children = ( + "OBJ_12", + "OBJ_13", + "OBJ_14", + "OBJ_15", + "OBJ_16", + "OBJ_17", + "OBJ_18", + "OBJ_19", + "OBJ_20", + "OBJ_21", + "OBJ_22", + "OBJ_23", + "OBJ_24", + "OBJ_25", + "OBJ_26" + ); + name = "Box"; + path = "Box"; + sourceTree = ""; + }; + "OBJ_110" = { + isa = "PBXFileReference"; + path = "MixedContainerTest.swift"; + sourceTree = ""; + }; + "OBJ_111" = { + isa = "PBXFileReference"; + path = "NamespaceTest.swift"; + sourceTree = ""; + }; + "OBJ_112" = { + isa = "PBXFileReference"; + path = "NestedChoiceTests.swift"; + sourceTree = ""; + }; + "OBJ_113" = { + isa = "PBXFileReference"; + path = "NestingTests.swift"; + sourceTree = ""; + }; + "OBJ_114" = { + isa = "PBXFileReference"; + path = "NodeEncodingStrategyTests.swift"; + sourceTree = ""; + }; + "OBJ_115" = { + isa = "PBXFileReference"; + path = "NoteTest.swift"; + sourceTree = ""; + }; + "OBJ_116" = { + isa = "PBXFileReference"; + path = "PlantCatalog.swift"; + sourceTree = ""; + }; + "OBJ_117" = { + isa = "PBXFileReference"; + path = "PlantTest.swift"; + sourceTree = ""; + }; + "OBJ_118" = { + isa = "PBXFileReference"; + path = "RJISample.swift"; + sourceTree = ""; + }; + "OBJ_119" = { + isa = "PBXFileReference"; + path = "RJITest.swift"; + sourceTree = ""; + }; + "OBJ_12" = { + isa = "PBXFileReference"; + path = "BoolBox.swift"; + sourceTree = ""; + }; + "OBJ_120" = { + isa = "PBXFileReference"; + path = "RelationshipsTest.swift"; + sourceTree = ""; + }; + "OBJ_121" = { + isa = "PBXFileReference"; + path = "SimpleChoiceTests.swift"; + sourceTree = ""; + }; + "OBJ_122" = { + isa = "PBXFileReference"; + path = "SingleChildTests.swift"; + sourceTree = ""; + }; + "OBJ_123" = { + isa = "PBXFileReference"; + path = "SpacePreserveTest.swift"; + sourceTree = ""; + }; + "OBJ_124" = { + isa = "PBXGroup"; + children = ( + "XMLCoder::XMLCoderTests::Product", + "XMLCoder::XMLCoder::Product" + ); + name = "Products"; + path = ""; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + "OBJ_127" = { + isa = "PBXFileReference"; + path = "CODE_OF_CONDUCT.md"; + sourceTree = ""; + }; + "OBJ_128" = { + isa = "PBXFileReference"; + path = "codecov.yml"; + sourceTree = ""; + }; + "OBJ_129" = { + isa = "PBXFileReference"; + path = "XMLCoder.podspec"; + sourceTree = ""; + }; + "OBJ_13" = { + isa = "PBXFileReference"; + path = "Box.swift"; + sourceTree = ""; + }; + "OBJ_130" = { + isa = "PBXFileReference"; + path = "LICENSE"; + sourceTree = ""; + }; + "OBJ_131" = { + isa = "PBXFileReference"; + path = "CHANGELOG.md"; + sourceTree = ""; + }; + "OBJ_132" = { + isa = "PBXFileReference"; + path = "test_swiftpm.sh"; + sourceTree = ""; + }; + "OBJ_133" = { + isa = "PBXFileReference"; + path = "test_xcodebuild.sh"; + sourceTree = ""; + }; + "OBJ_134" = { + isa = "PBXFileReference"; + path = "lint.sh"; + sourceTree = ""; + }; + "OBJ_135" = { + isa = "PBXFileReference"; + path = "azure-pipelines.yml"; + sourceTree = ""; + }; + "OBJ_136" = { + isa = "PBXFileReference"; + path = "README.md"; + sourceTree = ""; + }; + "OBJ_137" = { + isa = "PBXFileReference"; + path = "docs.sh"; + sourceTree = ""; + }; + "OBJ_138" = { + isa = "PBXFileReference"; + path = "pod.sh"; + sourceTree = ""; + }; + "OBJ_14" = { + isa = "PBXFileReference"; + path = "DataBox.swift"; + sourceTree = ""; + }; + "OBJ_140" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_141", + "OBJ_142" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_141" = { + isa = "XCBuildConfiguration"; + buildSettings = { + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)" + ); + INFOPLIST_FILE = "XMLCoder.xcodeproj/XMLCoder_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "XMLCoder"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "XMLCoder"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Debug"; + }; + "OBJ_142" = { + isa = "XCBuildConfiguration"; + buildSettings = { + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)" + ); + INFOPLIST_FILE = "XMLCoder.xcodeproj/XMLCoder_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "XMLCoder"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "XMLCoder"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Release"; + }; + "OBJ_143" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_144", + "OBJ_145", + "OBJ_146", + "OBJ_147", + "OBJ_148", + "OBJ_149", + "OBJ_150", + "OBJ_151", + "OBJ_152", + "OBJ_153", + "OBJ_154", + "OBJ_155", + "OBJ_156", + "OBJ_157", + "OBJ_158", + "OBJ_159", + "OBJ_160", + "OBJ_161", + "OBJ_162", + "OBJ_163", + "OBJ_164", + "OBJ_165", + "OBJ_166", + "OBJ_167", + "OBJ_168", + "OBJ_169", + "OBJ_170", + "OBJ_171", + "OBJ_172", + "OBJ_173", + "OBJ_174", + "OBJ_175", + "OBJ_176", + "OBJ_177", + "OBJ_178", + "OBJ_179", + "OBJ_180", + "OBJ_181", + "OBJ_182", + "OBJ_183", + "OBJ_184" + ); + }; + "OBJ_144" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_12"; + }; + "OBJ_145" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_13"; + }; + "OBJ_146" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_14"; + }; + "OBJ_147" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_15"; + }; + "OBJ_148" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_16"; + }; + "OBJ_149" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_17"; + }; + "OBJ_15" = { + isa = "PBXFileReference"; + path = "DateBox.swift"; + sourceTree = ""; + }; + "OBJ_150" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_18"; + }; + "OBJ_151" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_19"; + }; + "OBJ_152" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_20"; + }; + "OBJ_153" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_21"; + }; + "OBJ_154" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_22"; + }; + "OBJ_155" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_23"; + }; + "OBJ_156" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_24"; + }; + "OBJ_157" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_25"; + }; + "OBJ_158" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_26"; + }; + "OBJ_159" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_27"; + }; + "OBJ_16" = { + isa = "PBXFileReference"; + path = "DecimalBox.swift"; + sourceTree = ""; + }; + "OBJ_160" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_28"; + }; + "OBJ_161" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_29"; + }; + "OBJ_162" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_30"; + }; + "OBJ_163" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_31"; + }; + "OBJ_164" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_32"; + }; + "OBJ_165" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_33"; + }; + "OBJ_166" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_34"; + }; + "OBJ_167" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_36"; + }; + "OBJ_168" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_37"; + }; + "OBJ_169" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_38"; + }; + "OBJ_17" = { + isa = "PBXFileReference"; + path = "FloatBox.swift"; + sourceTree = ""; + }; + "OBJ_170" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_39"; + }; + "OBJ_171" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_40"; + }; + "OBJ_172" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_41"; + }; + "OBJ_173" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_42"; + }; + "OBJ_174" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_43"; + }; + "OBJ_175" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_45"; + }; + "OBJ_176" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_46"; + }; + "OBJ_177" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_47"; + }; + "OBJ_178" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_48"; + }; + "OBJ_179" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_49"; + }; + "OBJ_18" = { + isa = "PBXFileReference"; + path = "IntBox.swift"; + sourceTree = ""; + }; + "OBJ_180" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_50"; + }; + "OBJ_181" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_51"; + }; + "OBJ_182" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_52"; + }; + "OBJ_183" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_53"; + }; + "OBJ_184" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_54"; + }; + "OBJ_185" = { + isa = "PBXFrameworksBuildPhase"; + files = ( + ); + }; + "OBJ_187" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_188", + "OBJ_189" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_188" = { + isa = "XCBuildConfiguration"; + buildSettings = { + LD = "/usr/bin/true"; + OTHER_SWIFT_FLAGS = ( + "-swift-version", + "5", + "-I", + "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", + "-target", + "x86_64-apple-macosx10.10", + "-sdk", + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk" + ); + SWIFT_VERSION = "5.0"; + }; + name = "Debug"; + }; + "OBJ_189" = { + isa = "XCBuildConfiguration"; + buildSettings = { + LD = "/usr/bin/true"; + OTHER_SWIFT_FLAGS = ( + "-swift-version", + "5", + "-I", + "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", + "-target", + "x86_64-apple-macosx10.10", + "-sdk", + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk" + ); + SWIFT_VERSION = "5.0"; + }; + name = "Release"; + }; + "OBJ_19" = { + isa = "PBXFileReference"; + path = "KeyedBox.swift"; + sourceTree = ""; + }; + "OBJ_190" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_191" + ); + }; + "OBJ_191" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_6"; + }; + "OBJ_193" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_194", + "OBJ_195" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_194" = { + isa = "XCBuildConfiguration"; + buildSettings = { + }; + name = "Debug"; + }; + "OBJ_195" = { + isa = "XCBuildConfiguration"; + buildSettings = { + }; + name = "Release"; + }; + "OBJ_196" = { + isa = "PBXTargetDependency"; + target = "XMLCoder::XMLCoderTests"; + }; + "OBJ_198" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_199", + "OBJ_200" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_199" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_MODULES = "YES"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)" + ); + INFOPLIST_FILE = "XMLCoder.xcodeproj/XMLCoderTests_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@loader_path/../Frameworks", + "@loader_path/Frameworks" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "XMLCoderTests"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Debug"; + }; + "OBJ_2" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_3", + "OBJ_4" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_20" = { + isa = "PBXFileReference"; + path = "NullBox.swift"; + sourceTree = ""; + }; + "OBJ_200" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_MODULES = "YES"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)" + ); + INFOPLIST_FILE = "XMLCoder.xcodeproj/XMLCoderTests_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@loader_path/../Frameworks", + "@loader_path/Frameworks" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "XMLCoderTests"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Release"; + }; + "OBJ_201" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_202", + "OBJ_203", + "OBJ_204", + "OBJ_205", + "OBJ_206", + "OBJ_207", + "OBJ_208", + "OBJ_209", + "OBJ_210", + "OBJ_211", + "OBJ_212", + "OBJ_213", + "OBJ_214", + "OBJ_215", + "OBJ_216", + "OBJ_217", + "OBJ_218", + "OBJ_219", + "OBJ_220", + "OBJ_221", + "OBJ_222", + "OBJ_223", + "OBJ_224", + "OBJ_225", + "OBJ_226", + "OBJ_227", + "OBJ_228", + "OBJ_229", + "OBJ_230", + "OBJ_231", + "OBJ_232", + "OBJ_233", + "OBJ_234", + "OBJ_235", + "OBJ_236", + "OBJ_237", + "OBJ_238", + "OBJ_239", + "OBJ_240", + "OBJ_241", + "OBJ_242", + "OBJ_243", + "OBJ_244", + "OBJ_245", + "OBJ_246", + "OBJ_247", + "OBJ_248", + "OBJ_249", + "OBJ_250", + "OBJ_251", + "OBJ_252", + "OBJ_253", + "OBJ_254", + "OBJ_255", + "OBJ_256", + "OBJ_257", + "OBJ_258", + "OBJ_259", + "OBJ_260", + "OBJ_261", + "OBJ_262", + "OBJ_263", + "OBJ_264", + "OBJ_265" + ); + }; + "OBJ_202" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_57"; + }; + "OBJ_203" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_58"; + }; + "OBJ_204" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_60"; + }; + "OBJ_205" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_61"; + }; + "OBJ_206" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_62"; + }; + "OBJ_207" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_63"; + }; + "OBJ_208" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_64"; + }; + "OBJ_209" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_65"; + }; + "OBJ_21" = { + isa = "PBXFileReference"; + path = "SharedBox.swift"; + sourceTree = ""; + }; + "OBJ_210" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_66"; + }; + "OBJ_211" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_67"; + }; + "OBJ_212" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_69"; + }; + "OBJ_213" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_70"; + }; + "OBJ_214" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_71"; + }; + "OBJ_215" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_72"; + }; + "OBJ_216" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_73"; + }; + "OBJ_217" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_74"; + }; + "OBJ_218" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_75"; + }; + "OBJ_219" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_76"; + }; + "OBJ_22" = { + isa = "PBXFileReference"; + path = "SingleElementBox.swift"; + sourceTree = ""; + }; + "OBJ_220" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_77"; + }; + "OBJ_221" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_78"; + }; + "OBJ_222" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_79"; + }; + "OBJ_223" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_80"; + }; + "OBJ_224" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_81"; + }; + "OBJ_225" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_82"; + }; + "OBJ_226" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_83"; + }; + "OBJ_227" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_84"; + }; + "OBJ_228" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_85"; + }; + "OBJ_229" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_86"; + }; + "OBJ_23" = { + isa = "PBXFileReference"; + path = "StringBox.swift"; + sourceTree = ""; + }; + "OBJ_230" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_87"; + }; + "OBJ_231" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_88"; + }; + "OBJ_232" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_89"; + }; + "OBJ_233" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_90"; + }; + "OBJ_234" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_91"; + }; + "OBJ_235" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_93"; + }; + "OBJ_236" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_94"; + }; + "OBJ_237" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_95"; + }; + "OBJ_238" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_96"; + }; + "OBJ_239" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_97"; + }; + "OBJ_24" = { + isa = "PBXFileReference"; + path = "UIntBox.swift"; + sourceTree = ""; + }; + "OBJ_240" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_98"; + }; + "OBJ_241" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_99"; + }; + "OBJ_242" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_100"; + }; + "OBJ_243" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_101"; + }; + "OBJ_244" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_102"; + }; + "OBJ_245" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_103"; + }; + "OBJ_246" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_104"; + }; + "OBJ_247" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_105"; + }; + "OBJ_248" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_106"; + }; + "OBJ_249" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_107"; + }; + "OBJ_25" = { + isa = "PBXFileReference"; + path = "URLBox.swift"; + sourceTree = ""; + }; + "OBJ_250" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_108"; + }; + "OBJ_251" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_109"; + }; + "OBJ_252" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_110"; + }; + "OBJ_253" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_111"; + }; + "OBJ_254" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_112"; + }; + "OBJ_255" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_113"; + }; + "OBJ_256" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_114"; + }; + "OBJ_257" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_115"; + }; + "OBJ_258" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_116"; + }; + "OBJ_259" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_117"; + }; + "OBJ_26" = { + isa = "PBXFileReference"; + path = "UnkeyedBox.swift"; + sourceTree = ""; + }; + "OBJ_260" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_118"; + }; + "OBJ_261" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_119"; + }; + "OBJ_262" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_120"; + }; + "OBJ_263" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_121"; + }; + "OBJ_264" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_122"; + }; + "OBJ_265" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_123"; + }; + "OBJ_266" = { + isa = "PBXFrameworksBuildPhase"; + files = ( + "OBJ_267" + ); + }; + "OBJ_267" = { + isa = "PBXBuildFile"; + fileRef = "XMLCoder::XMLCoder::Product"; + }; + "OBJ_268" = { + isa = "PBXTargetDependency"; + target = "XMLCoder::XMLCoder"; + }; + "OBJ_27" = { + isa = "PBXFileReference"; + path = "ISO8601DateFormatter.swift"; + sourceTree = ""; + }; + "OBJ_28" = { + isa = "PBXFileReference"; + path = "KeyedStorage.swift"; + sourceTree = ""; + }; + "OBJ_29" = { + isa = "PBXFileReference"; + path = "Metatypes.swift"; + sourceTree = ""; + }; + "OBJ_3" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = "YES"; + COMBINE_HIDPI_IMAGES = "YES"; + COPY_PHASE_STRIP = "NO"; + DEBUG_INFORMATION_FORMAT = "dwarf"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = "YES"; + GCC_OPTIMIZATION_LEVEL = "0"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + "DEBUG=1" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + ONLY_ACTIVE_ARCH = "YES"; + OTHER_SWIFT_FLAGS = ( + "-DXcode" + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = "macosx"; + SUPPORTED_PLATFORMS = ( + "macosx", + "iphoneos", + "iphonesimulator", + "appletvos", + "appletvsimulator", + "watchos", + "watchsimulator" + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE", + "DEBUG" + ); + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + USE_HEADERMAP = "NO"; + }; + name = "Debug"; + }; + "OBJ_30" = { + isa = "PBXFileReference"; + path = "String+Extensions.swift"; + sourceTree = ""; + }; + "OBJ_31" = { + isa = "PBXFileReference"; + path = "XMLCoderElement.swift"; + sourceTree = ""; + }; + "OBJ_32" = { + isa = "PBXFileReference"; + path = "XMLHeader.swift"; + sourceTree = ""; + }; + "OBJ_33" = { + isa = "PBXFileReference"; + path = "XMLKey.swift"; + sourceTree = ""; + }; + "OBJ_34" = { + isa = "PBXFileReference"; + path = "XMLStackParser.swift"; + sourceTree = ""; + }; + "OBJ_35" = { + isa = "PBXGroup"; + children = ( + "OBJ_36", + "OBJ_37", + "OBJ_38", + "OBJ_39", + "OBJ_40", + "OBJ_41", + "OBJ_42", + "OBJ_43" + ); + name = "Decoder"; + path = "Decoder"; + sourceTree = ""; + }; + "OBJ_36" = { + isa = "PBXFileReference"; + path = "DecodingErrorExtension.swift"; + sourceTree = ""; + }; + "OBJ_37" = { + isa = "PBXFileReference"; + path = "DynamicNodeDecoding.swift"; + sourceTree = ""; + }; + "OBJ_38" = { + isa = "PBXFileReference"; + path = "SingleValueDecodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_39" = { + isa = "PBXFileReference"; + path = "XMLDecoder.swift"; + sourceTree = ""; + }; + "OBJ_4" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = "YES"; + COMBINE_HIDPI_IMAGES = "YES"; + COPY_PHASE_STRIP = "YES"; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_OPTIMIZATION_LEVEL = "s"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_SWIFT_FLAGS = ( + "-DXcode" + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = "macosx"; + SUPPORTED_PLATFORMS = ( + "macosx", + "iphoneos", + "iphonesimulator", + "appletvos", + "appletvsimulator", + "watchos", + "watchsimulator" + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE" + ); + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + USE_HEADERMAP = "NO"; + }; + name = "Release"; + }; + "OBJ_40" = { + isa = "PBXFileReference"; + path = "XMLDecoderImplementation.swift"; + sourceTree = ""; + }; + "OBJ_41" = { + isa = "PBXFileReference"; + path = "XMLDecodingStorage.swift"; + sourceTree = ""; + }; + "OBJ_42" = { + isa = "PBXFileReference"; + path = "XMLKeyedDecodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_43" = { + isa = "PBXFileReference"; + path = "XMLUnkeyedDecodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_44" = { + isa = "PBXGroup"; + children = ( + "OBJ_45", + "OBJ_46", + "OBJ_47", + "OBJ_48", + "OBJ_49", + "OBJ_50", + "OBJ_51", + "OBJ_52", + "OBJ_53", + "OBJ_54" + ); + name = "Encoder"; + path = "Encoder"; + sourceTree = ""; + }; + "OBJ_45" = { + isa = "PBXFileReference"; + path = "DynamicNodeEncoding.swift"; + sourceTree = ""; + }; + "OBJ_46" = { + isa = "PBXFileReference"; + path = "EncodingErrorExtension.swift"; + sourceTree = ""; + }; + "OBJ_47" = { + isa = "PBXFileReference"; + path = "SingleValueEncodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_48" = { + isa = "PBXFileReference"; + path = "XMLChoiceEncodable.swift"; + sourceTree = ""; + }; + "OBJ_49" = { + isa = "PBXFileReference"; + path = "XMLEncoder.swift"; + sourceTree = ""; + }; + "OBJ_5" = { + isa = "PBXGroup"; + children = ( + "OBJ_6", + "OBJ_7", + "OBJ_55", + "OBJ_124", + "OBJ_127", + "OBJ_128", + "OBJ_129", + "OBJ_130", + "OBJ_131", + "OBJ_132", + "OBJ_133", + "OBJ_134", + "OBJ_135", + "OBJ_136", + "OBJ_137", + "OBJ_138" + ); + path = ""; + sourceTree = ""; + }; + "OBJ_50" = { + isa = "PBXFileReference"; + path = "XMLEncoderImplementation.swift"; + sourceTree = ""; + }; + "OBJ_51" = { + isa = "PBXFileReference"; + path = "XMLEncodingStorage.swift"; + sourceTree = ""; + }; + "OBJ_52" = { + isa = "PBXFileReference"; + path = "XMLKeyedEncodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_53" = { + isa = "PBXFileReference"; + path = "XMLReferencingEncoder.swift"; + sourceTree = ""; + }; + "OBJ_54" = { + isa = "PBXFileReference"; + path = "XMLUnkeyedEncodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_55" = { + isa = "PBXGroup"; + children = ( + "OBJ_56" + ); + name = "Tests"; + path = ""; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_56" = { + isa = "PBXGroup"; + children = ( + "OBJ_57", + "OBJ_58", + "OBJ_59", + "OBJ_65", + "OBJ_66", + "OBJ_67", + "OBJ_68", + "OBJ_82", + "OBJ_83", + "OBJ_84", + "OBJ_85", + "OBJ_86", + "OBJ_87", + "OBJ_88", + "OBJ_89", + "OBJ_90", + "OBJ_91", + "OBJ_92", + "OBJ_110", + "OBJ_111", + "OBJ_112", + "OBJ_113", + "OBJ_114", + "OBJ_115", + "OBJ_116", + "OBJ_117", + "OBJ_118", + "OBJ_119", + "OBJ_120", + "OBJ_121", + "OBJ_122", + "OBJ_123" + ); + name = "XMLCoderTests"; + path = "Tests/XMLCoderTests"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_57" = { + isa = "PBXFileReference"; + path = "AttributedEnumIntrinsicTest.swift"; + sourceTree = ""; + }; + "OBJ_58" = { + isa = "PBXFileReference"; + path = "AttributedIntrinsicTest.swift"; + sourceTree = ""; + }; + "OBJ_59" = { + isa = "PBXGroup"; + children = ( + "OBJ_60", + "OBJ_61", + "OBJ_62", + "OBJ_63", + "OBJ_64" + ); + name = "Auxiliary"; + path = "Auxiliary"; + sourceTree = ""; + }; + "OBJ_6" = { + isa = "PBXFileReference"; + explicitFileType = "sourcecode.swift"; + path = "Package.swift"; + sourceTree = ""; + }; + "OBJ_60" = { + isa = "PBXFileReference"; + path = "String+ExtensionsTests.swift"; + sourceTree = ""; + }; + "OBJ_61" = { + isa = "PBXFileReference"; + path = "XMLElementTests.swift"; + sourceTree = ""; + }; + "OBJ_62" = { + isa = "PBXFileReference"; + path = "XMLHeaderTests.swift"; + sourceTree = ""; + }; + "OBJ_63" = { + isa = "PBXFileReference"; + path = "XMLKeyTests.swift"; + sourceTree = ""; + }; + "OBJ_64" = { + isa = "PBXFileReference"; + path = "XMLStackParserTests.swift"; + sourceTree = ""; + }; + "OBJ_65" = { + isa = "PBXFileReference"; + path = "BenchmarkTests.swift"; + sourceTree = ""; + }; + "OBJ_66" = { + isa = "PBXFileReference"; + path = "BooksTest.swift"; + sourceTree = ""; + }; + "OBJ_67" = { + isa = "PBXFileReference"; + path = "BorderTest.swift"; + sourceTree = ""; + }; + "OBJ_68" = { + isa = "PBXGroup"; + children = ( + "OBJ_69", + "OBJ_70", + "OBJ_71", + "OBJ_72", + "OBJ_73", + "OBJ_74", + "OBJ_75", + "OBJ_76", + "OBJ_77", + "OBJ_78", + "OBJ_79", + "OBJ_80", + "OBJ_81" + ); + name = "Box"; + path = "Box"; + sourceTree = ""; + }; + "OBJ_69" = { + isa = "PBXFileReference"; + path = "BoolBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_7" = { + isa = "PBXGroup"; + children = ( + "OBJ_8" + ); + name = "Sources"; + path = ""; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_70" = { + isa = "PBXFileReference"; + path = "DataBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_71" = { + isa = "PBXFileReference"; + path = "DateBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_72" = { + isa = "PBXFileReference"; + path = "DecimalBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_73" = { + isa = "PBXFileReference"; + path = "FloatBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_74" = { + isa = "PBXFileReference"; + path = "IntBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_75" = { + isa = "PBXFileReference"; + path = "KeyedBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_76" = { + isa = "PBXFileReference"; + path = "NullBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_77" = { + isa = "PBXFileReference"; + path = "SharedBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_78" = { + isa = "PBXFileReference"; + path = "StringBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_79" = { + isa = "PBXFileReference"; + path = "UIntBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_8" = { + isa = "PBXGroup"; + children = ( + "OBJ_9", + "OBJ_10", + "OBJ_35", + "OBJ_44" + ); + name = "XMLCoder"; + path = "Sources/XMLCoder"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_80" = { + isa = "PBXFileReference"; + path = "URLBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_81" = { + isa = "PBXFileReference"; + path = "UnkeyedBoxTests.swift"; + sourceTree = ""; + }; + "OBJ_82" = { + isa = "PBXFileReference"; + path = "BreakfastTest.swift"; + sourceTree = ""; + }; + "OBJ_83" = { + isa = "PBXFileReference"; + path = "CDCatalog.swift"; + sourceTree = ""; + }; + "OBJ_84" = { + isa = "PBXFileReference"; + path = "CDTest.swift"; + sourceTree = ""; + }; + "OBJ_85" = { + isa = "PBXFileReference"; + path = "ClassTests.swift"; + sourceTree = ""; + }; + "OBJ_86" = { + isa = "PBXFileReference"; + path = "CompositeChoiceTests.swift"; + sourceTree = ""; + }; + "OBJ_87" = { + isa = "PBXFileReference"; + path = "DecodingContainerTests.swift"; + sourceTree = ""; + }; + "OBJ_88" = { + isa = "PBXFileReference"; + path = "DynamicNodeDecodingTest.swift"; + sourceTree = ""; + }; + "OBJ_89" = { + isa = "PBXFileReference"; + path = "DynamicNodeEncodingTest.swift"; + sourceTree = ""; + }; + "OBJ_9" = { + isa = "PBXFileReference"; + path = "Info.plist"; + sourceTree = ""; + }; + "OBJ_90" = { + isa = "PBXFileReference"; + path = "ErrorContextTest.swift"; + sourceTree = ""; + }; + "OBJ_91" = { + isa = "PBXFileReference"; + path = "KeyDecodingAndEncodingStrategyTests.swift"; + sourceTree = ""; + }; + "OBJ_92" = { + isa = "PBXGroup"; + children = ( + "OBJ_93", + "OBJ_94", + "OBJ_95", + "OBJ_96", + "OBJ_97", + "OBJ_98", + "OBJ_99", + "OBJ_100", + "OBJ_101", + "OBJ_102", + "OBJ_103", + "OBJ_104", + "OBJ_105", + "OBJ_106", + "OBJ_107", + "OBJ_108", + "OBJ_109" + ); + name = "Minimal"; + path = "Minimal"; + sourceTree = ""; + }; + "OBJ_93" = { + isa = "PBXFileReference"; + path = "BoolTests.swift"; + sourceTree = ""; + }; + "OBJ_94" = { + isa = "PBXFileReference"; + path = "BoxTreeTests.swift"; + sourceTree = ""; + }; + "OBJ_95" = { + isa = "PBXFileReference"; + path = "DataTests.swift"; + sourceTree = ""; + }; + "OBJ_96" = { + isa = "PBXFileReference"; + path = "DateTests.swift"; + sourceTree = ""; + }; + "OBJ_97" = { + isa = "PBXFileReference"; + path = "DecimalTests.swift"; + sourceTree = ""; + }; + "OBJ_98" = { + isa = "PBXFileReference"; + path = "EmptyTests.swift"; + sourceTree = ""; + }; + "OBJ_99" = { + isa = "PBXFileReference"; + path = "FloatTests.swift"; + sourceTree = ""; + }; + "XMLCoder::SwiftPMPackageDescription" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_187"; + buildPhases = ( + "OBJ_190" + ); + dependencies = ( + ); + name = "XMLCoderPackageDescription"; + productName = "XMLCoderPackageDescription"; + productType = "com.apple.product-type.framework"; + }; + "XMLCoder::XMLCoder" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_140"; + buildPhases = ( + "OBJ_143", + "OBJ_185" + ); + dependencies = ( + ); + name = "XMLCoder"; + productName = "XMLCoder"; + productReference = "XMLCoder::XMLCoder::Product"; + productType = "com.apple.product-type.framework"; + }; + "XMLCoder::XMLCoder::Product" = { + isa = "PBXFileReference"; + path = "XMLCoder.framework"; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + "XMLCoder::XMLCoderPackageTests::ProductTarget" = { + isa = "PBXAggregateTarget"; + buildConfigurationList = "OBJ_193"; + buildPhases = ( + ); + dependencies = ( + "OBJ_196" + ); + name = "XMLCoderPackageTests"; + productName = "XMLCoderPackageTests"; + }; + "XMLCoder::XMLCoderTests" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_198"; + buildPhases = ( + "OBJ_201", + "OBJ_266" + ); + dependencies = ( + "OBJ_268" + ); + name = "XMLCoderTests"; + productName = "XMLCoderTests"; + productReference = "XMLCoder::XMLCoderTests::Product"; + productType = "com.apple.product-type.bundle.unit-test"; + }; + "XMLCoder::XMLCoderTests::Product" = { + isa = "PBXFileReference"; + path = "XMLCoderTests.xctest"; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + }; + rootObject = "OBJ_1"; } diff --git a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist deleted file mode 100644 index 606e6b36..00000000 --- a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist +++ /dev/null @@ -1,245 +0,0 @@ - - - - - classNames - - BenchmarkTests - - testDecodeArrays() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.355 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeBools() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.0131 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeDatas() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.0143 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeDates() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.013922 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeDecimals() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.011251 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeDictionaries() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.08847 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeFloats() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.015645 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeInts() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.014091 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeNulls() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.0093493 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeUInts() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.014785 - baselineIntegrationDisplayName - Local Baseline - - - testDecodeURLs() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.014802 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeArrays() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.076162 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeBools() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.015558 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeDatas() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.017226 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeDates() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.019835 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeDecimals() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.014639 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeDictionaries() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.092163 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeFloats() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.016656 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeInts() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.015619 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeNulls() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.0071232 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeUInts() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.015903 - baselineIntegrationDisplayName - Local Baseline - - - testEncodeURLs() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.016821 - baselineIntegrationDisplayName - Local Baseline - - - - RJITest - - testBenchmarkRSS() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.018708 - baselineIntegrationDisplayName - Local Baseline - - - - - - diff --git a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist deleted file mode 100644 index 80b7837a..00000000 --- a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist +++ /dev/null @@ -1,33 +0,0 @@ - - - - - runDestinationsByUUID - - 76E090BF-7AFE-4988-A06A-3C423396A4A4 - - localComputer - - busSpeedInMHz - 400 - cpuCount - 1 - cpuKind - Intel Core i9 - cpuSpeedInMHz - 2900 - logicalCPUCoresPerPackage - 12 - modelCode - MacBookPro15,1 - physicalCPUCoresPerPackage - 6 - platformIdentifier - com.apple.platform.macosx - - targetArchitecture - x86_64 - - - - diff --git a/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme b/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder-Package.xcscheme similarity index 100% rename from XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme rename to XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder-Package.xcscheme diff --git a/XMLCoder.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist b/XMLCoder.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist deleted file mode 100644 index cd0056de..00000000 --- a/XMLCoder.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - SchemeUserState - - XMLParsing-Package.xcscheme - - - SuppressBuildableAutocreation - - - From ffbb3952b813363cb4aa909d26b684d67968a75d Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 12:05:07 -0700 Subject: [PATCH 02/34] Add ChoiceKey protocol conforming to CodingKey Add CodingKey conformance to ChoiceKey --- .../XMLCoder/Auxiliaries/XMLChoiceKey.swift | 8 + XMLCoder.xcodeproj/project.pbxproj | 673 +++++++++--------- 2 files changed, 350 insertions(+), 331 deletions(-) create mode 100644 Sources/XMLCoder/Auxiliaries/XMLChoiceKey.swift diff --git a/Sources/XMLCoder/Auxiliaries/XMLChoiceKey.swift b/Sources/XMLCoder/Auxiliaries/XMLChoiceKey.swift new file mode 100644 index 00000000..7c45a04a --- /dev/null +++ b/Sources/XMLCoder/Auxiliaries/XMLChoiceKey.swift @@ -0,0 +1,8 @@ +// +// XMLChoiceKey.swift +// XMLCoder +// +// Created by Benjamin Wetherfield on 7/17/19. +// + +public protocol XMLChoiceKey: CodingKey {} diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index e374a305..31f033a2 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -17,7 +17,7 @@ "en" ); mainGroup = "OBJ_5"; - productRefGroup = "OBJ_124"; + productRefGroup = "OBJ_125"; projectDirPath = "."; targets = ( "XMLCoder::XMLCoder", @@ -37,7 +37,8 @@ "OBJ_31", "OBJ_32", "OBJ_33", - "OBJ_34" + "OBJ_34", + "OBJ_35" ); name = "Auxiliaries"; path = "Auxiliaries"; @@ -45,52 +46,52 @@ }; "OBJ_100" = { isa = "PBXFileReference"; - path = "IntTests.swift"; + path = "FloatTests.swift"; sourceTree = ""; }; "OBJ_101" = { isa = "PBXFileReference"; - path = "KeyedIntTests.swift"; + path = "IntTests.swift"; sourceTree = ""; }; "OBJ_102" = { isa = "PBXFileReference"; - path = "KeyedTests.swift"; + path = "KeyedIntTests.swift"; sourceTree = ""; }; "OBJ_103" = { isa = "PBXFileReference"; - path = "NullTests.swift"; + path = "KeyedTests.swift"; sourceTree = ""; }; "OBJ_104" = { isa = "PBXFileReference"; - path = "OptionalTests.swift"; + path = "NullTests.swift"; sourceTree = ""; }; "OBJ_105" = { isa = "PBXFileReference"; - path = "StringTests.swift"; + path = "OptionalTests.swift"; sourceTree = ""; }; "OBJ_106" = { isa = "PBXFileReference"; - path = "UIntTests.swift"; + path = "StringTests.swift"; sourceTree = ""; }; "OBJ_107" = { isa = "PBXFileReference"; - path = "URLTests.swift"; + path = "UIntTests.swift"; sourceTree = ""; }; "OBJ_108" = { isa = "PBXFileReference"; - path = "UnkeyedIntTests.swift"; + path = "URLTests.swift"; sourceTree = ""; }; "OBJ_109" = { isa = "PBXFileReference"; - path = "UnkeyedTests.swift"; + path = "UnkeyedIntTests.swift"; sourceTree = ""; }; "OBJ_11" = { @@ -118,52 +119,52 @@ }; "OBJ_110" = { isa = "PBXFileReference"; - path = "MixedContainerTest.swift"; + path = "UnkeyedTests.swift"; sourceTree = ""; }; "OBJ_111" = { isa = "PBXFileReference"; - path = "NamespaceTest.swift"; + path = "MixedContainerTest.swift"; sourceTree = ""; }; "OBJ_112" = { isa = "PBXFileReference"; - path = "NestedChoiceTests.swift"; + path = "NamespaceTest.swift"; sourceTree = ""; }; "OBJ_113" = { isa = "PBXFileReference"; - path = "NestingTests.swift"; + path = "NestedChoiceTests.swift"; sourceTree = ""; }; "OBJ_114" = { isa = "PBXFileReference"; - path = "NodeEncodingStrategyTests.swift"; + path = "NestingTests.swift"; sourceTree = ""; }; "OBJ_115" = { isa = "PBXFileReference"; - path = "NoteTest.swift"; + path = "NodeEncodingStrategyTests.swift"; sourceTree = ""; }; "OBJ_116" = { isa = "PBXFileReference"; - path = "PlantCatalog.swift"; + path = "NoteTest.swift"; sourceTree = ""; }; "OBJ_117" = { isa = "PBXFileReference"; - path = "PlantTest.swift"; + path = "PlantCatalog.swift"; sourceTree = ""; }; "OBJ_118" = { isa = "PBXFileReference"; - path = "RJISample.swift"; + path = "PlantTest.swift"; sourceTree = ""; }; "OBJ_119" = { isa = "PBXFileReference"; - path = "RJITest.swift"; + path = "RJISample.swift"; sourceTree = ""; }; "OBJ_12" = { @@ -173,25 +174,30 @@ }; "OBJ_120" = { isa = "PBXFileReference"; - path = "RelationshipsTest.swift"; + path = "RJITest.swift"; sourceTree = ""; }; "OBJ_121" = { isa = "PBXFileReference"; - path = "SimpleChoiceTests.swift"; + path = "RelationshipsTest.swift"; sourceTree = ""; }; "OBJ_122" = { isa = "PBXFileReference"; - path = "SingleChildTests.swift"; + path = "SimpleChoiceTests.swift"; sourceTree = ""; }; "OBJ_123" = { isa = "PBXFileReference"; - path = "SpacePreserveTest.swift"; + path = "SingleChildTests.swift"; sourceTree = ""; }; "OBJ_124" = { + isa = "PBXFileReference"; + path = "SpacePreserveTest.swift"; + sourceTree = ""; + }; + "OBJ_125" = { isa = "PBXGroup"; children = ( "XMLCoder::XMLCoderTests::Product", @@ -201,19 +207,14 @@ path = ""; sourceTree = "BUILT_PRODUCTS_DIR"; }; - "OBJ_127" = { - isa = "PBXFileReference"; - path = "CODE_OF_CONDUCT.md"; - sourceTree = ""; - }; "OBJ_128" = { isa = "PBXFileReference"; - path = "codecov.yml"; + path = "CODE_OF_CONDUCT.md"; sourceTree = ""; }; "OBJ_129" = { isa = "PBXFileReference"; - path = "XMLCoder.podspec"; + path = "codecov.yml"; sourceTree = ""; }; "OBJ_13" = { @@ -223,45 +224,50 @@ }; "OBJ_130" = { isa = "PBXFileReference"; - path = "LICENSE"; + path = "XMLCoder.podspec"; sourceTree = ""; }; "OBJ_131" = { isa = "PBXFileReference"; - path = "CHANGELOG.md"; + path = "LICENSE"; sourceTree = ""; }; "OBJ_132" = { isa = "PBXFileReference"; - path = "test_swiftpm.sh"; + path = "CHANGELOG.md"; sourceTree = ""; }; "OBJ_133" = { isa = "PBXFileReference"; - path = "test_xcodebuild.sh"; + path = "test_swiftpm.sh"; sourceTree = ""; }; "OBJ_134" = { isa = "PBXFileReference"; - path = "lint.sh"; + path = "test_xcodebuild.sh"; sourceTree = ""; }; "OBJ_135" = { isa = "PBXFileReference"; - path = "azure-pipelines.yml"; + path = "lint.sh"; sourceTree = ""; }; "OBJ_136" = { isa = "PBXFileReference"; - path = "README.md"; + path = "azure-pipelines.yml"; sourceTree = ""; }; "OBJ_137" = { isa = "PBXFileReference"; - path = "docs.sh"; + path = "README.md"; sourceTree = ""; }; "OBJ_138" = { + isa = "PBXFileReference"; + path = "docs.sh"; + sourceTree = ""; + }; + "OBJ_139" = { isa = "PBXFileReference"; path = "pod.sh"; sourceTree = ""; @@ -271,16 +277,16 @@ path = "DataBox.swift"; sourceTree = ""; }; - "OBJ_140" = { + "OBJ_141" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_141", - "OBJ_142" + "OBJ_142", + "OBJ_143" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_141" = { + "OBJ_142" = { isa = "XCBuildConfiguration"; buildSettings = { ENABLE_TESTABILITY = "YES"; @@ -321,7 +327,7 @@ }; name = "Debug"; }; - "OBJ_142" = { + "OBJ_143" = { isa = "XCBuildConfiguration"; buildSettings = { ENABLE_TESTABILITY = "YES"; @@ -362,10 +368,9 @@ }; name = "Release"; }; - "OBJ_143" = { + "OBJ_144" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_144", "OBJ_145", "OBJ_146", "OBJ_147", @@ -405,32 +410,30 @@ "OBJ_181", "OBJ_182", "OBJ_183", - "OBJ_184" + "OBJ_184", + "OBJ_185", + "OBJ_186" ); }; - "OBJ_144" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_12"; - }; "OBJ_145" = { isa = "PBXBuildFile"; - fileRef = "OBJ_13"; + fileRef = "OBJ_12"; }; "OBJ_146" = { isa = "PBXBuildFile"; - fileRef = "OBJ_14"; + fileRef = "OBJ_13"; }; "OBJ_147" = { isa = "PBXBuildFile"; - fileRef = "OBJ_15"; + fileRef = "OBJ_14"; }; "OBJ_148" = { isa = "PBXBuildFile"; - fileRef = "OBJ_16"; + fileRef = "OBJ_15"; }; "OBJ_149" = { isa = "PBXBuildFile"; - fileRef = "OBJ_17"; + fileRef = "OBJ_16"; }; "OBJ_15" = { isa = "PBXFileReference"; @@ -439,43 +442,43 @@ }; "OBJ_150" = { isa = "PBXBuildFile"; - fileRef = "OBJ_18"; + fileRef = "OBJ_17"; }; "OBJ_151" = { isa = "PBXBuildFile"; - fileRef = "OBJ_19"; + fileRef = "OBJ_18"; }; "OBJ_152" = { isa = "PBXBuildFile"; - fileRef = "OBJ_20"; + fileRef = "OBJ_19"; }; "OBJ_153" = { isa = "PBXBuildFile"; - fileRef = "OBJ_21"; + fileRef = "OBJ_20"; }; "OBJ_154" = { isa = "PBXBuildFile"; - fileRef = "OBJ_22"; + fileRef = "OBJ_21"; }; "OBJ_155" = { isa = "PBXBuildFile"; - fileRef = "OBJ_23"; + fileRef = "OBJ_22"; }; "OBJ_156" = { isa = "PBXBuildFile"; - fileRef = "OBJ_24"; + fileRef = "OBJ_23"; }; "OBJ_157" = { isa = "PBXBuildFile"; - fileRef = "OBJ_25"; + fileRef = "OBJ_24"; }; "OBJ_158" = { isa = "PBXBuildFile"; - fileRef = "OBJ_26"; + fileRef = "OBJ_25"; }; "OBJ_159" = { isa = "PBXBuildFile"; - fileRef = "OBJ_27"; + fileRef = "OBJ_26"; }; "OBJ_16" = { isa = "PBXFileReference"; @@ -484,43 +487,43 @@ }; "OBJ_160" = { isa = "PBXBuildFile"; - fileRef = "OBJ_28"; + fileRef = "OBJ_27"; }; "OBJ_161" = { isa = "PBXBuildFile"; - fileRef = "OBJ_29"; + fileRef = "OBJ_28"; }; "OBJ_162" = { isa = "PBXBuildFile"; - fileRef = "OBJ_30"; + fileRef = "OBJ_29"; }; "OBJ_163" = { isa = "PBXBuildFile"; - fileRef = "OBJ_31"; + fileRef = "OBJ_30"; }; "OBJ_164" = { isa = "PBXBuildFile"; - fileRef = "OBJ_32"; + fileRef = "OBJ_31"; }; "OBJ_165" = { isa = "PBXBuildFile"; - fileRef = "OBJ_33"; + fileRef = "OBJ_32"; }; "OBJ_166" = { isa = "PBXBuildFile"; - fileRef = "OBJ_34"; + fileRef = "OBJ_33"; }; "OBJ_167" = { isa = "PBXBuildFile"; - fileRef = "OBJ_36"; + fileRef = "OBJ_34"; }; "OBJ_168" = { isa = "PBXBuildFile"; - fileRef = "OBJ_37"; + fileRef = "OBJ_35"; }; "OBJ_169" = { isa = "PBXBuildFile"; - fileRef = "OBJ_38"; + fileRef = "OBJ_37"; }; "OBJ_17" = { isa = "PBXFileReference"; @@ -529,43 +532,43 @@ }; "OBJ_170" = { isa = "PBXBuildFile"; - fileRef = "OBJ_39"; + fileRef = "OBJ_38"; }; "OBJ_171" = { isa = "PBXBuildFile"; - fileRef = "OBJ_40"; + fileRef = "OBJ_39"; }; "OBJ_172" = { isa = "PBXBuildFile"; - fileRef = "OBJ_41"; + fileRef = "OBJ_40"; }; "OBJ_173" = { isa = "PBXBuildFile"; - fileRef = "OBJ_42"; + fileRef = "OBJ_41"; }; "OBJ_174" = { isa = "PBXBuildFile"; - fileRef = "OBJ_43"; + fileRef = "OBJ_42"; }; "OBJ_175" = { isa = "PBXBuildFile"; - fileRef = "OBJ_45"; + fileRef = "OBJ_43"; }; "OBJ_176" = { isa = "PBXBuildFile"; - fileRef = "OBJ_46"; + fileRef = "OBJ_44"; }; "OBJ_177" = { isa = "PBXBuildFile"; - fileRef = "OBJ_47"; + fileRef = "OBJ_46"; }; "OBJ_178" = { isa = "PBXBuildFile"; - fileRef = "OBJ_48"; + fileRef = "OBJ_47"; }; "OBJ_179" = { isa = "PBXBuildFile"; - fileRef = "OBJ_49"; + fileRef = "OBJ_48"; }; "OBJ_18" = { isa = "PBXFileReference"; @@ -574,39 +577,52 @@ }; "OBJ_180" = { isa = "PBXBuildFile"; - fileRef = "OBJ_50"; + fileRef = "OBJ_49"; }; "OBJ_181" = { isa = "PBXBuildFile"; - fileRef = "OBJ_51"; + fileRef = "OBJ_50"; }; "OBJ_182" = { isa = "PBXBuildFile"; - fileRef = "OBJ_52"; + fileRef = "OBJ_51"; }; "OBJ_183" = { isa = "PBXBuildFile"; - fileRef = "OBJ_53"; + fileRef = "OBJ_52"; }; "OBJ_184" = { isa = "PBXBuildFile"; - fileRef = "OBJ_54"; + fileRef = "OBJ_53"; }; "OBJ_185" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_54"; + }; + "OBJ_186" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_55"; + }; + "OBJ_187" = { isa = "PBXFrameworksBuildPhase"; files = ( ); }; - "OBJ_187" = { + "OBJ_189" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_188", - "OBJ_189" + "OBJ_190", + "OBJ_191" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_188" = { + "OBJ_19" = { + isa = "PBXFileReference"; + path = "KeyedBox.swift"; + sourceTree = ""; + }; + "OBJ_190" = { isa = "XCBuildConfiguration"; buildSettings = { LD = "/usr/bin/true"; @@ -624,7 +640,7 @@ }; name = "Debug"; }; - "OBJ_189" = { + "OBJ_191" = { isa = "XCBuildConfiguration"; buildSettings = { LD = "/usr/bin/true"; @@ -642,56 +658,65 @@ }; name = "Release"; }; - "OBJ_19" = { - isa = "PBXFileReference"; - path = "KeyedBox.swift"; - sourceTree = ""; - }; - "OBJ_190" = { + "OBJ_192" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_191" + "OBJ_193" ); }; - "OBJ_191" = { + "OBJ_193" = { isa = "PBXBuildFile"; fileRef = "OBJ_6"; }; - "OBJ_193" = { + "OBJ_195" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_194", - "OBJ_195" + "OBJ_196", + "OBJ_197" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_194" = { + "OBJ_196" = { isa = "XCBuildConfiguration"; buildSettings = { }; name = "Debug"; }; - "OBJ_195" = { + "OBJ_197" = { isa = "XCBuildConfiguration"; buildSettings = { }; name = "Release"; }; - "OBJ_196" = { + "OBJ_198" = { isa = "PBXTargetDependency"; target = "XMLCoder::XMLCoderTests"; }; - "OBJ_198" = { + "OBJ_2" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_3", + "OBJ_4" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_20" = { + isa = "PBXFileReference"; + path = "NullBox.swift"; + sourceTree = ""; + }; + "OBJ_200" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_199", - "OBJ_200" + "OBJ_201", + "OBJ_202" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_199" = { + "OBJ_201" = { isa = "XCBuildConfiguration"; buildSettings = { CLANG_ENABLE_MODULES = "YES"; @@ -730,21 +755,7 @@ }; name = "Debug"; }; - "OBJ_2" = { - isa = "XCConfigurationList"; - buildConfigurations = ( - "OBJ_3", - "OBJ_4" - ); - defaultConfigurationIsVisible = "0"; - defaultConfigurationName = "Release"; - }; - "OBJ_20" = { - isa = "PBXFileReference"; - path = "NullBox.swift"; - sourceTree = ""; - }; - "OBJ_200" = { + "OBJ_202" = { isa = "XCBuildConfiguration"; buildSettings = { CLANG_ENABLE_MODULES = "YES"; @@ -783,11 +794,9 @@ }; name = "Release"; }; - "OBJ_201" = { + "OBJ_203" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_202", - "OBJ_203", "OBJ_204", "OBJ_205", "OBJ_206", @@ -849,40 +858,34 @@ "OBJ_262", "OBJ_263", "OBJ_264", - "OBJ_265" + "OBJ_265", + "OBJ_266", + "OBJ_267" ); }; - "OBJ_202" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_57"; - }; - "OBJ_203" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_58"; - }; "OBJ_204" = { isa = "PBXBuildFile"; - fileRef = "OBJ_60"; + fileRef = "OBJ_58"; }; "OBJ_205" = { isa = "PBXBuildFile"; - fileRef = "OBJ_61"; + fileRef = "OBJ_59"; }; "OBJ_206" = { isa = "PBXBuildFile"; - fileRef = "OBJ_62"; + fileRef = "OBJ_61"; }; "OBJ_207" = { isa = "PBXBuildFile"; - fileRef = "OBJ_63"; + fileRef = "OBJ_62"; }; "OBJ_208" = { isa = "PBXBuildFile"; - fileRef = "OBJ_64"; + fileRef = "OBJ_63"; }; "OBJ_209" = { isa = "PBXBuildFile"; - fileRef = "OBJ_65"; + fileRef = "OBJ_64"; }; "OBJ_21" = { isa = "PBXFileReference"; @@ -891,43 +894,43 @@ }; "OBJ_210" = { isa = "PBXBuildFile"; - fileRef = "OBJ_66"; + fileRef = "OBJ_65"; }; "OBJ_211" = { isa = "PBXBuildFile"; - fileRef = "OBJ_67"; + fileRef = "OBJ_66"; }; "OBJ_212" = { isa = "PBXBuildFile"; - fileRef = "OBJ_69"; + fileRef = "OBJ_67"; }; "OBJ_213" = { isa = "PBXBuildFile"; - fileRef = "OBJ_70"; + fileRef = "OBJ_68"; }; "OBJ_214" = { isa = "PBXBuildFile"; - fileRef = "OBJ_71"; + fileRef = "OBJ_70"; }; "OBJ_215" = { isa = "PBXBuildFile"; - fileRef = "OBJ_72"; + fileRef = "OBJ_71"; }; "OBJ_216" = { isa = "PBXBuildFile"; - fileRef = "OBJ_73"; + fileRef = "OBJ_72"; }; "OBJ_217" = { isa = "PBXBuildFile"; - fileRef = "OBJ_74"; + fileRef = "OBJ_73"; }; "OBJ_218" = { isa = "PBXBuildFile"; - fileRef = "OBJ_75"; + fileRef = "OBJ_74"; }; "OBJ_219" = { isa = "PBXBuildFile"; - fileRef = "OBJ_76"; + fileRef = "OBJ_75"; }; "OBJ_22" = { isa = "PBXFileReference"; @@ -936,43 +939,43 @@ }; "OBJ_220" = { isa = "PBXBuildFile"; - fileRef = "OBJ_77"; + fileRef = "OBJ_76"; }; "OBJ_221" = { isa = "PBXBuildFile"; - fileRef = "OBJ_78"; + fileRef = "OBJ_77"; }; "OBJ_222" = { isa = "PBXBuildFile"; - fileRef = "OBJ_79"; + fileRef = "OBJ_78"; }; "OBJ_223" = { isa = "PBXBuildFile"; - fileRef = "OBJ_80"; + fileRef = "OBJ_79"; }; "OBJ_224" = { isa = "PBXBuildFile"; - fileRef = "OBJ_81"; + fileRef = "OBJ_80"; }; "OBJ_225" = { isa = "PBXBuildFile"; - fileRef = "OBJ_82"; + fileRef = "OBJ_81"; }; "OBJ_226" = { isa = "PBXBuildFile"; - fileRef = "OBJ_83"; + fileRef = "OBJ_82"; }; "OBJ_227" = { isa = "PBXBuildFile"; - fileRef = "OBJ_84"; + fileRef = "OBJ_83"; }; "OBJ_228" = { isa = "PBXBuildFile"; - fileRef = "OBJ_85"; + fileRef = "OBJ_84"; }; "OBJ_229" = { isa = "PBXBuildFile"; - fileRef = "OBJ_86"; + fileRef = "OBJ_85"; }; "OBJ_23" = { isa = "PBXFileReference"; @@ -981,43 +984,43 @@ }; "OBJ_230" = { isa = "PBXBuildFile"; - fileRef = "OBJ_87"; + fileRef = "OBJ_86"; }; "OBJ_231" = { isa = "PBXBuildFile"; - fileRef = "OBJ_88"; + fileRef = "OBJ_87"; }; "OBJ_232" = { isa = "PBXBuildFile"; - fileRef = "OBJ_89"; + fileRef = "OBJ_88"; }; "OBJ_233" = { isa = "PBXBuildFile"; - fileRef = "OBJ_90"; + fileRef = "OBJ_89"; }; "OBJ_234" = { isa = "PBXBuildFile"; - fileRef = "OBJ_91"; + fileRef = "OBJ_90"; }; "OBJ_235" = { isa = "PBXBuildFile"; - fileRef = "OBJ_93"; + fileRef = "OBJ_91"; }; "OBJ_236" = { isa = "PBXBuildFile"; - fileRef = "OBJ_94"; + fileRef = "OBJ_92"; }; "OBJ_237" = { isa = "PBXBuildFile"; - fileRef = "OBJ_95"; + fileRef = "OBJ_94"; }; "OBJ_238" = { isa = "PBXBuildFile"; - fileRef = "OBJ_96"; + fileRef = "OBJ_95"; }; "OBJ_239" = { isa = "PBXBuildFile"; - fileRef = "OBJ_97"; + fileRef = "OBJ_96"; }; "OBJ_24" = { isa = "PBXFileReference"; @@ -1026,43 +1029,43 @@ }; "OBJ_240" = { isa = "PBXBuildFile"; - fileRef = "OBJ_98"; + fileRef = "OBJ_97"; }; "OBJ_241" = { isa = "PBXBuildFile"; - fileRef = "OBJ_99"; + fileRef = "OBJ_98"; }; "OBJ_242" = { isa = "PBXBuildFile"; - fileRef = "OBJ_100"; + fileRef = "OBJ_99"; }; "OBJ_243" = { isa = "PBXBuildFile"; - fileRef = "OBJ_101"; + fileRef = "OBJ_100"; }; "OBJ_244" = { isa = "PBXBuildFile"; - fileRef = "OBJ_102"; + fileRef = "OBJ_101"; }; "OBJ_245" = { isa = "PBXBuildFile"; - fileRef = "OBJ_103"; + fileRef = "OBJ_102"; }; "OBJ_246" = { isa = "PBXBuildFile"; - fileRef = "OBJ_104"; + fileRef = "OBJ_103"; }; "OBJ_247" = { isa = "PBXBuildFile"; - fileRef = "OBJ_105"; + fileRef = "OBJ_104"; }; "OBJ_248" = { isa = "PBXBuildFile"; - fileRef = "OBJ_106"; + fileRef = "OBJ_105"; }; "OBJ_249" = { isa = "PBXBuildFile"; - fileRef = "OBJ_107"; + fileRef = "OBJ_106"; }; "OBJ_25" = { isa = "PBXFileReference"; @@ -1071,43 +1074,43 @@ }; "OBJ_250" = { isa = "PBXBuildFile"; - fileRef = "OBJ_108"; + fileRef = "OBJ_107"; }; "OBJ_251" = { isa = "PBXBuildFile"; - fileRef = "OBJ_109"; + fileRef = "OBJ_108"; }; "OBJ_252" = { isa = "PBXBuildFile"; - fileRef = "OBJ_110"; + fileRef = "OBJ_109"; }; "OBJ_253" = { isa = "PBXBuildFile"; - fileRef = "OBJ_111"; + fileRef = "OBJ_110"; }; "OBJ_254" = { isa = "PBXBuildFile"; - fileRef = "OBJ_112"; + fileRef = "OBJ_111"; }; "OBJ_255" = { isa = "PBXBuildFile"; - fileRef = "OBJ_113"; + fileRef = "OBJ_112"; }; "OBJ_256" = { isa = "PBXBuildFile"; - fileRef = "OBJ_114"; + fileRef = "OBJ_113"; }; "OBJ_257" = { isa = "PBXBuildFile"; - fileRef = "OBJ_115"; + fileRef = "OBJ_114"; }; "OBJ_258" = { isa = "PBXBuildFile"; - fileRef = "OBJ_116"; + fileRef = "OBJ_115"; }; "OBJ_259" = { isa = "PBXBuildFile"; - fileRef = "OBJ_117"; + fileRef = "OBJ_116"; }; "OBJ_26" = { isa = "PBXFileReference"; @@ -1116,47 +1119,55 @@ }; "OBJ_260" = { isa = "PBXBuildFile"; - fileRef = "OBJ_118"; + fileRef = "OBJ_117"; }; "OBJ_261" = { isa = "PBXBuildFile"; - fileRef = "OBJ_119"; + fileRef = "OBJ_118"; }; "OBJ_262" = { isa = "PBXBuildFile"; - fileRef = "OBJ_120"; + fileRef = "OBJ_119"; }; "OBJ_263" = { isa = "PBXBuildFile"; - fileRef = "OBJ_121"; + fileRef = "OBJ_120"; }; "OBJ_264" = { isa = "PBXBuildFile"; - fileRef = "OBJ_122"; + fileRef = "OBJ_121"; }; "OBJ_265" = { isa = "PBXBuildFile"; - fileRef = "OBJ_123"; + fileRef = "OBJ_122"; }; "OBJ_266" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_123"; + }; + "OBJ_267" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_124"; + }; + "OBJ_268" = { isa = "PBXFrameworksBuildPhase"; files = ( - "OBJ_267" + "OBJ_269" ); }; - "OBJ_267" = { + "OBJ_269" = { isa = "PBXBuildFile"; fileRef = "XMLCoder::XMLCoder::Product"; }; - "OBJ_268" = { - isa = "PBXTargetDependency"; - target = "XMLCoder::XMLCoder"; - }; "OBJ_27" = { isa = "PBXFileReference"; path = "ISO8601DateFormatter.swift"; sourceTree = ""; }; + "OBJ_270" = { + isa = "PBXTargetDependency"; + target = "XMLCoder::XMLCoder"; + }; "OBJ_28" = { isa = "PBXFileReference"; path = "KeyedStorage.swift"; @@ -1215,58 +1226,58 @@ }; "OBJ_31" = { isa = "PBXFileReference"; - path = "XMLCoderElement.swift"; + path = "XMLChoiceKey.swift"; sourceTree = ""; }; "OBJ_32" = { isa = "PBXFileReference"; - path = "XMLHeader.swift"; + path = "XMLCoderElement.swift"; sourceTree = ""; }; "OBJ_33" = { isa = "PBXFileReference"; - path = "XMLKey.swift"; + path = "XMLHeader.swift"; sourceTree = ""; }; "OBJ_34" = { isa = "PBXFileReference"; - path = "XMLStackParser.swift"; + path = "XMLKey.swift"; sourceTree = ""; }; "OBJ_35" = { + isa = "PBXFileReference"; + path = "XMLStackParser.swift"; + sourceTree = ""; + }; + "OBJ_36" = { isa = "PBXGroup"; children = ( - "OBJ_36", "OBJ_37", "OBJ_38", "OBJ_39", "OBJ_40", "OBJ_41", "OBJ_42", - "OBJ_43" + "OBJ_43", + "OBJ_44" ); name = "Decoder"; path = "Decoder"; sourceTree = ""; }; - "OBJ_36" = { - isa = "PBXFileReference"; - path = "DecodingErrorExtension.swift"; - sourceTree = ""; - }; "OBJ_37" = { isa = "PBXFileReference"; - path = "DynamicNodeDecoding.swift"; + path = "DecodingErrorExtension.swift"; sourceTree = ""; }; "OBJ_38" = { isa = "PBXFileReference"; - path = "SingleValueDecodingContainer.swift"; + path = "DynamicNodeDecoding.swift"; sourceTree = ""; }; "OBJ_39" = { isa = "PBXFileReference"; - path = "XMLDecoder.swift"; + path = "SingleValueDecodingContainer.swift"; sourceTree = ""; }; "OBJ_4" = { @@ -1308,28 +1319,32 @@ }; "OBJ_40" = { isa = "PBXFileReference"; - path = "XMLDecoderImplementation.swift"; + path = "XMLDecoder.swift"; sourceTree = ""; }; "OBJ_41" = { isa = "PBXFileReference"; - path = "XMLDecodingStorage.swift"; + path = "XMLDecoderImplementation.swift"; sourceTree = ""; }; "OBJ_42" = { isa = "PBXFileReference"; - path = "XMLKeyedDecodingContainer.swift"; + path = "XMLDecodingStorage.swift"; sourceTree = ""; }; "OBJ_43" = { isa = "PBXFileReference"; - path = "XMLUnkeyedDecodingContainer.swift"; + path = "XMLKeyedDecodingContainer.swift"; sourceTree = ""; }; "OBJ_44" = { + isa = "PBXFileReference"; + path = "XMLUnkeyedDecodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_45" = { isa = "PBXGroup"; children = ( - "OBJ_45", "OBJ_46", "OBJ_47", "OBJ_48", @@ -1338,35 +1353,31 @@ "OBJ_51", "OBJ_52", "OBJ_53", - "OBJ_54" + "OBJ_54", + "OBJ_55" ); name = "Encoder"; path = "Encoder"; sourceTree = ""; }; - "OBJ_45" = { - isa = "PBXFileReference"; - path = "DynamicNodeEncoding.swift"; - sourceTree = ""; - }; "OBJ_46" = { isa = "PBXFileReference"; - path = "EncodingErrorExtension.swift"; + path = "DynamicNodeEncoding.swift"; sourceTree = ""; }; "OBJ_47" = { isa = "PBXFileReference"; - path = "SingleValueEncodingContainer.swift"; + path = "EncodingErrorExtension.swift"; sourceTree = ""; }; "OBJ_48" = { isa = "PBXFileReference"; - path = "XMLChoiceEncodable.swift"; + path = "SingleValueEncodingContainer.swift"; sourceTree = ""; }; "OBJ_49" = { isa = "PBXFileReference"; - path = "XMLEncoder.swift"; + path = "XMLChoiceEncodable.swift"; sourceTree = ""; }; "OBJ_5" = { @@ -1374,9 +1385,8 @@ children = ( "OBJ_6", "OBJ_7", - "OBJ_55", - "OBJ_124", - "OBJ_127", + "OBJ_56", + "OBJ_125", "OBJ_128", "OBJ_129", "OBJ_130", @@ -1387,56 +1397,61 @@ "OBJ_135", "OBJ_136", "OBJ_137", - "OBJ_138" + "OBJ_138", + "OBJ_139" ); path = ""; sourceTree = ""; }; "OBJ_50" = { isa = "PBXFileReference"; - path = "XMLEncoderImplementation.swift"; + path = "XMLEncoder.swift"; sourceTree = ""; }; "OBJ_51" = { isa = "PBXFileReference"; - path = "XMLEncodingStorage.swift"; + path = "XMLEncoderImplementation.swift"; sourceTree = ""; }; "OBJ_52" = { isa = "PBXFileReference"; - path = "XMLKeyedEncodingContainer.swift"; + path = "XMLEncodingStorage.swift"; sourceTree = ""; }; "OBJ_53" = { isa = "PBXFileReference"; - path = "XMLReferencingEncoder.swift"; + path = "XMLKeyedEncodingContainer.swift"; sourceTree = ""; }; "OBJ_54" = { isa = "PBXFileReference"; - path = "XMLUnkeyedEncodingContainer.swift"; + path = "XMLReferencingEncoder.swift"; sourceTree = ""; }; "OBJ_55" = { + isa = "PBXFileReference"; + path = "XMLUnkeyedEncodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_56" = { isa = "PBXGroup"; children = ( - "OBJ_56" + "OBJ_57" ); name = "Tests"; path = ""; sourceTree = "SOURCE_ROOT"; }; - "OBJ_56" = { + "OBJ_57" = { isa = "PBXGroup"; children = ( - "OBJ_57", "OBJ_58", "OBJ_59", - "OBJ_65", + "OBJ_60", "OBJ_66", "OBJ_67", "OBJ_68", - "OBJ_82", + "OBJ_69", "OBJ_83", "OBJ_84", "OBJ_85", @@ -1447,7 +1462,7 @@ "OBJ_90", "OBJ_91", "OBJ_92", - "OBJ_110", + "OBJ_93", "OBJ_111", "OBJ_112", "OBJ_113", @@ -1460,85 +1475,85 @@ "OBJ_120", "OBJ_121", "OBJ_122", - "OBJ_123" + "OBJ_123", + "OBJ_124" ); name = "XMLCoderTests"; path = "Tests/XMLCoderTests"; sourceTree = "SOURCE_ROOT"; }; - "OBJ_57" = { + "OBJ_58" = { isa = "PBXFileReference"; path = "AttributedEnumIntrinsicTest.swift"; sourceTree = ""; }; - "OBJ_58" = { + "OBJ_59" = { isa = "PBXFileReference"; path = "AttributedIntrinsicTest.swift"; sourceTree = ""; }; - "OBJ_59" = { + "OBJ_6" = { + isa = "PBXFileReference"; + explicitFileType = "sourcecode.swift"; + path = "Package.swift"; + sourceTree = ""; + }; + "OBJ_60" = { isa = "PBXGroup"; children = ( - "OBJ_60", "OBJ_61", "OBJ_62", "OBJ_63", - "OBJ_64" + "OBJ_64", + "OBJ_65" ); name = "Auxiliary"; path = "Auxiliary"; sourceTree = ""; }; - "OBJ_6" = { - isa = "PBXFileReference"; - explicitFileType = "sourcecode.swift"; - path = "Package.swift"; - sourceTree = ""; - }; - "OBJ_60" = { + "OBJ_61" = { isa = "PBXFileReference"; path = "String+ExtensionsTests.swift"; sourceTree = ""; }; - "OBJ_61" = { + "OBJ_62" = { isa = "PBXFileReference"; path = "XMLElementTests.swift"; sourceTree = ""; }; - "OBJ_62" = { + "OBJ_63" = { isa = "PBXFileReference"; path = "XMLHeaderTests.swift"; sourceTree = ""; }; - "OBJ_63" = { + "OBJ_64" = { isa = "PBXFileReference"; path = "XMLKeyTests.swift"; sourceTree = ""; }; - "OBJ_64" = { + "OBJ_65" = { isa = "PBXFileReference"; path = "XMLStackParserTests.swift"; sourceTree = ""; }; - "OBJ_65" = { + "OBJ_66" = { isa = "PBXFileReference"; path = "BenchmarkTests.swift"; sourceTree = ""; }; - "OBJ_66" = { + "OBJ_67" = { isa = "PBXFileReference"; path = "BooksTest.swift"; sourceTree = ""; }; - "OBJ_67" = { + "OBJ_68" = { isa = "PBXFileReference"; path = "BorderTest.swift"; sourceTree = ""; }; - "OBJ_68" = { + "OBJ_69" = { isa = "PBXGroup"; children = ( - "OBJ_69", "OBJ_70", "OBJ_71", "OBJ_72", @@ -1550,17 +1565,13 @@ "OBJ_78", "OBJ_79", "OBJ_80", - "OBJ_81" + "OBJ_81", + "OBJ_82" ); name = "Box"; path = "Box"; sourceTree = ""; }; - "OBJ_69" = { - isa = "PBXFileReference"; - path = "BoolBoxTests.swift"; - sourceTree = ""; - }; "OBJ_7" = { isa = "PBXGroup"; children = ( @@ -1572,52 +1583,52 @@ }; "OBJ_70" = { isa = "PBXFileReference"; - path = "DataBoxTests.swift"; + path = "BoolBoxTests.swift"; sourceTree = ""; }; "OBJ_71" = { isa = "PBXFileReference"; - path = "DateBoxTests.swift"; + path = "DataBoxTests.swift"; sourceTree = ""; }; "OBJ_72" = { isa = "PBXFileReference"; - path = "DecimalBoxTests.swift"; + path = "DateBoxTests.swift"; sourceTree = ""; }; "OBJ_73" = { isa = "PBXFileReference"; - path = "FloatBoxTests.swift"; + path = "DecimalBoxTests.swift"; sourceTree = ""; }; "OBJ_74" = { isa = "PBXFileReference"; - path = "IntBoxTests.swift"; + path = "FloatBoxTests.swift"; sourceTree = ""; }; "OBJ_75" = { isa = "PBXFileReference"; - path = "KeyedBoxTests.swift"; + path = "IntBoxTests.swift"; sourceTree = ""; }; "OBJ_76" = { isa = "PBXFileReference"; - path = "NullBoxTests.swift"; + path = "KeyedBoxTests.swift"; sourceTree = ""; }; "OBJ_77" = { isa = "PBXFileReference"; - path = "SharedBoxTests.swift"; + path = "NullBoxTests.swift"; sourceTree = ""; }; "OBJ_78" = { isa = "PBXFileReference"; - path = "StringBoxTests.swift"; + path = "SharedBoxTests.swift"; sourceTree = ""; }; "OBJ_79" = { isa = "PBXFileReference"; - path = "UIntBoxTests.swift"; + path = "StringBoxTests.swift"; sourceTree = ""; }; "OBJ_8" = { @@ -1625,8 +1636,8 @@ children = ( "OBJ_9", "OBJ_10", - "OBJ_35", - "OBJ_44" + "OBJ_36", + "OBJ_45" ); name = "XMLCoder"; path = "Sources/XMLCoder"; @@ -1634,52 +1645,52 @@ }; "OBJ_80" = { isa = "PBXFileReference"; - path = "URLBoxTests.swift"; + path = "UIntBoxTests.swift"; sourceTree = ""; }; "OBJ_81" = { isa = "PBXFileReference"; - path = "UnkeyedBoxTests.swift"; + path = "URLBoxTests.swift"; sourceTree = ""; }; "OBJ_82" = { isa = "PBXFileReference"; - path = "BreakfastTest.swift"; + path = "UnkeyedBoxTests.swift"; sourceTree = ""; }; "OBJ_83" = { isa = "PBXFileReference"; - path = "CDCatalog.swift"; + path = "BreakfastTest.swift"; sourceTree = ""; }; "OBJ_84" = { isa = "PBXFileReference"; - path = "CDTest.swift"; + path = "CDCatalog.swift"; sourceTree = ""; }; "OBJ_85" = { isa = "PBXFileReference"; - path = "ClassTests.swift"; + path = "CDTest.swift"; sourceTree = ""; }; "OBJ_86" = { isa = "PBXFileReference"; - path = "CompositeChoiceTests.swift"; + path = "ClassTests.swift"; sourceTree = ""; }; "OBJ_87" = { isa = "PBXFileReference"; - path = "DecodingContainerTests.swift"; + path = "CompositeChoiceTests.swift"; sourceTree = ""; }; "OBJ_88" = { isa = "PBXFileReference"; - path = "DynamicNodeDecodingTest.swift"; + path = "DecodingContainerTests.swift"; sourceTree = ""; }; "OBJ_89" = { isa = "PBXFileReference"; - path = "DynamicNodeEncodingTest.swift"; + path = "DynamicNodeDecodingTest.swift"; sourceTree = ""; }; "OBJ_9" = { @@ -1689,18 +1700,22 @@ }; "OBJ_90" = { isa = "PBXFileReference"; - path = "ErrorContextTest.swift"; + path = "DynamicNodeEncodingTest.swift"; sourceTree = ""; }; "OBJ_91" = { isa = "PBXFileReference"; - path = "KeyDecodingAndEncodingStrategyTests.swift"; + path = "ErrorContextTest.swift"; sourceTree = ""; }; "OBJ_92" = { + isa = "PBXFileReference"; + path = "KeyDecodingAndEncodingStrategyTests.swift"; + sourceTree = ""; + }; + "OBJ_93" = { isa = "PBXGroup"; children = ( - "OBJ_93", "OBJ_94", "OBJ_95", "OBJ_96", @@ -1716,52 +1731,48 @@ "OBJ_106", "OBJ_107", "OBJ_108", - "OBJ_109" + "OBJ_109", + "OBJ_110" ); name = "Minimal"; path = "Minimal"; sourceTree = ""; }; - "OBJ_93" = { - isa = "PBXFileReference"; - path = "BoolTests.swift"; - sourceTree = ""; - }; "OBJ_94" = { isa = "PBXFileReference"; - path = "BoxTreeTests.swift"; + path = "BoolTests.swift"; sourceTree = ""; }; "OBJ_95" = { isa = "PBXFileReference"; - path = "DataTests.swift"; + path = "BoxTreeTests.swift"; sourceTree = ""; }; "OBJ_96" = { isa = "PBXFileReference"; - path = "DateTests.swift"; + path = "DataTests.swift"; sourceTree = ""; }; "OBJ_97" = { isa = "PBXFileReference"; - path = "DecimalTests.swift"; + path = "DateTests.swift"; sourceTree = ""; }; "OBJ_98" = { isa = "PBXFileReference"; - path = "EmptyTests.swift"; + path = "DecimalTests.swift"; sourceTree = ""; }; "OBJ_99" = { isa = "PBXFileReference"; - path = "FloatTests.swift"; + path = "EmptyTests.swift"; sourceTree = ""; }; "XMLCoder::SwiftPMPackageDescription" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_187"; + buildConfigurationList = "OBJ_189"; buildPhases = ( - "OBJ_190" + "OBJ_192" ); dependencies = ( ); @@ -1771,10 +1782,10 @@ }; "XMLCoder::XMLCoder" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_140"; + buildConfigurationList = "OBJ_141"; buildPhases = ( - "OBJ_143", - "OBJ_185" + "OBJ_144", + "OBJ_187" ); dependencies = ( ); @@ -1790,24 +1801,24 @@ }; "XMLCoder::XMLCoderPackageTests::ProductTarget" = { isa = "PBXAggregateTarget"; - buildConfigurationList = "OBJ_193"; + buildConfigurationList = "OBJ_195"; buildPhases = ( ); dependencies = ( - "OBJ_196" + "OBJ_198" ); name = "XMLCoderPackageTests"; productName = "XMLCoderPackageTests"; }; "XMLCoder::XMLCoderTests" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_198"; + buildConfigurationList = "OBJ_200"; buildPhases = ( - "OBJ_201", - "OBJ_266" + "OBJ_203", + "OBJ_268" ); dependencies = ( - "OBJ_268" + "OBJ_270" ); name = "XMLCoderTests"; productName = "XMLCoderTests"; From 77f9699ee3d53a268f2b7298d21a20f42d23b5fd Mon Sep 17 00:00:00 2001 From: Ben Wetherfield Date: Fri, 26 Jul 2019 12:05:32 -0700 Subject: [PATCH 03/34] Implement choice element encoding Add SingleElementEncodingContainer Fix def Expand ReferencingEncoder Complete SingleElementEncodingContainer Add decode-side hacks Add special diversion for SingleElementContainer Add hacky runtime bifurcation Add case for XMLEncoder Add SingleElementBox based XMLCoderElement initializer Change open permissions to public Add usage Add usage Add Nested cases within UnkeyedContainer Make use of SingleElementBox key Add UnkeyedBox of SingleElementBox fix Add static check for array of SingleElementBox type Implement nesting for keyed container Fix top level container func Implement nesting for SingleElementKeyed Container Clean up SingleElementBox initialization Fix formatting --- .../Auxiliaries/Box/SingleElementBox.swift | 9 +- .../Auxiliaries/XMLCoderElement.swift | 18 +- .../Decoder/XMLDecoderImplementation.swift | 5 +- Sources/XMLCoder/Encoder/XMLEncoder.swift | 2 + .../Encoder/XMLEncoderImplementation.swift | 25 ++ .../XMLCoder/Encoder/XMLEncodingStorage.swift | 6 + .../Encoder/XMLKeyedEncodingContainer.swift | 32 +++ .../Encoder/XMLReferencingEncoder.swift | 25 ++ .../XMLSingleElementEncodingContainer.swift | 234 ++++++++++++++++++ .../Encoder/XMLUnkeyedEncodingContainer.swift | 25 ++ XMLCoder.xcodeproj/project.pbxproj | 16 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + 12 files changed, 390 insertions(+), 15 deletions(-) create mode 100644 Sources/XMLCoder/Encoder/XMLSingleElementEncodingContainer.swift create mode 100644 XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift b/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift index 9e64fd69..cf0f4e49 100644 --- a/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift +++ b/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift @@ -9,8 +9,13 @@ /// an element nested in a keyed or unkeyed container, or an choice between multiple known-typed values (implemented in Swift using /// enums with associated values). struct SingleElementBox: SimpleBox { - let key: String - let element: Box + typealias Key = String + typealias Attribute = SimpleBox + typealias Attributes = KeyedStorage + + var attributes = Attributes() + var key: String = "" + var element: Box = NullBox() } extension SingleElementBox: Box { diff --git a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift index 0f75bab6..1aada057 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift @@ -53,7 +53,7 @@ struct XMLCoderElement: Equatable { func transformToBoxTree() -> Box { if let value = value, self.attributes.isEmpty, self.elements.isEmpty { - return SingleElementBox(key: key, element: StringBox(value)) + return SingleElementBox(attributes: SingleElementBox.Attributes(), key: key, element: StringBox(value)) } let attributes = KeyedStorage(self.attributes.map { attribute in (key: attribute.key, value: StringBox(attribute.value) as SimpleBox) @@ -246,9 +246,15 @@ struct XMLCoderElement: Equatable { extension XMLCoderElement { init(key: String, box: UnkeyedBox) { - self.init(key: key, elements: box.map { - XMLCoderElement(key: key, box: $0) - }) + if box is [SingleElementBox] { + self.init(key: key, elements: box.map { XMLCoderElement(key: "", box: $0) }) + } else { + self.init(key: key, elements: box.map { XMLCoderElement(key: key, box: $0) }) + } + } + + init(key: String, box: SingleElementBox) { + self.init(key: key, elements: [XMLCoderElement(key: box.key, box: box.element)]) } init(key: String, box: KeyedBox) { @@ -303,10 +309,14 @@ extension XMLCoderElement { self.init(key: key, box: sharedUnkeyedBox.unboxed) case let sharedKeyedBox as SharedBox: self.init(key: key, box: sharedKeyedBox.unboxed) + case let sharedSingleElementBox as SharedBox: + self.init(key: key, box: sharedSingleElementBox.unboxed) case let unkeyedBox as UnkeyedBox: self.init(key: key, box: unkeyedBox) case let keyedBox as KeyedBox: self.init(key: key, box: keyedBox) + case let singleElementBox as SingleElementBox: + self.init(key: key, box: singleElementBox) case let simpleBox as SimpleBox: self.init(key: key, box: simpleBox) case let box: diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index 5ce3d2cb..a2c14b16 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -140,7 +140,10 @@ class XMLDecoderImplementation: Decoder { case let keyed as SharedBox: return XMLUnkeyedDecodingContainer( referencing: self, - wrapping: SharedBox(keyed.withShared { $0.elements.map(SingleElementBox.init) }) + wrapping: SharedBox(keyed.withShared { $0.elements.map { key, box in + SingleElementBox(attributes: SingleElementBox.Attributes(), key: key, element: box) + } + }) ) default: throw DecodingError.typeMismatch( diff --git a/Sources/XMLCoder/Encoder/XMLEncoder.swift b/Sources/XMLCoder/Encoder/XMLEncoder.swift index 7ba007b2..3af11996 100644 --- a/Sources/XMLCoder/Encoder/XMLEncoder.swift +++ b/Sources/XMLCoder/Encoder/XMLEncoder.swift @@ -338,6 +338,8 @@ open class XMLEncoder { elementOrNone = XMLCoderElement(key: rootKey, box: keyedBox) } else if let unkeyedBox = topLevel as? UnkeyedBox { elementOrNone = XMLCoderElement(key: rootKey, box: unkeyedBox) + } else if let singleElementBox = topLevel as? SingleElementBox { + elementOrNone = XMLCoderElement(key: rootKey, box: singleElementBox) } else { fatalError("Unrecognized top-level element of type: \(type(of: topLevel))") } diff --git a/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift b/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift index e0e710ee..67fd38ff 100644 --- a/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift +++ b/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift @@ -64,6 +64,14 @@ class XMLEncoderImplementation: Encoder { // MARK: - Encoder Methods public func container(keyedBy _: Key.Type) -> KeyedEncodingContainer { + if Key.self is XMLChoiceKey.Type { + return singleElementContainer(keyedBy: Key.self) + } else { + return keyedContainer(keyedBy: Key.self) + } + } + + public func keyedContainer(keyedBy _: Key.Type) -> KeyedEncodingContainer { // If an existing keyed container was already requested, return that one. let topContainer: SharedBox if canEncodeNewValue { @@ -81,6 +89,23 @@ class XMLEncoderImplementation: Encoder { return KeyedEncodingContainer(container) } + public func singleElementContainer(keyedBy _: Key.Type) -> KeyedEncodingContainer { + let topContainer: SharedBox + if canEncodeNewValue { + // We haven't yet pushed a container at this level; do so here. + topContainer = storage.pushSingleElementContainer() + } else { + guard let container = storage.lastContainer as? SharedBox else { + preconditionFailure("Attempt to push new (single element) keyed encoding container when already previously encoded at this path.") + } + + topContainer = container + } + + let container = XMLSingleElementEncodingContainer(referencing: self, codingPath: codingPath, wrapping: topContainer) + return KeyedEncodingContainer(container) + } + public func unkeyedContainer() -> UnkeyedEncodingContainer { // If an existing unkeyed container was already requested, return that one. let topContainer: SharedBox diff --git a/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift b/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift index 8a6f4c9e..b27c4e55 100644 --- a/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift +++ b/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift @@ -37,6 +37,12 @@ struct XMLEncodingStorage { return container } + mutating func pushSingleElementContainer() -> SharedBox { + let container = SharedBox(SingleElementBox()) + containers.append(container) + return container + } + mutating func pushUnkeyedContainer() -> SharedBox { let container = SharedBox(UnkeyedBox()) containers.append(container) diff --git a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift index 419bba27..f7479d15 100644 --- a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift @@ -141,6 +141,17 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { public mutating func nestedContainer( keyedBy _: NestedKey.Type, forKey key: Key + ) -> KeyedEncodingContainer { + if NestedKey.self is XMLChoiceKey.Type { + return nestedSingleElementContainer(keyedBy: NestedKey.self, forKey: key) + } else { + return nestedKeyedContainer(keyedBy: NestedKey.self, forKey: key) + } + } + + mutating func nestedKeyedContainer( + keyedBy _: NestedKey.Type, + forKey key: Key ) -> KeyedEncodingContainer { let sharedKeyed = SharedBox(KeyedBox()) @@ -159,6 +170,27 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { return KeyedEncodingContainer(container) } + mutating func nestedSingleElementContainer( + keyedBy _: NestedKey.Type, + forKey key: Key + ) -> KeyedEncodingContainer { + let sharedSingleElement = SharedBox(SingleElementBox()) + + self.container.withShared { container in + container.elements.append(sharedSingleElement, at: _converted(key).stringValue) + } + + codingPath.append(key) + defer { self.codingPath.removeLast() } + + let container = XMLSingleElementEncodingContainer( + referencing: encoder, + codingPath: codingPath, + wrapping: sharedSingleElement + ) + return KeyedEncodingContainer(container) + } + public mutating func nestedUnkeyedContainer( forKey key: Key ) -> UnkeyedEncodingContainer { diff --git a/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift b/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift index 57559aed..79363093 100644 --- a/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift +++ b/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift @@ -24,6 +24,9 @@ class XMLReferencingEncoder: XMLEncoderImplementation { /// Referencing a specific key in a keyed container. case keyed(SharedBox, String) + + /// Referencing a specific key in a keyed container. + case singleElement(SharedBox, String) } // MARK: - Properties @@ -71,6 +74,23 @@ class XMLReferencingEncoder: XMLEncoderImplementation { codingPath.append(key) } + init( + referencing encoder: XMLEncoderImplementation, + key: CodingKey, + convertedKey: CodingKey, + wrapping sharedKeyed: SharedBox + ) { + self.encoder = encoder + reference = .singleElement(sharedKeyed, convertedKey.stringValue) + super.init( + options: encoder.options, + nodeEncodings: encoder.nodeEncodings, + codingPath: encoder.codingPath + ) + + codingPath.append(key) + } + // MARK: - Coding Path Operations override var canEncodeNewValue: Bool { @@ -100,6 +120,11 @@ class XMLReferencingEncoder: XMLEncoderImplementation { sharedKeyedBox.withShared { keyedBox in keyedBox.elements.append(box, at: key) } + case let .singleElement(sharedSingleElementBox, key): + sharedSingleElementBox.withShared { singleElementBox in + singleElementBox.element = box + singleElementBox.key = key + } } } } diff --git a/Sources/XMLCoder/Encoder/XMLSingleElementEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLSingleElementEncodingContainer.swift new file mode 100644 index 00000000..9ea453f9 --- /dev/null +++ b/Sources/XMLCoder/Encoder/XMLSingleElementEncodingContainer.swift @@ -0,0 +1,234 @@ +// +// XMLSingleElementEncodingContainer.swift +// XMLCoder +// +// Created by Benjamin Wetherfield on 7/17/19. +// + +import Foundation + +struct XMLSingleElementEncodingContainer: KeyedEncodingContainerProtocol { + typealias Key = K + + // MARK: Properties + + /// A reference to the encoder we're writing to. + private let encoder: XMLEncoderImplementation + + /// A reference to the container we're writing to. + private var container: SharedBox + + /// The path of coding keys taken to get to this point in encoding. + public private(set) var codingPath: [CodingKey] + + // MARK: - Initialization + + /// Initializes `self` with the given references. + init( + referencing encoder: XMLEncoderImplementation, + codingPath: [CodingKey], + wrapping container: SharedBox + ) { + self.encoder = encoder + self.codingPath = codingPath + self.container = container + } + + // MARK: - Coding Path Operations + + private func _converted(_ key: CodingKey) -> CodingKey { + switch encoder.options.keyEncodingStrategy { + case .useDefaultKeys: + return key + case .convertToSnakeCase: + let newKeyString = XMLEncoder.KeyEncodingStrategy + ._convertToSnakeCase(key.stringValue) + return XMLKey(stringValue: newKeyString, intValue: key.intValue) + case .convertToKebabCase: + let newKeyString = XMLEncoder.KeyEncodingStrategy + ._convertToKebabCase(key.stringValue) + return XMLKey(stringValue: newKeyString, intValue: key.intValue) + case let .custom(converter): + return converter(codingPath + [key]) + case .capitalized: + let newKeyString = XMLEncoder.KeyEncodingStrategy + ._convertToCapitalized(key.stringValue) + return XMLKey(stringValue: newKeyString, intValue: key.intValue) + case .uppercased: + let newKeyString = XMLEncoder.KeyEncodingStrategy + ._convertToUppercased(key.stringValue) + return XMLKey(stringValue: newKeyString, intValue: key.intValue) + case .lowercased: + let newKeyString = XMLEncoder.KeyEncodingStrategy + ._convertToLowercased(key.stringValue) + return XMLKey(stringValue: newKeyString, intValue: key.intValue) + } + } + + // MARK: - KeyedEncodingContainerProtocol Methods + + public mutating func encodeNil(forKey key: Key) throws { + container.withShared { + $0.key = _converted(key).stringValue + $0.element = NullBox() + } + } + + public mutating func encode( + _ value: T, + forKey key: Key + ) throws { + return try encode(value, forKey: key) { encoder, value in + try encoder.box(value) + } + } + + private mutating func encode( + _ value: T, + forKey key: Key, + encode: (XMLEncoderImplementation, T) throws -> Box + ) throws { + defer { + _ = self.encoder.nodeEncodings.removeLast() + self.encoder.codingPath.removeLast() + } + guard let strategy = self.encoder.nodeEncodings.last else { + preconditionFailure( + "Attempt to access node encoding strategy from empty stack." + ) + } + encoder.codingPath.append(key) + let nodeEncodings = encoder.options.nodeEncodingStrategy.nodeEncodings( + forType: T.self, + with: encoder + ) + encoder.nodeEncodings.append(nodeEncodings) + let box = try encode(encoder, value) + + let mySelf = self + let attributeEncoder: (T, Key, Box) throws -> () = { value, key, box in + guard let attribute = box as? SimpleBox else { + throw EncodingError.invalidValue(value, EncodingError.Context( + codingPath: [], + debugDescription: "Complex values cannot be encoded as attributes." + )) + } + mySelf.container.withShared { container in + container.attributes.append(attribute, at: mySelf._converted(key).stringValue) + } + } + + let elementEncoder: (T, Key, Box) throws -> () = { _, key, box in + mySelf.container.withShared { container in + container.element = box + container.key = mySelf._converted(key).stringValue + } + } + + defer { + self = mySelf + } + + switch strategy(key) { + case .attribute: + try attributeEncoder(value, key, box) + case .element: + try elementEncoder(value, key, box) + case .both: + try attributeEncoder(value, key, box) + try elementEncoder(value, key, box) + } + } + + public mutating func nestedContainer( + keyedBy _: NestedKey.Type, + forKey key: Key + ) -> KeyedEncodingContainer { + if NestedKey.self is XMLChoiceKey.Type { + return nestedSingleElementContainer(keyedBy: NestedKey.self, forKey: key) + } else { + return nestedKeyedContainer(keyedBy: NestedKey.self, forKey: key) + } + } + + mutating func nestedKeyedContainer( + keyedBy _: NestedKey.Type, + forKey key: Key + ) -> KeyedEncodingContainer { + let sharedKeyed = SharedBox(KeyedBox()) + + self.container.withShared { container in + container.element = sharedKeyed + container.key = _converted(key).stringValue + } + + codingPath.append(key) + defer { self.codingPath.removeLast() } + + let container = XMLKeyedEncodingContainer( + referencing: encoder, + codingPath: codingPath, + wrapping: sharedKeyed + ) + return KeyedEncodingContainer(container) + } + + mutating func nestedSingleElementContainer( + keyedBy _: NestedKey.Type, + forKey key: Key + ) -> KeyedEncodingContainer { + let sharedSingleElement = SharedBox(SingleElementBox()) + + self.container.withShared { container in + container.element = sharedSingleElement + container.key = _converted(key).stringValue + } + + codingPath.append(key) + defer { self.codingPath.removeLast() } + + let container = XMLSingleElementEncodingContainer( + referencing: encoder, + codingPath: codingPath, + wrapping: sharedSingleElement + ) + return KeyedEncodingContainer(container) + } + + public mutating func nestedUnkeyedContainer( + forKey key: Key + ) -> UnkeyedEncodingContainer { + let sharedUnkeyed = SharedBox(UnkeyedBox()) + + container.withShared { container in + container.element = sharedUnkeyed + container.key = _converted(key).stringValue + } + + codingPath.append(key) + defer { self.codingPath.removeLast() } + return XMLUnkeyedEncodingContainer( + referencing: encoder, + codingPath: codingPath, + wrapping: sharedUnkeyed + ) + } + + public mutating func superEncoder() -> Encoder { + return XMLReferencingEncoder( + referencing: encoder, + key: XMLKey.super, + convertedKey: _converted(XMLKey.super), + wrapping: container + ) + } + + public mutating func superEncoder(forKey key: Key) -> Encoder { + return XMLReferencingEncoder( + referencing: encoder, + key: key, + convertedKey: _converted(key), + wrapping: container + ) + } +} diff --git a/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift index b9846632..5fff4deb 100644 --- a/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift @@ -66,6 +66,14 @@ struct XMLUnkeyedEncodingContainer: UnkeyedEncodingContainer { public mutating func nestedContainer( keyedBy _: NestedKey.Type ) -> KeyedEncodingContainer { + if NestedKey.self is XMLChoiceKey.Type { + return nestedSingleElementContainer(keyedBy: NestedKey.self) + } else { + return nestedKeyedContainer(keyedBy: NestedKey.self) + } + } + + public mutating func nestedKeyedContainer(keyedBy _: NestedKey.Type) -> KeyedEncodingContainer { codingPath.append(XMLKey(index: count)) defer { self.codingPath.removeLast() } @@ -82,6 +90,23 @@ struct XMLUnkeyedEncodingContainer: UnkeyedEncodingContainer { return KeyedEncodingContainer(container) } + public mutating func nestedSingleElementContainer(keyedBy _: NestedKey.Type) -> KeyedEncodingContainer { + codingPath.append(XMLKey(index: count)) + defer { self.codingPath.removeLast() } + + let sharedSingleElement = SharedBox(SingleElementBox()) + self.container.withShared { container in + container.append(sharedSingleElement) + } + + let container = XMLSingleElementEncodingContainer( + referencing: encoder, + codingPath: codingPath, + wrapping: sharedSingleElement + ) + return KeyedEncodingContainer(container) + } + public mutating func nestedUnkeyedContainer() -> UnkeyedEncodingContainer { codingPath.append(XMLKey(index: count)) defer { self.codingPath.removeLast() } diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index 31f033a2..67843e2b 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -200,8 +200,8 @@ "OBJ_125" = { isa = "PBXGroup"; children = ( - "XMLCoder::XMLCoderTests::Product", - "XMLCoder::XMLCoder::Product" + "XMLCoder::XMLCoder::Product", + "XMLCoder::XMLCoderTests::Product" ); name = "Products"; path = ""; @@ -1377,7 +1377,7 @@ }; "OBJ_49" = { isa = "PBXFileReference"; - path = "XMLChoiceEncodable.swift"; + path = "XMLEncoder.swift"; sourceTree = ""; }; "OBJ_5" = { @@ -1405,27 +1405,27 @@ }; "OBJ_50" = { isa = "PBXFileReference"; - path = "XMLEncoder.swift"; + path = "XMLEncoderImplementation.swift"; sourceTree = ""; }; "OBJ_51" = { isa = "PBXFileReference"; - path = "XMLEncoderImplementation.swift"; + path = "XMLEncodingStorage.swift"; sourceTree = ""; }; "OBJ_52" = { isa = "PBXFileReference"; - path = "XMLEncodingStorage.swift"; + path = "XMLKeyedEncodingContainer.swift"; sourceTree = ""; }; "OBJ_53" = { isa = "PBXFileReference"; - path = "XMLKeyedEncodingContainer.swift"; + path = "XMLReferencingEncoder.swift"; sourceTree = ""; }; "OBJ_54" = { isa = "PBXFileReference"; - path = "XMLReferencingEncoder.swift"; + path = "XMLSingleElementEncodingContainer.swift"; sourceTree = ""; }; "OBJ_55" = { diff --git a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From c128f2890091f5ddce9da8546468e0c2b19610a5 Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 17:16:59 -0700 Subject: [PATCH 04/34] Implement choice element decoding Create interface for branching off XMLChoiceKeys Add XMLSingleElementDecodingContainer copy pasta Add XMLDecoderImplementation.singleElementContainer(keyedBy:) copy pasta Push XMLChoiceKeys through singleElementContainer Add XMLUnkeyedDecodingContainer.nestedSingleElementContainer copy pasta Add XMLKeyedDecodingContainer.nestedSingleElementContainer copy pasta Add XMLSingleElementDecodingContainer.nestedSingleElementContainer copy pasta Remove print statement from test Make IntOrStringWrapper.CodingKeys: XMLChoiceKey Make Entry.CodingKeys: XMLChoiceKey Only allow KeyedBoxes pass through to SingleElementDecodingContainer Actually use XMLSingleElementDecodingContainer Make tests pass Rename XMLSingleElementDecodingContainer -> XMLChoiceDecodingContainer Use ChoiceBox Get rid of some prints Unimplement singleElementContainer Unimplement singleElementContainer Tidy xcscheme Unimplement nestedSingleElementContainer Remove dump Replace fatalError with thrown error Omit type label Omit type label Fix formatting --- .../XMLCoder/Auxiliaries/Box/ChoiceBox.swift | 32 + .../Auxiliaries/Box/SingleElementBox.swift | 8 + .../Decoder/XMLChoiceDecodingContainer.swift | 254 ++++++ .../Decoder/XMLDecoderImplementation.swift | 40 +- .../XMLCoderTests/CompositeChoiceTests.swift | 2 +- Tests/XMLCoderTests/NestedChoiceTests.swift | 8 +- Tests/XMLCoderTests/SimpleChoiceTests.swift | 1 - XMLCoder.xcodeproj/project.pbxproj | 814 +++++++++--------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 - 9 files changed, 751 insertions(+), 416 deletions(-) create mode 100644 Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift create mode 100644 Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift delete mode 100644 XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift b/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift new file mode 100644 index 00000000..8f8eb62c --- /dev/null +++ b/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift @@ -0,0 +1,32 @@ +// +// ChoiceBox.swift +// XMLCoder +// +// Created by James Bean on 7/18/19. +// + +/// A `Box` which represents an element which is known to contain an XML choice element. +struct ChoiceBox { + var key: String = "" + var element: Box = NullBox() +} + +extension ChoiceBox: Box { + var isNull: Bool { + return false + } + + func xmlString() -> String? { + return nil + } +} + +extension ChoiceBox: SimpleBox {} + +extension ChoiceBox { + init?(_ keyedBox: KeyedBox) { + guard let firstKey = keyedBox.elements.keys.first else { return nil } + let firstElement = keyedBox.elements[firstKey] + self.init(key: firstKey, element: firstElement) + } +} diff --git a/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift b/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift index cf0f4e49..53a34168 100644 --- a/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift +++ b/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift @@ -27,3 +27,11 @@ extension SingleElementBox: Box { return nil } } + +extension SingleElementBox { + init?(_ keyedBox: KeyedBox) { + guard let firstKey = keyedBox.elements.keys.first else { return nil } + let firstElement = keyedBox.elements[firstKey] + self.init(attributes: keyedBox.attributes, key: firstKey, element: firstElement) + } +} diff --git a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift new file mode 100644 index 00000000..1408f01e --- /dev/null +++ b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift @@ -0,0 +1,254 @@ +// +// XMLChoiceDecodingContainer.swift +// XMLCoder +// +// Created by James Bean on 7/18/19. +// + +import Foundation + +struct XMLChoiceDecodingContainer: KeyedDecodingContainerProtocol { + typealias Key = K + + // MARK: Properties + + /// A reference to the decoder we're reading from. + private let decoder: XMLDecoderImplementation + + /// A reference to the container we're reading from. + private let container: SharedBox + + /// The path of coding keys taken to get to this point in decoding. + public private(set) var codingPath: [CodingKey] + + // MARK: - Initialization + + /// Initializes `self` by referencing the given decoder and container. + init(referencing decoder: XMLDecoderImplementation, wrapping container: SharedBox) { + self.decoder = decoder + + func mapKeys( + _ container: SharedBox, closure: (String) -> String + ) -> SharedBox { + return SharedBox( + ChoiceBox( + key: closure(container.withShared { $0.key }), + element: container.withShared { $0.element } + ) + ) + } + // FIXME: Keep DRY from XMLKeyedDecodingContainer.init + switch decoder.options.keyDecodingStrategy { + case .useDefaultKeys: + self.container = container + case .convertFromSnakeCase: + // Convert the snake case keys in the container to camel case. + // If we hit a duplicate key after conversion, then we'll use the + // first one we saw. Effectively an undefined behavior with dictionaries. + self.container = mapKeys(container) { key in + XMLDecoder.KeyDecodingStrategy._convertFromSnakeCase(key) + } + case .convertFromKebabCase: + self.container = mapKeys(container) { key in + XMLDecoder.KeyDecodingStrategy._convertFromKebabCase(key) + } + case .convertFromCapitalized: + self.container = mapKeys(container) { key in + XMLDecoder.KeyDecodingStrategy._convertFromCapitalized(key) + } + case let .custom(converter): + self.container = mapKeys(container) { key in + let codingPath = decoder.codingPath + [ + XMLKey(stringValue: key, intValue: nil), + ] + return converter(codingPath).stringValue + } + } + codingPath = decoder.codingPath + } + + // MARK: - KeyedDecodingContainerProtocol Methods + + public var allKeys: [Key] { + return container.withShared { Key(stringValue: $0.key) }.map { [$0] } ?? [] + } + + public func contains(_ key: Key) -> Bool { + return container.withShared { $0.key == key.stringValue } + } + + public func decodeNil(forKey key: Key) throws -> Bool { + return container.withShared { $0.element.isNull } + } + + public func decode(_ type: T.Type, forKey key: Key) throws -> T { + guard container.withShared({ $0.key == key.stringValue }) else { + throw DecodingError.typeMismatch( + at: codingPath, + expectation: type, + reality: container + ) + } + return try decodeConcrete(type, forKey: key) + } + + public func nestedContainer( + keyedBy _: NestedKey.Type, forKey key: Key + ) throws -> KeyedDecodingContainer { + decoder.codingPath.append(key) + defer { decoder.codingPath.removeLast() } + + let value = container.withShared { $0.element } + let container: XMLKeyedDecodingContainer + + if let keyedContainer = value as? SharedBox { + container = XMLKeyedDecodingContainer( + referencing: decoder, + wrapping: keyedContainer + ) + } else if let keyedContainer = value as? KeyedBox { + container = XMLKeyedDecodingContainer( + referencing: decoder, + wrapping: SharedBox(keyedContainer) + ) + } else { + throw DecodingError.typeMismatch( + at: codingPath, + expectation: [String: Any].self, + reality: value + ) + } + return KeyedDecodingContainer(container) + } + + public func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { + decoder.codingPath.append(key) + defer { decoder.codingPath.removeLast() } + guard let unkeyedElement = container.withShared({ $0.element }) as? UnkeyedBox else { + throw DecodingError.typeMismatch( + at: codingPath, + expectation: UnkeyedBox.self, + reality: container + ) + } + return XMLUnkeyedDecodingContainer( + referencing: decoder, + wrapping: SharedBox(unkeyedElement) + ) + } + + public func superDecoder() throws -> Decoder { + return try _superDecoder(forKey: XMLKey.super) + } + + public func superDecoder(forKey key: Key) throws -> Decoder { + return try _superDecoder(forKey: key) + } +} + +/// Private functions +extension XMLChoiceDecodingContainer { + private func _errorDescription(of key: CodingKey) -> String { + switch decoder.options.keyDecodingStrategy { + case .convertFromSnakeCase: + // In this case we can attempt to recover the original value by + // reversing the transform + let original = key.stringValue + let converted = XMLEncoder.KeyEncodingStrategy + ._convertToSnakeCase(original) + if converted == original { + return "\(key) (\"\(original)\")" + } else { + return "\(key) (\"\(original)\"), converted to \(converted)" + } + default: + // Otherwise, just report the converted string + return "\(key) (\"\(key.stringValue)\")" + } + } + + private func decodeSignedInteger(_ type: T.Type, + forKey key: Key) throws -> T + where T: BinaryInteger & SignedInteger & Decodable { + return try decodeConcrete(type, forKey: key) + } + + private func decodeUnsignedInteger(_ type: T.Type, + forKey key: Key) throws -> T + where T: BinaryInteger & UnsignedInteger & Decodable { + return try decodeConcrete(type, forKey: key) + } + + private func decodeFloatingPoint(_ type: T.Type, + forKey key: Key) throws -> T + where T: BinaryFloatingPoint & Decodable { + return try decodeConcrete(type, forKey: key) + } + + private func decodeConcrete( + _ type: T.Type, + forKey key: Key + ) throws -> T { + guard let strategy = self.decoder.nodeDecodings.last else { + preconditionFailure( + """ + Attempt to access node decoding strategy from empty stack. + """ + ) + } + let elements = container + .withShared { singleElementBox -> [KeyedBox.Element] in + if let unkeyed = singleElementBox.element as? UnkeyedBox { + return unkeyed + } else if let keyed = singleElementBox.element as? KeyedBox { + return keyed.elements[key.stringValue] + } else { + return [] + } + } + decoder.codingPath.append(key) + let nodeDecodings = decoder.options.nodeDecodingStrategy.nodeDecodings( + forType: T.self, + with: decoder + ) + decoder.nodeDecodings.append(nodeDecodings) + defer { + _ = decoder.nodeDecodings.removeLast() + decoder.codingPath.removeLast() + } + let box: Box = elements + let value: T? + if !(type is AnySequence.Type), let unkeyedBox = box as? UnkeyedBox, + let first = unkeyedBox.first { + value = try decoder.unbox(first) + } else { + value = try decoder.unbox(box) + } + + if value == nil, let type = type as? AnyOptional.Type, + let result = type.init() as? T { + return result + } + + guard let unwrapped = value else { + throw DecodingError.valueNotFound(type, DecodingError.Context( + codingPath: decoder.codingPath, + debugDescription: + "Expected \(type) value but found null instead." + )) + } + return unwrapped + } + + private func _superDecoder(forKey key: CodingKey) throws -> Decoder { + decoder.codingPath.append(key) + defer { decoder.codingPath.removeLast() } + let box: Box = container.withShared { $0.element } + return XMLDecoderImplementation( + referencing: box, + options: decoder.options, + nodeDecodings: decoder.nodeDecodings, + codingPath: decoder.codingPath + ) + } +} diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index a2c14b16..c215aaa8 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -70,9 +70,15 @@ class XMLDecoderImplementation: Decoder { return topContainer } - public func container( - keyedBy keyType: Key.Type - ) throws -> KeyedDecodingContainer { + public func container(keyedBy keyType: Key.Type) throws -> KeyedDecodingContainer { + if Key.self is XMLChoiceKey.Type { + return try choiceContainer(keyedBy: keyType) + } else { + return try keyedContainer(keyedBy: keyType) + } + } + + public func keyedContainer(keyedBy _: Key.Type) throws -> KeyedDecodingContainer { let topContainer = try self.topContainer() switch topContainer { @@ -118,6 +124,26 @@ class XMLDecoderImplementation: Decoder { } } + /// - Returns: A `KeyedDecodingContainer` for an XML choice element. + public func choiceContainer(keyedBy _: Key.Type) throws -> KeyedDecodingContainer { + let topContainer = try self.topContainer() + guard + let keyed = topContainer as? SharedBox, + let choiceBox = ChoiceBox(keyed.withShared { $0 }) + else { + throw DecodingError.typeMismatch( + at: codingPath, + expectation: [String: Any].self, + reality: topContainer + ) + } + let container = XMLChoiceDecodingContainer( + referencing: self, + wrapping: SharedBox(choiceBox) + ) + return KeyedDecodingContainer(container) + } + public func unkeyedContainer() throws -> UnkeyedDecodingContainer { let topContainer = try self.topContainer() @@ -140,10 +166,12 @@ class XMLDecoderImplementation: Decoder { case let keyed as SharedBox: return XMLUnkeyedDecodingContainer( referencing: self, - wrapping: SharedBox(keyed.withShared { $0.elements.map { key, box in - SingleElementBox(attributes: SingleElementBox.Attributes(), key: key, element: box) + wrapping: SharedBox( + keyed.withShared { $0.elements.map { key, box in + SingleElementBox(attributes: .init(), key: key, element: box) + } } - }) + ) ) default: throw DecodingError.typeMismatch( diff --git a/Tests/XMLCoderTests/CompositeChoiceTests.swift b/Tests/XMLCoderTests/CompositeChoiceTests.swift index 757ca42a..d17dc5b9 100644 --- a/Tests/XMLCoderTests/CompositeChoiceTests.swift +++ b/Tests/XMLCoderTests/CompositeChoiceTests.swift @@ -22,7 +22,7 @@ private enum IntOrStringWrapper: Equatable { } extension IntOrStringWrapper: Codable { - enum CodingKeys: String, CodingKey { + enum CodingKeys: String, XMLChoiceKey { case int case string } diff --git a/Tests/XMLCoderTests/NestedChoiceTests.swift b/Tests/XMLCoderTests/NestedChoiceTests.swift index c834920d..5f6a2f31 100644 --- a/Tests/XMLCoderTests/NestedChoiceTests.swift +++ b/Tests/XMLCoderTests/NestedChoiceTests.swift @@ -52,8 +52,8 @@ extension Paragraph: Codable { } } -extension Entry: XMLChoiceCodable { - private enum CodingKeys: String, CodingKey { +extension Entry: Codable { + private enum CodingKeys: String, XMLChoiceKey { case run, properties, br } @@ -61,10 +61,10 @@ extension Entry: XMLChoiceCodable { let container = try decoder.container(keyedBy: CodingKeys.self) do { self = .run(try container.decode(Run.self, forKey: .run)) - } catch DecodingError.keyNotFound { + } catch { do { self = .properties(try container.decode(Properties.self, forKey: .properties)) - } catch DecodingError.keyNotFound { + } catch { self = .br(try container.decode(Break.self, forKey: .br)) } } diff --git a/Tests/XMLCoderTests/SimpleChoiceTests.swift b/Tests/XMLCoderTests/SimpleChoiceTests.swift index 68f034aa..995d153f 100644 --- a/Tests/XMLCoderTests/SimpleChoiceTests.swift +++ b/Tests/XMLCoderTests/SimpleChoiceTests.swift @@ -104,7 +104,6 @@ class SimpleChoiceTests: XCTestCase { .int(5), ]] let encoded = try XMLEncoder().encode(original, withRootKey: "container") - print(String(data: encoded, encoding: .utf8)) let decoded = try XMLDecoder().decode([[IntOrString]].self, from: encoded) XCTAssertEqual(original, decoded) } diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index 67843e2b..567e6ae3 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -17,7 +17,7 @@ "en" ); mainGroup = "OBJ_5"; - productRefGroup = "OBJ_125"; + productRefGroup = "OBJ_127"; projectDirPath = "."; targets = ( "XMLCoder::XMLCoder", @@ -30,7 +30,6 @@ isa = "PBXGroup"; children = ( "OBJ_11", - "OBJ_27", "OBJ_28", "OBJ_29", "OBJ_30", @@ -38,7 +37,8 @@ "OBJ_32", "OBJ_33", "OBJ_34", - "OBJ_35" + "OBJ_35", + "OBJ_36" ); name = "Auxiliaries"; path = "Auxiliaries"; @@ -46,52 +46,52 @@ }; "OBJ_100" = { isa = "PBXFileReference"; - path = "FloatTests.swift"; + path = "DecimalTests.swift"; sourceTree = ""; }; "OBJ_101" = { isa = "PBXFileReference"; - path = "IntTests.swift"; + path = "EmptyTests.swift"; sourceTree = ""; }; "OBJ_102" = { isa = "PBXFileReference"; - path = "KeyedIntTests.swift"; + path = "FloatTests.swift"; sourceTree = ""; }; "OBJ_103" = { isa = "PBXFileReference"; - path = "KeyedTests.swift"; + path = "IntTests.swift"; sourceTree = ""; }; "OBJ_104" = { isa = "PBXFileReference"; - path = "NullTests.swift"; + path = "KeyedIntTests.swift"; sourceTree = ""; }; "OBJ_105" = { isa = "PBXFileReference"; - path = "OptionalTests.swift"; + path = "KeyedTests.swift"; sourceTree = ""; }; "OBJ_106" = { isa = "PBXFileReference"; - path = "StringTests.swift"; + path = "NullTests.swift"; sourceTree = ""; }; "OBJ_107" = { isa = "PBXFileReference"; - path = "UIntTests.swift"; + path = "OptionalTests.swift"; sourceTree = ""; }; "OBJ_108" = { isa = "PBXFileReference"; - path = "URLTests.swift"; + path = "StringTests.swift"; sourceTree = ""; }; "OBJ_109" = { isa = "PBXFileReference"; - path = "UnkeyedIntTests.swift"; + path = "UIntTests.swift"; sourceTree = ""; }; "OBJ_11" = { @@ -111,7 +111,8 @@ "OBJ_23", "OBJ_24", "OBJ_25", - "OBJ_26" + "OBJ_26", + "OBJ_27" ); name = "Box"; path = "Box"; @@ -119,52 +120,52 @@ }; "OBJ_110" = { isa = "PBXFileReference"; - path = "UnkeyedTests.swift"; + path = "URLTests.swift"; sourceTree = ""; }; "OBJ_111" = { isa = "PBXFileReference"; - path = "MixedContainerTest.swift"; + path = "UnkeyedIntTests.swift"; sourceTree = ""; }; "OBJ_112" = { isa = "PBXFileReference"; - path = "NamespaceTest.swift"; + path = "UnkeyedTests.swift"; sourceTree = ""; }; "OBJ_113" = { isa = "PBXFileReference"; - path = "NestedChoiceTests.swift"; + path = "MixedContainerTest.swift"; sourceTree = ""; }; "OBJ_114" = { isa = "PBXFileReference"; - path = "NestingTests.swift"; + path = "NamespaceTest.swift"; sourceTree = ""; }; "OBJ_115" = { isa = "PBXFileReference"; - path = "NodeEncodingStrategyTests.swift"; + path = "NestedChoiceTests.swift"; sourceTree = ""; }; "OBJ_116" = { isa = "PBXFileReference"; - path = "NoteTest.swift"; + path = "NestingTests.swift"; sourceTree = ""; }; "OBJ_117" = { isa = "PBXFileReference"; - path = "PlantCatalog.swift"; + path = "NodeEncodingStrategyTests.swift"; sourceTree = ""; }; "OBJ_118" = { isa = "PBXFileReference"; - path = "PlantTest.swift"; + path = "NoteTest.swift"; sourceTree = ""; }; "OBJ_119" = { isa = "PBXFileReference"; - path = "RJISample.swift"; + path = "PlantCatalog.swift"; sourceTree = ""; }; "OBJ_12" = { @@ -174,49 +175,49 @@ }; "OBJ_120" = { isa = "PBXFileReference"; - path = "RJITest.swift"; + path = "PlantTest.swift"; sourceTree = ""; }; "OBJ_121" = { isa = "PBXFileReference"; - path = "RelationshipsTest.swift"; + path = "RJISample.swift"; sourceTree = ""; }; "OBJ_122" = { isa = "PBXFileReference"; - path = "SimpleChoiceTests.swift"; + path = "RJITest.swift"; sourceTree = ""; }; "OBJ_123" = { isa = "PBXFileReference"; - path = "SingleChildTests.swift"; + path = "RelationshipsTest.swift"; sourceTree = ""; }; "OBJ_124" = { isa = "PBXFileReference"; - path = "SpacePreserveTest.swift"; + path = "SimpleChoiceTests.swift"; sourceTree = ""; }; "OBJ_125" = { + isa = "PBXFileReference"; + path = "SingleChildTests.swift"; + sourceTree = ""; + }; + "OBJ_126" = { + isa = "PBXFileReference"; + path = "SpacePreserveTest.swift"; + sourceTree = ""; + }; + "OBJ_127" = { isa = "PBXGroup"; children = ( - "XMLCoder::XMLCoder::Product", - "XMLCoder::XMLCoderTests::Product" + "XMLCoder::XMLCoderTests::Product", + "XMLCoder::XMLCoder::Product" ); name = "Products"; path = ""; sourceTree = "BUILT_PRODUCTS_DIR"; }; - "OBJ_128" = { - isa = "PBXFileReference"; - path = "CODE_OF_CONDUCT.md"; - sourceTree = ""; - }; - "OBJ_129" = { - isa = "PBXFileReference"; - path = "codecov.yml"; - sourceTree = ""; - }; "OBJ_13" = { isa = "PBXFileReference"; path = "Box.swift"; @@ -224,69 +225,79 @@ }; "OBJ_130" = { isa = "PBXFileReference"; - path = "XMLCoder.podspec"; + path = "CODE_OF_CONDUCT.md"; sourceTree = ""; }; "OBJ_131" = { isa = "PBXFileReference"; - path = "LICENSE"; + path = "codecov.yml"; sourceTree = ""; }; "OBJ_132" = { isa = "PBXFileReference"; - path = "CHANGELOG.md"; + path = "XMLCoder.podspec"; sourceTree = ""; }; "OBJ_133" = { isa = "PBXFileReference"; - path = "test_swiftpm.sh"; + path = "LICENSE"; sourceTree = ""; }; "OBJ_134" = { isa = "PBXFileReference"; - path = "test_xcodebuild.sh"; + path = "CHANGELOG.md"; sourceTree = ""; }; "OBJ_135" = { isa = "PBXFileReference"; - path = "lint.sh"; + path = "test_swiftpm.sh"; sourceTree = ""; }; "OBJ_136" = { isa = "PBXFileReference"; - path = "azure-pipelines.yml"; + path = "test_xcodebuild.sh"; sourceTree = ""; }; "OBJ_137" = { isa = "PBXFileReference"; - path = "README.md"; + path = "lint.sh"; sourceTree = ""; }; "OBJ_138" = { isa = "PBXFileReference"; - path = "docs.sh"; + path = "azure-pipelines.yml"; sourceTree = ""; }; "OBJ_139" = { isa = "PBXFileReference"; - path = "pod.sh"; + path = "README.md"; sourceTree = ""; }; "OBJ_14" = { isa = "PBXFileReference"; - path = "DataBox.swift"; + path = "ChoiceBox.swift"; + sourceTree = ""; + }; + "OBJ_140" = { + isa = "PBXFileReference"; + path = "docs.sh"; sourceTree = ""; }; "OBJ_141" = { + isa = "PBXFileReference"; + path = "pod.sh"; + sourceTree = ""; + }; + "OBJ_143" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_142", - "OBJ_143" + "OBJ_144", + "OBJ_145" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_142" = { + "OBJ_144" = { isa = "XCBuildConfiguration"; buildSettings = { ENABLE_TESTABILITY = "YES"; @@ -327,7 +338,7 @@ }; name = "Debug"; }; - "OBJ_143" = { + "OBJ_145" = { isa = "XCBuildConfiguration"; buildSettings = { ENABLE_TESTABILITY = "YES"; @@ -368,11 +379,9 @@ }; name = "Release"; }; - "OBJ_144" = { + "OBJ_146" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_145", - "OBJ_146", "OBJ_147", "OBJ_148", "OBJ_149", @@ -412,217 +421,229 @@ "OBJ_183", "OBJ_184", "OBJ_185", - "OBJ_186" + "OBJ_186", + "OBJ_187", + "OBJ_188", + "OBJ_189", + "OBJ_190" ); }; - "OBJ_145" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_12"; - }; - "OBJ_146" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_13"; - }; "OBJ_147" = { isa = "PBXBuildFile"; - fileRef = "OBJ_14"; + fileRef = "OBJ_12"; }; "OBJ_148" = { isa = "PBXBuildFile"; - fileRef = "OBJ_15"; + fileRef = "OBJ_13"; }; "OBJ_149" = { isa = "PBXBuildFile"; - fileRef = "OBJ_16"; + fileRef = "OBJ_14"; }; "OBJ_15" = { isa = "PBXFileReference"; - path = "DateBox.swift"; + path = "DataBox.swift"; sourceTree = ""; }; "OBJ_150" = { isa = "PBXBuildFile"; - fileRef = "OBJ_17"; + fileRef = "OBJ_15"; }; "OBJ_151" = { isa = "PBXBuildFile"; - fileRef = "OBJ_18"; + fileRef = "OBJ_16"; }; "OBJ_152" = { isa = "PBXBuildFile"; - fileRef = "OBJ_19"; + fileRef = "OBJ_17"; }; "OBJ_153" = { isa = "PBXBuildFile"; - fileRef = "OBJ_20"; + fileRef = "OBJ_18"; }; "OBJ_154" = { isa = "PBXBuildFile"; - fileRef = "OBJ_21"; + fileRef = "OBJ_19"; }; "OBJ_155" = { isa = "PBXBuildFile"; - fileRef = "OBJ_22"; + fileRef = "OBJ_20"; }; "OBJ_156" = { isa = "PBXBuildFile"; - fileRef = "OBJ_23"; + fileRef = "OBJ_21"; }; "OBJ_157" = { isa = "PBXBuildFile"; - fileRef = "OBJ_24"; + fileRef = "OBJ_22"; }; "OBJ_158" = { isa = "PBXBuildFile"; - fileRef = "OBJ_25"; + fileRef = "OBJ_23"; }; "OBJ_159" = { isa = "PBXBuildFile"; - fileRef = "OBJ_26"; + fileRef = "OBJ_24"; }; "OBJ_16" = { isa = "PBXFileReference"; - path = "DecimalBox.swift"; + path = "DateBox.swift"; sourceTree = ""; }; "OBJ_160" = { isa = "PBXBuildFile"; - fileRef = "OBJ_27"; + fileRef = "OBJ_25"; }; "OBJ_161" = { isa = "PBXBuildFile"; - fileRef = "OBJ_28"; + fileRef = "OBJ_26"; }; "OBJ_162" = { isa = "PBXBuildFile"; - fileRef = "OBJ_29"; + fileRef = "OBJ_27"; }; "OBJ_163" = { isa = "PBXBuildFile"; - fileRef = "OBJ_30"; + fileRef = "OBJ_28"; }; "OBJ_164" = { isa = "PBXBuildFile"; - fileRef = "OBJ_31"; + fileRef = "OBJ_29"; }; "OBJ_165" = { isa = "PBXBuildFile"; - fileRef = "OBJ_32"; + fileRef = "OBJ_30"; }; "OBJ_166" = { isa = "PBXBuildFile"; - fileRef = "OBJ_33"; + fileRef = "OBJ_31"; }; "OBJ_167" = { isa = "PBXBuildFile"; - fileRef = "OBJ_34"; + fileRef = "OBJ_32"; }; "OBJ_168" = { isa = "PBXBuildFile"; - fileRef = "OBJ_35"; + fileRef = "OBJ_33"; }; "OBJ_169" = { isa = "PBXBuildFile"; - fileRef = "OBJ_37"; + fileRef = "OBJ_34"; }; "OBJ_17" = { isa = "PBXFileReference"; - path = "FloatBox.swift"; + path = "DecimalBox.swift"; sourceTree = ""; }; "OBJ_170" = { isa = "PBXBuildFile"; - fileRef = "OBJ_38"; + fileRef = "OBJ_35"; }; "OBJ_171" = { isa = "PBXBuildFile"; - fileRef = "OBJ_39"; + fileRef = "OBJ_36"; }; "OBJ_172" = { isa = "PBXBuildFile"; - fileRef = "OBJ_40"; + fileRef = "OBJ_38"; }; "OBJ_173" = { isa = "PBXBuildFile"; - fileRef = "OBJ_41"; + fileRef = "OBJ_39"; }; "OBJ_174" = { isa = "PBXBuildFile"; - fileRef = "OBJ_42"; + fileRef = "OBJ_40"; }; "OBJ_175" = { isa = "PBXBuildFile"; - fileRef = "OBJ_43"; + fileRef = "OBJ_41"; }; "OBJ_176" = { isa = "PBXBuildFile"; - fileRef = "OBJ_44"; + fileRef = "OBJ_42"; }; "OBJ_177" = { isa = "PBXBuildFile"; - fileRef = "OBJ_46"; + fileRef = "OBJ_43"; }; "OBJ_178" = { isa = "PBXBuildFile"; - fileRef = "OBJ_47"; + fileRef = "OBJ_44"; }; "OBJ_179" = { isa = "PBXBuildFile"; - fileRef = "OBJ_48"; + fileRef = "OBJ_45"; }; "OBJ_18" = { isa = "PBXFileReference"; - path = "IntBox.swift"; + path = "FloatBox.swift"; sourceTree = ""; }; "OBJ_180" = { isa = "PBXBuildFile"; - fileRef = "OBJ_49"; + fileRef = "OBJ_46"; }; "OBJ_181" = { isa = "PBXBuildFile"; - fileRef = "OBJ_50"; + fileRef = "OBJ_48"; }; "OBJ_182" = { isa = "PBXBuildFile"; - fileRef = "OBJ_51"; + fileRef = "OBJ_49"; }; "OBJ_183" = { isa = "PBXBuildFile"; - fileRef = "OBJ_52"; + fileRef = "OBJ_50"; }; "OBJ_184" = { isa = "PBXBuildFile"; - fileRef = "OBJ_53"; + fileRef = "OBJ_51"; }; "OBJ_185" = { isa = "PBXBuildFile"; - fileRef = "OBJ_54"; + fileRef = "OBJ_52"; }; "OBJ_186" = { isa = "PBXBuildFile"; - fileRef = "OBJ_55"; + fileRef = "OBJ_53"; }; "OBJ_187" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_54"; + }; + "OBJ_188" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_55"; + }; + "OBJ_189" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_56"; + }; + "OBJ_19" = { + isa = "PBXFileReference"; + path = "IntBox.swift"; + sourceTree = ""; + }; + "OBJ_190" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_57"; + }; + "OBJ_191" = { isa = "PBXFrameworksBuildPhase"; files = ( ); }; - "OBJ_189" = { + "OBJ_193" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_190", - "OBJ_191" + "OBJ_194", + "OBJ_195" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_19" = { - isa = "PBXFileReference"; - path = "KeyedBox.swift"; - sourceTree = ""; - }; - "OBJ_190" = { + "OBJ_194" = { isa = "XCBuildConfiguration"; buildSettings = { LD = "/usr/bin/true"; @@ -640,7 +661,7 @@ }; name = "Debug"; }; - "OBJ_191" = { + "OBJ_195" = { isa = "XCBuildConfiguration"; buildSettings = { LD = "/usr/bin/true"; @@ -658,65 +679,65 @@ }; name = "Release"; }; - "OBJ_192" = { + "OBJ_196" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_193" + "OBJ_197" ); }; - "OBJ_193" = { + "OBJ_197" = { isa = "PBXBuildFile"; fileRef = "OBJ_6"; }; - "OBJ_195" = { + "OBJ_199" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_196", - "OBJ_197" + "OBJ_200", + "OBJ_201" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_196" = { + "OBJ_2" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_3", + "OBJ_4" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_20" = { + isa = "PBXFileReference"; + path = "KeyedBox.swift"; + sourceTree = ""; + }; + "OBJ_200" = { isa = "XCBuildConfiguration"; buildSettings = { }; name = "Debug"; }; - "OBJ_197" = { + "OBJ_201" = { isa = "XCBuildConfiguration"; buildSettings = { }; name = "Release"; }; - "OBJ_198" = { + "OBJ_202" = { isa = "PBXTargetDependency"; target = "XMLCoder::XMLCoderTests"; }; - "OBJ_2" = { + "OBJ_204" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_3", - "OBJ_4" + "OBJ_205", + "OBJ_206" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_20" = { - isa = "PBXFileReference"; - path = "NullBox.swift"; - sourceTree = ""; - }; - "OBJ_200" = { - isa = "XCConfigurationList"; - buildConfigurations = ( - "OBJ_201", - "OBJ_202" - ); - defaultConfigurationIsVisible = "0"; - defaultConfigurationName = "Release"; - }; - "OBJ_201" = { + "OBJ_205" = { isa = "XCBuildConfiguration"; buildSettings = { CLANG_ENABLE_MODULES = "YES"; @@ -755,7 +776,7 @@ }; name = "Debug"; }; - "OBJ_202" = { + "OBJ_206" = { isa = "XCBuildConfiguration"; buildSettings = { CLANG_ENABLE_MODULES = "YES"; @@ -794,13 +815,9 @@ }; name = "Release"; }; - "OBJ_203" = { + "OBJ_207" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_204", - "OBJ_205", - "OBJ_206", - "OBJ_207", "OBJ_208", "OBJ_209", "OBJ_210", @@ -860,322 +877,326 @@ "OBJ_264", "OBJ_265", "OBJ_266", - "OBJ_267" + "OBJ_267", + "OBJ_268", + "OBJ_269", + "OBJ_270", + "OBJ_271" ); }; - "OBJ_204" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_58"; - }; - "OBJ_205" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_59"; - }; - "OBJ_206" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_61"; - }; - "OBJ_207" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_62"; - }; "OBJ_208" = { isa = "PBXBuildFile"; - fileRef = "OBJ_63"; + fileRef = "OBJ_60"; }; "OBJ_209" = { isa = "PBXBuildFile"; - fileRef = "OBJ_64"; + fileRef = "OBJ_61"; }; "OBJ_21" = { isa = "PBXFileReference"; - path = "SharedBox.swift"; + path = "NullBox.swift"; sourceTree = ""; }; "OBJ_210" = { isa = "PBXBuildFile"; - fileRef = "OBJ_65"; + fileRef = "OBJ_63"; }; "OBJ_211" = { isa = "PBXBuildFile"; - fileRef = "OBJ_66"; + fileRef = "OBJ_64"; }; "OBJ_212" = { isa = "PBXBuildFile"; - fileRef = "OBJ_67"; + fileRef = "OBJ_65"; }; "OBJ_213" = { isa = "PBXBuildFile"; - fileRef = "OBJ_68"; + fileRef = "OBJ_66"; }; "OBJ_214" = { isa = "PBXBuildFile"; - fileRef = "OBJ_70"; + fileRef = "OBJ_67"; }; "OBJ_215" = { isa = "PBXBuildFile"; - fileRef = "OBJ_71"; + fileRef = "OBJ_68"; }; "OBJ_216" = { isa = "PBXBuildFile"; - fileRef = "OBJ_72"; + fileRef = "OBJ_69"; }; "OBJ_217" = { isa = "PBXBuildFile"; - fileRef = "OBJ_73"; + fileRef = "OBJ_70"; }; "OBJ_218" = { isa = "PBXBuildFile"; - fileRef = "OBJ_74"; + fileRef = "OBJ_72"; }; "OBJ_219" = { isa = "PBXBuildFile"; - fileRef = "OBJ_75"; + fileRef = "OBJ_73"; }; "OBJ_22" = { isa = "PBXFileReference"; - path = "SingleElementBox.swift"; + path = "SharedBox.swift"; sourceTree = ""; }; "OBJ_220" = { isa = "PBXBuildFile"; - fileRef = "OBJ_76"; + fileRef = "OBJ_74"; }; "OBJ_221" = { isa = "PBXBuildFile"; - fileRef = "OBJ_77"; + fileRef = "OBJ_75"; }; "OBJ_222" = { isa = "PBXBuildFile"; - fileRef = "OBJ_78"; + fileRef = "OBJ_76"; }; "OBJ_223" = { isa = "PBXBuildFile"; - fileRef = "OBJ_79"; + fileRef = "OBJ_77"; }; "OBJ_224" = { isa = "PBXBuildFile"; - fileRef = "OBJ_80"; + fileRef = "OBJ_78"; }; "OBJ_225" = { isa = "PBXBuildFile"; - fileRef = "OBJ_81"; + fileRef = "OBJ_79"; }; "OBJ_226" = { isa = "PBXBuildFile"; - fileRef = "OBJ_82"; + fileRef = "OBJ_80"; }; "OBJ_227" = { isa = "PBXBuildFile"; - fileRef = "OBJ_83"; + fileRef = "OBJ_81"; }; "OBJ_228" = { isa = "PBXBuildFile"; - fileRef = "OBJ_84"; + fileRef = "OBJ_82"; }; "OBJ_229" = { isa = "PBXBuildFile"; - fileRef = "OBJ_85"; + fileRef = "OBJ_83"; }; "OBJ_23" = { isa = "PBXFileReference"; - path = "StringBox.swift"; + path = "SingleElementBox.swift"; sourceTree = ""; }; "OBJ_230" = { isa = "PBXBuildFile"; - fileRef = "OBJ_86"; + fileRef = "OBJ_84"; }; "OBJ_231" = { isa = "PBXBuildFile"; - fileRef = "OBJ_87"; + fileRef = "OBJ_85"; }; "OBJ_232" = { isa = "PBXBuildFile"; - fileRef = "OBJ_88"; + fileRef = "OBJ_86"; }; "OBJ_233" = { isa = "PBXBuildFile"; - fileRef = "OBJ_89"; + fileRef = "OBJ_87"; }; "OBJ_234" = { isa = "PBXBuildFile"; - fileRef = "OBJ_90"; + fileRef = "OBJ_88"; }; "OBJ_235" = { isa = "PBXBuildFile"; - fileRef = "OBJ_91"; + fileRef = "OBJ_89"; }; "OBJ_236" = { isa = "PBXBuildFile"; - fileRef = "OBJ_92"; + fileRef = "OBJ_90"; }; "OBJ_237" = { isa = "PBXBuildFile"; - fileRef = "OBJ_94"; + fileRef = "OBJ_91"; }; "OBJ_238" = { isa = "PBXBuildFile"; - fileRef = "OBJ_95"; + fileRef = "OBJ_92"; }; "OBJ_239" = { isa = "PBXBuildFile"; - fileRef = "OBJ_96"; + fileRef = "OBJ_93"; }; "OBJ_24" = { isa = "PBXFileReference"; - path = "UIntBox.swift"; + path = "StringBox.swift"; sourceTree = ""; }; "OBJ_240" = { isa = "PBXBuildFile"; - fileRef = "OBJ_97"; + fileRef = "OBJ_94"; }; "OBJ_241" = { isa = "PBXBuildFile"; - fileRef = "OBJ_98"; + fileRef = "OBJ_96"; }; "OBJ_242" = { isa = "PBXBuildFile"; - fileRef = "OBJ_99"; + fileRef = "OBJ_97"; }; "OBJ_243" = { isa = "PBXBuildFile"; - fileRef = "OBJ_100"; + fileRef = "OBJ_98"; }; "OBJ_244" = { isa = "PBXBuildFile"; - fileRef = "OBJ_101"; + fileRef = "OBJ_99"; }; "OBJ_245" = { isa = "PBXBuildFile"; - fileRef = "OBJ_102"; + fileRef = "OBJ_100"; }; "OBJ_246" = { isa = "PBXBuildFile"; - fileRef = "OBJ_103"; + fileRef = "OBJ_101"; }; "OBJ_247" = { isa = "PBXBuildFile"; - fileRef = "OBJ_104"; + fileRef = "OBJ_102"; }; "OBJ_248" = { isa = "PBXBuildFile"; - fileRef = "OBJ_105"; + fileRef = "OBJ_103"; }; "OBJ_249" = { isa = "PBXBuildFile"; - fileRef = "OBJ_106"; + fileRef = "OBJ_104"; }; "OBJ_25" = { isa = "PBXFileReference"; - path = "URLBox.swift"; + path = "UIntBox.swift"; sourceTree = ""; }; "OBJ_250" = { isa = "PBXBuildFile"; - fileRef = "OBJ_107"; + fileRef = "OBJ_105"; }; "OBJ_251" = { isa = "PBXBuildFile"; - fileRef = "OBJ_108"; + fileRef = "OBJ_106"; }; "OBJ_252" = { isa = "PBXBuildFile"; - fileRef = "OBJ_109"; + fileRef = "OBJ_107"; }; "OBJ_253" = { isa = "PBXBuildFile"; - fileRef = "OBJ_110"; + fileRef = "OBJ_108"; }; "OBJ_254" = { isa = "PBXBuildFile"; - fileRef = "OBJ_111"; + fileRef = "OBJ_109"; }; "OBJ_255" = { isa = "PBXBuildFile"; - fileRef = "OBJ_112"; + fileRef = "OBJ_110"; }; "OBJ_256" = { isa = "PBXBuildFile"; - fileRef = "OBJ_113"; + fileRef = "OBJ_111"; }; "OBJ_257" = { isa = "PBXBuildFile"; - fileRef = "OBJ_114"; + fileRef = "OBJ_112"; }; "OBJ_258" = { isa = "PBXBuildFile"; - fileRef = "OBJ_115"; + fileRef = "OBJ_113"; }; "OBJ_259" = { isa = "PBXBuildFile"; - fileRef = "OBJ_116"; + fileRef = "OBJ_114"; }; "OBJ_26" = { isa = "PBXFileReference"; - path = "UnkeyedBox.swift"; + path = "URLBox.swift"; sourceTree = ""; }; "OBJ_260" = { isa = "PBXBuildFile"; - fileRef = "OBJ_117"; + fileRef = "OBJ_115"; }; "OBJ_261" = { isa = "PBXBuildFile"; - fileRef = "OBJ_118"; + fileRef = "OBJ_116"; }; "OBJ_262" = { isa = "PBXBuildFile"; - fileRef = "OBJ_119"; + fileRef = "OBJ_117"; }; "OBJ_263" = { isa = "PBXBuildFile"; - fileRef = "OBJ_120"; + fileRef = "OBJ_118"; }; "OBJ_264" = { isa = "PBXBuildFile"; - fileRef = "OBJ_121"; + fileRef = "OBJ_119"; }; "OBJ_265" = { isa = "PBXBuildFile"; - fileRef = "OBJ_122"; + fileRef = "OBJ_120"; }; "OBJ_266" = { isa = "PBXBuildFile"; - fileRef = "OBJ_123"; + fileRef = "OBJ_121"; }; "OBJ_267" = { isa = "PBXBuildFile"; - fileRef = "OBJ_124"; + fileRef = "OBJ_122"; }; "OBJ_268" = { - isa = "PBXFrameworksBuildPhase"; - files = ( - "OBJ_269" - ); + isa = "PBXBuildFile"; + fileRef = "OBJ_123"; }; "OBJ_269" = { isa = "PBXBuildFile"; - fileRef = "XMLCoder::XMLCoder::Product"; + fileRef = "OBJ_124"; }; "OBJ_27" = { isa = "PBXFileReference"; - path = "ISO8601DateFormatter.swift"; + path = "UnkeyedBox.swift"; sourceTree = ""; }; "OBJ_270" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_125"; + }; + "OBJ_271" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_126"; + }; + "OBJ_272" = { + isa = "PBXFrameworksBuildPhase"; + files = ( + "OBJ_273" + ); + }; + "OBJ_273" = { + isa = "PBXBuildFile"; + fileRef = "XMLCoder::XMLCoder::Product"; + }; + "OBJ_274" = { isa = "PBXTargetDependency"; target = "XMLCoder::XMLCoder"; }; "OBJ_28" = { isa = "PBXFileReference"; - path = "KeyedStorage.swift"; + path = "ISO8601DateFormatter.swift"; sourceTree = ""; }; "OBJ_29" = { isa = "PBXFileReference"; - path = "Metatypes.swift"; + path = "KeyedStorage.swift"; sourceTree = ""; }; "OBJ_3" = { @@ -1221,63 +1242,64 @@ }; "OBJ_30" = { isa = "PBXFileReference"; - path = "String+Extensions.swift"; + path = "Metatypes.swift"; sourceTree = ""; }; "OBJ_31" = { isa = "PBXFileReference"; - path = "XMLChoiceKey.swift"; + path = "String+Extensions.swift"; sourceTree = ""; }; "OBJ_32" = { isa = "PBXFileReference"; - path = "XMLCoderElement.swift"; + path = "XMLChoiceKey.swift"; sourceTree = ""; }; "OBJ_33" = { isa = "PBXFileReference"; - path = "XMLHeader.swift"; + path = "XMLCoderElement.swift"; sourceTree = ""; }; "OBJ_34" = { isa = "PBXFileReference"; - path = "XMLKey.swift"; + path = "XMLHeader.swift"; sourceTree = ""; }; "OBJ_35" = { isa = "PBXFileReference"; - path = "XMLStackParser.swift"; + path = "XMLKey.swift"; sourceTree = ""; }; "OBJ_36" = { + isa = "PBXFileReference"; + path = "XMLStackParser.swift"; + sourceTree = ""; + }; + "OBJ_37" = { isa = "PBXGroup"; children = ( - "OBJ_37", "OBJ_38", "OBJ_39", "OBJ_40", "OBJ_41", "OBJ_42", "OBJ_43", - "OBJ_44" + "OBJ_44", + "OBJ_45", + "OBJ_46" ); name = "Decoder"; path = "Decoder"; sourceTree = ""; }; - "OBJ_37" = { - isa = "PBXFileReference"; - path = "DecodingErrorExtension.swift"; - sourceTree = ""; - }; "OBJ_38" = { isa = "PBXFileReference"; - path = "DynamicNodeDecoding.swift"; + path = "DecodingErrorExtension.swift"; sourceTree = ""; }; "OBJ_39" = { isa = "PBXFileReference"; - path = "SingleValueDecodingContainer.swift"; + path = "DynamicNodeDecoding.swift"; sourceTree = ""; }; "OBJ_4" = { @@ -1319,34 +1341,42 @@ }; "OBJ_40" = { isa = "PBXFileReference"; - path = "XMLDecoder.swift"; + path = "SingleValueDecodingContainer.swift"; sourceTree = ""; }; "OBJ_41" = { isa = "PBXFileReference"; - path = "XMLDecoderImplementation.swift"; + path = "XMLChoiceDecodingContainer.swift"; sourceTree = ""; }; "OBJ_42" = { isa = "PBXFileReference"; - path = "XMLDecodingStorage.swift"; + path = "XMLDecoder.swift"; sourceTree = ""; }; "OBJ_43" = { isa = "PBXFileReference"; - path = "XMLKeyedDecodingContainer.swift"; + path = "XMLDecoderImplementation.swift"; sourceTree = ""; }; "OBJ_44" = { isa = "PBXFileReference"; - path = "XMLUnkeyedDecodingContainer.swift"; + path = "XMLDecodingStorage.swift"; sourceTree = ""; }; "OBJ_45" = { + isa = "PBXFileReference"; + path = "XMLKeyedDecodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_46" = { + isa = "PBXFileReference"; + path = "XMLUnkeyedDecodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_47" = { isa = "PBXGroup"; children = ( - "OBJ_46", - "OBJ_47", "OBJ_48", "OBJ_49", "OBJ_50", @@ -1354,30 +1384,22 @@ "OBJ_52", "OBJ_53", "OBJ_54", - "OBJ_55" + "OBJ_55", + "OBJ_56", + "OBJ_57" ); name = "Encoder"; path = "Encoder"; sourceTree = ""; }; - "OBJ_46" = { - isa = "PBXFileReference"; - path = "DynamicNodeEncoding.swift"; - sourceTree = ""; - }; - "OBJ_47" = { - isa = "PBXFileReference"; - path = "EncodingErrorExtension.swift"; - sourceTree = ""; - }; "OBJ_48" = { isa = "PBXFileReference"; - path = "SingleValueEncodingContainer.swift"; + path = "DynamicNodeEncoding.swift"; sourceTree = ""; }; "OBJ_49" = { isa = "PBXFileReference"; - path = "XMLEncoder.swift"; + path = "EncodingErrorExtension.swift"; sourceTree = ""; }; "OBJ_5" = { @@ -1385,10 +1407,8 @@ children = ( "OBJ_6", "OBJ_7", - "OBJ_56", - "OBJ_125", - "OBJ_128", - "OBJ_129", + "OBJ_58", + "OBJ_127", "OBJ_130", "OBJ_131", "OBJ_132", @@ -1398,62 +1418,72 @@ "OBJ_136", "OBJ_137", "OBJ_138", - "OBJ_139" + "OBJ_139", + "OBJ_140", + "OBJ_141" ); path = ""; sourceTree = ""; }; "OBJ_50" = { isa = "PBXFileReference"; - path = "XMLEncoderImplementation.swift"; + path = "SingleValueEncodingContainer.swift"; sourceTree = ""; }; "OBJ_51" = { isa = "PBXFileReference"; - path = "XMLEncodingStorage.swift"; + path = "XMLEncoder.swift"; sourceTree = ""; }; "OBJ_52" = { isa = "PBXFileReference"; - path = "XMLKeyedEncodingContainer.swift"; + path = "XMLEncoderImplementation.swift"; sourceTree = ""; }; "OBJ_53" = { isa = "PBXFileReference"; - path = "XMLReferencingEncoder.swift"; + path = "XMLEncodingStorage.swift"; sourceTree = ""; }; "OBJ_54" = { isa = "PBXFileReference"; - path = "XMLSingleElementEncodingContainer.swift"; + path = "XMLKeyedEncodingContainer.swift"; sourceTree = ""; }; "OBJ_55" = { isa = "PBXFileReference"; - path = "XMLUnkeyedEncodingContainer.swift"; + path = "XMLReferencingEncoder.swift"; sourceTree = ""; }; "OBJ_56" = { + isa = "PBXFileReference"; + path = "XMLSingleElementEncodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_57" = { + isa = "PBXFileReference"; + path = "XMLUnkeyedEncodingContainer.swift"; + sourceTree = ""; + }; + "OBJ_58" = { isa = "PBXGroup"; children = ( - "OBJ_57" + "OBJ_59" ); name = "Tests"; path = ""; sourceTree = "SOURCE_ROOT"; }; - "OBJ_57" = { + "OBJ_59" = { isa = "PBXGroup"; children = ( - "OBJ_58", - "OBJ_59", "OBJ_60", - "OBJ_66", - "OBJ_67", + "OBJ_61", + "OBJ_62", "OBJ_68", "OBJ_69", - "OBJ_83", - "OBJ_84", + "OBJ_70", + "OBJ_71", "OBJ_85", "OBJ_86", "OBJ_87", @@ -1463,8 +1493,8 @@ "OBJ_91", "OBJ_92", "OBJ_93", - "OBJ_111", - "OBJ_112", + "OBJ_94", + "OBJ_95", "OBJ_113", "OBJ_114", "OBJ_115", @@ -1476,86 +1506,95 @@ "OBJ_121", "OBJ_122", "OBJ_123", - "OBJ_124" + "OBJ_124", + "OBJ_125", + "OBJ_126" ); name = "XMLCoderTests"; path = "Tests/XMLCoderTests"; sourceTree = "SOURCE_ROOT"; }; - "OBJ_58" = { + "OBJ_6" = { isa = "PBXFileReference"; - path = "AttributedEnumIntrinsicTest.swift"; + explicitFileType = "sourcecode.swift"; + path = "Package.swift"; sourceTree = ""; }; - "OBJ_59" = { + "OBJ_60" = { isa = "PBXFileReference"; - path = "AttributedIntrinsicTest.swift"; + path = "AttributedEnumIntrinsicTest.swift"; sourceTree = ""; }; - "OBJ_6" = { + "OBJ_61" = { isa = "PBXFileReference"; - explicitFileType = "sourcecode.swift"; - path = "Package.swift"; + path = "AttributedIntrinsicTest.swift"; sourceTree = ""; }; - "OBJ_60" = { + "OBJ_62" = { isa = "PBXGroup"; children = ( - "OBJ_61", - "OBJ_62", "OBJ_63", "OBJ_64", - "OBJ_65" + "OBJ_65", + "OBJ_66", + "OBJ_67" ); name = "Auxiliary"; path = "Auxiliary"; sourceTree = ""; }; - "OBJ_61" = { + "OBJ_63" = { isa = "PBXFileReference"; path = "String+ExtensionsTests.swift"; sourceTree = ""; }; - "OBJ_62" = { + "OBJ_64" = { isa = "PBXFileReference"; path = "XMLElementTests.swift"; sourceTree = ""; }; - "OBJ_63" = { + "OBJ_65" = { isa = "PBXFileReference"; path = "XMLHeaderTests.swift"; sourceTree = ""; }; - "OBJ_64" = { + "OBJ_66" = { isa = "PBXFileReference"; path = "XMLKeyTests.swift"; sourceTree = ""; }; - "OBJ_65" = { + "OBJ_67" = { isa = "PBXFileReference"; path = "XMLStackParserTests.swift"; sourceTree = ""; }; - "OBJ_66" = { + "OBJ_68" = { isa = "PBXFileReference"; path = "BenchmarkTests.swift"; sourceTree = ""; }; - "OBJ_67" = { + "OBJ_69" = { isa = "PBXFileReference"; path = "BooksTest.swift"; sourceTree = ""; }; - "OBJ_68" = { + "OBJ_7" = { + isa = "PBXGroup"; + children = ( + "OBJ_8" + ); + name = "Sources"; + path = ""; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_70" = { isa = "PBXFileReference"; path = "BorderTest.swift"; sourceTree = ""; }; - "OBJ_69" = { + "OBJ_71" = { isa = "PBXGroup"; children = ( - "OBJ_70", - "OBJ_71", "OBJ_72", "OBJ_73", "OBJ_74", @@ -1566,69 +1605,52 @@ "OBJ_79", "OBJ_80", "OBJ_81", - "OBJ_82" + "OBJ_82", + "OBJ_83", + "OBJ_84" ); name = "Box"; path = "Box"; sourceTree = ""; }; - "OBJ_7" = { - isa = "PBXGroup"; - children = ( - "OBJ_8" - ); - name = "Sources"; - path = ""; - sourceTree = "SOURCE_ROOT"; - }; - "OBJ_70" = { - isa = "PBXFileReference"; - path = "BoolBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_71" = { - isa = "PBXFileReference"; - path = "DataBoxTests.swift"; - sourceTree = ""; - }; "OBJ_72" = { isa = "PBXFileReference"; - path = "DateBoxTests.swift"; + path = "BoolBoxTests.swift"; sourceTree = ""; }; "OBJ_73" = { isa = "PBXFileReference"; - path = "DecimalBoxTests.swift"; + path = "DataBoxTests.swift"; sourceTree = ""; }; "OBJ_74" = { isa = "PBXFileReference"; - path = "FloatBoxTests.swift"; + path = "DateBoxTests.swift"; sourceTree = ""; }; "OBJ_75" = { isa = "PBXFileReference"; - path = "IntBoxTests.swift"; + path = "DecimalBoxTests.swift"; sourceTree = ""; }; "OBJ_76" = { isa = "PBXFileReference"; - path = "KeyedBoxTests.swift"; + path = "FloatBoxTests.swift"; sourceTree = ""; }; "OBJ_77" = { isa = "PBXFileReference"; - path = "NullBoxTests.swift"; + path = "IntBoxTests.swift"; sourceTree = ""; }; "OBJ_78" = { isa = "PBXFileReference"; - path = "SharedBoxTests.swift"; + path = "KeyedBoxTests.swift"; sourceTree = ""; }; "OBJ_79" = { isa = "PBXFileReference"; - path = "StringBoxTests.swift"; + path = "NullBoxTests.swift"; sourceTree = ""; }; "OBJ_8" = { @@ -1636,8 +1658,8 @@ children = ( "OBJ_9", "OBJ_10", - "OBJ_36", - "OBJ_45" + "OBJ_37", + "OBJ_47" ); name = "XMLCoder"; path = "Sources/XMLCoder"; @@ -1645,52 +1667,52 @@ }; "OBJ_80" = { isa = "PBXFileReference"; - path = "UIntBoxTests.swift"; + path = "SharedBoxTests.swift"; sourceTree = ""; }; "OBJ_81" = { isa = "PBXFileReference"; - path = "URLBoxTests.swift"; + path = "StringBoxTests.swift"; sourceTree = ""; }; "OBJ_82" = { isa = "PBXFileReference"; - path = "UnkeyedBoxTests.swift"; + path = "UIntBoxTests.swift"; sourceTree = ""; }; "OBJ_83" = { isa = "PBXFileReference"; - path = "BreakfastTest.swift"; + path = "URLBoxTests.swift"; sourceTree = ""; }; "OBJ_84" = { isa = "PBXFileReference"; - path = "CDCatalog.swift"; + path = "UnkeyedBoxTests.swift"; sourceTree = ""; }; "OBJ_85" = { isa = "PBXFileReference"; - path = "CDTest.swift"; + path = "BreakfastTest.swift"; sourceTree = ""; }; "OBJ_86" = { isa = "PBXFileReference"; - path = "ClassTests.swift"; + path = "CDCatalog.swift"; sourceTree = ""; }; "OBJ_87" = { isa = "PBXFileReference"; - path = "CompositeChoiceTests.swift"; + path = "CDTest.swift"; sourceTree = ""; }; "OBJ_88" = { isa = "PBXFileReference"; - path = "DecodingContainerTests.swift"; + path = "ClassTests.swift"; sourceTree = ""; }; "OBJ_89" = { isa = "PBXFileReference"; - path = "DynamicNodeDecodingTest.swift"; + path = "CompositeChoiceTests.swift"; sourceTree = ""; }; "OBJ_9" = { @@ -1700,24 +1722,32 @@ }; "OBJ_90" = { isa = "PBXFileReference"; - path = "DynamicNodeEncodingTest.swift"; + path = "DecodingContainerTests.swift"; sourceTree = ""; }; "OBJ_91" = { isa = "PBXFileReference"; - path = "ErrorContextTest.swift"; + path = "DynamicNodeDecodingTest.swift"; sourceTree = ""; }; "OBJ_92" = { isa = "PBXFileReference"; - path = "KeyDecodingAndEncodingStrategyTests.swift"; + path = "DynamicNodeEncodingTest.swift"; sourceTree = ""; }; "OBJ_93" = { + isa = "PBXFileReference"; + path = "ErrorContextTest.swift"; + sourceTree = ""; + }; + "OBJ_94" = { + isa = "PBXFileReference"; + path = "KeyDecodingAndEncodingStrategyTests.swift"; + sourceTree = ""; + }; + "OBJ_95" = { isa = "PBXGroup"; children = ( - "OBJ_94", - "OBJ_95", "OBJ_96", "OBJ_97", "OBJ_98", @@ -1732,47 +1762,39 @@ "OBJ_107", "OBJ_108", "OBJ_109", - "OBJ_110" + "OBJ_110", + "OBJ_111", + "OBJ_112" ); name = "Minimal"; path = "Minimal"; sourceTree = ""; }; - "OBJ_94" = { - isa = "PBXFileReference"; - path = "BoolTests.swift"; - sourceTree = ""; - }; - "OBJ_95" = { - isa = "PBXFileReference"; - path = "BoxTreeTests.swift"; - sourceTree = ""; - }; "OBJ_96" = { isa = "PBXFileReference"; - path = "DataTests.swift"; + path = "BoolTests.swift"; sourceTree = ""; }; "OBJ_97" = { isa = "PBXFileReference"; - path = "DateTests.swift"; + path = "BoxTreeTests.swift"; sourceTree = ""; }; "OBJ_98" = { isa = "PBXFileReference"; - path = "DecimalTests.swift"; + path = "DataTests.swift"; sourceTree = ""; }; "OBJ_99" = { isa = "PBXFileReference"; - path = "EmptyTests.swift"; + path = "DateTests.swift"; sourceTree = ""; }; "XMLCoder::SwiftPMPackageDescription" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_189"; + buildConfigurationList = "OBJ_193"; buildPhases = ( - "OBJ_192" + "OBJ_196" ); dependencies = ( ); @@ -1782,10 +1804,10 @@ }; "XMLCoder::XMLCoder" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_141"; + buildConfigurationList = "OBJ_143"; buildPhases = ( - "OBJ_144", - "OBJ_187" + "OBJ_146", + "OBJ_191" ); dependencies = ( ); @@ -1801,24 +1823,24 @@ }; "XMLCoder::XMLCoderPackageTests::ProductTarget" = { isa = "PBXAggregateTarget"; - buildConfigurationList = "OBJ_195"; + buildConfigurationList = "OBJ_199"; buildPhases = ( ); dependencies = ( - "OBJ_198" + "OBJ_202" ); name = "XMLCoderPackageTests"; productName = "XMLCoderPackageTests"; }; "XMLCoder::XMLCoderTests" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_200"; + buildConfigurationList = "OBJ_204"; buildPhases = ( - "OBJ_203", - "OBJ_268" + "OBJ_207", + "OBJ_272" ); dependencies = ( - "OBJ_270" + "OBJ_274" ); name = "XMLCoderTests"; productName = "XMLCoderTests"; diff --git a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - From 312c4f5d07fc3cbdd71ff9f65740a563e64704e1 Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 17:36:17 -0700 Subject: [PATCH 05/34] Refactor clean up choice coding implementation Rename singleElementBox -> choiceBox Create privileged path for Choices Sweep away commented-out code Add comment Don't treat top-level choice Tighten up impl Rename singleElementContainer method -> choiceContainer Whoops that was the Encoder Add unkeyed single element container et al. Add messages to fatal errors Omit type label Switch to ChoiceBox based implementation Revert pretty printing special casing Add passing encode tests for choice elements with attributes Add xcodeproj debris Remove use of XMLUnkeyedSingleElementDecodingContainer Remove unreached code in XMLChoiceDecodingContainer Remove superDecoder methods because enums ain't classes Put all the decode impl in one place Whitespace --- .../XMLCoder/Auxiliaries/Box/ChoiceBox.swift | 6 +- .../Auxiliaries/XMLCoderElement.swift | 23 +- .../Decoder/XMLChoiceDecodingContainer.swift | 170 +------ .../Decoder/XMLDecoderImplementation.swift | 33 +- .../Decoder/XMLUnkeyedDecodingContainer.swift | 14 +- ...swift => XMLChoiceEncodingContainer.swift} | 59 +-- Sources/XMLCoder/Encoder/XMLEncoder.swift | 4 +- .../Encoder/XMLEncoderImplementation.swift | 16 +- .../XMLCoder/Encoder/XMLEncodingStorage.swift | 6 +- .../Encoder/XMLKeyedEncodingContainer.swift | 14 +- .../Encoder/XMLReferencingEncoder.swift | 16 +- .../Encoder/XMLUnkeyedEncodingContainer.swift | 18 +- .../NestedAttributeChoiceTests.swift | 144 ++++++ Tests/XMLCoderTests/SimpleChoiceTests.swift | 13 +- XMLCoder.xcodeproj/project.pbxproj | 417 +++++++++--------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + 16 files changed, 491 insertions(+), 470 deletions(-) rename Sources/XMLCoder/Encoder/{XMLSingleElementEncodingContainer.swift => XMLChoiceEncodingContainer.swift} (78%) create mode 100644 Tests/XMLCoderTests/NestedAttributeChoiceTests.swift create mode 100644 XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift b/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift index 8f8eb62c..9b8c2e20 100644 --- a/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift +++ b/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift @@ -26,7 +26,11 @@ extension ChoiceBox: SimpleBox {} extension ChoiceBox { init?(_ keyedBox: KeyedBox) { guard let firstKey = keyedBox.elements.keys.first else { return nil } - let firstElement = keyedBox.elements[firstKey] + guard let firstElement = keyedBox.elements[firstKey].first else { return nil } self.init(key: firstKey, element: firstElement) } + + init(_ singleElementBox: SingleElementBox) { + self.init(key: singleElementBox.key, element: singleElementBox.element) + } } diff --git a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift index 1aada057..25f1cdf2 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift @@ -52,9 +52,6 @@ struct XMLCoderElement: Equatable { } func transformToBoxTree() -> Box { - if let value = value, self.attributes.isEmpty, self.elements.isEmpty { - return SingleElementBox(attributes: SingleElementBox.Attributes(), key: key, element: StringBox(value)) - } let attributes = KeyedStorage(self.attributes.map { attribute in (key: attribute.key, value: StringBox(attribute.value) as SimpleBox) }) @@ -105,7 +102,7 @@ struct XMLCoderElement: Equatable { ) -> String { var string = "" string += element._toXMLString( - indented: level, withCDATA: cdata, formatting: formatting + indented: level + 1, withCDATA: cdata, formatting: formatting ) string += prettyPrinted ? "\n" : "" return string @@ -246,14 +243,16 @@ struct XMLCoderElement: Equatable { extension XMLCoderElement { init(key: String, box: UnkeyedBox) { - if box is [SingleElementBox] { - self.init(key: key, elements: box.map { XMLCoderElement(key: "", box: $0) }) + if let containsChoice = box as? [ChoiceBox] { + self.init(key: key, elements: containsChoice.map { + return XMLCoderElement(key: $0.key, box: $0.element) + }) } else { self.init(key: key, elements: box.map { XMLCoderElement(key: key, box: $0) }) } } - - init(key: String, box: SingleElementBox) { + + init(key: String, box: ChoiceBox) { self.init(key: key, elements: [XMLCoderElement(key: box.key, box: box.element)]) } @@ -309,14 +308,14 @@ extension XMLCoderElement { self.init(key: key, box: sharedUnkeyedBox.unboxed) case let sharedKeyedBox as SharedBox: self.init(key: key, box: sharedKeyedBox.unboxed) - case let sharedSingleElementBox as SharedBox: - self.init(key: key, box: sharedSingleElementBox.unboxed) + case let sharedChoiceBox as SharedBox: + self.init(key: key, box: sharedChoiceBox.unboxed) case let unkeyedBox as UnkeyedBox: self.init(key: key, box: unkeyedBox) case let keyedBox as KeyedBox: self.init(key: key, box: keyedBox) - case let singleElementBox as SingleElementBox: - self.init(key: key, box: singleElementBox) + case let choiceBox as ChoiceBox: + self.init(key: key, box: choiceBox) case let simpleBox as SimpleBox: self.init(key: key, box: simpleBox) case let box: diff --git a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift index 1408f01e..b80a8e3a 100644 --- a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift @@ -7,6 +7,7 @@ import Foundation +/// Container specialized for decoding XML choice elements. struct XMLChoiceDecodingContainer: KeyedDecodingContainerProtocol { typealias Key = K @@ -82,130 +83,12 @@ struct XMLChoiceDecodingContainer: KeyedDecodingContainerProtocol } public func decode(_ type: T.Type, forKey key: Key) throws -> T { - guard container.withShared({ $0.key == key.stringValue }) else { - throw DecodingError.typeMismatch( - at: codingPath, - expectation: type, - reality: container - ) - } - return try decodeConcrete(type, forKey: key) - } - - public func nestedContainer( - keyedBy _: NestedKey.Type, forKey key: Key - ) throws -> KeyedDecodingContainer { - decoder.codingPath.append(key) - defer { decoder.codingPath.removeLast() } - - let value = container.withShared { $0.element } - let container: XMLKeyedDecodingContainer - - if let keyedContainer = value as? SharedBox { - container = XMLKeyedDecodingContainer( - referencing: decoder, - wrapping: keyedContainer - ) - } else if let keyedContainer = value as? KeyedBox { - container = XMLKeyedDecodingContainer( - referencing: decoder, - wrapping: SharedBox(keyedContainer) - ) - } else { - throw DecodingError.typeMismatch( - at: codingPath, - expectation: [String: Any].self, - reality: value - ) - } - return KeyedDecodingContainer(container) - } - - public func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { - decoder.codingPath.append(key) - defer { decoder.codingPath.removeLast() } - guard let unkeyedElement = container.withShared({ $0.element }) as? UnkeyedBox else { - throw DecodingError.typeMismatch( - at: codingPath, - expectation: UnkeyedBox.self, - reality: container - ) - } - return XMLUnkeyedDecodingContainer( - referencing: decoder, - wrapping: SharedBox(unkeyedElement) - ) - } - - public func superDecoder() throws -> Decoder { - return try _superDecoder(forKey: XMLKey.super) - } - - public func superDecoder(forKey key: Key) throws -> Decoder { - return try _superDecoder(forKey: key) - } -} - -/// Private functions -extension XMLChoiceDecodingContainer { - private func _errorDescription(of key: CodingKey) -> String { - switch decoder.options.keyDecodingStrategy { - case .convertFromSnakeCase: - // In this case we can attempt to recover the original value by - // reversing the transform - let original = key.stringValue - let converted = XMLEncoder.KeyEncodingStrategy - ._convertToSnakeCase(original) - if converted == original { - return "\(key) (\"\(original)\")" - } else { - return "\(key) (\"\(original)\"), converted to \(converted)" - } - default: - // Otherwise, just report the converted string - return "\(key) (\"\(key.stringValue)\")" + guard container.withShared({ $0.key == key.stringValue }), key is XMLChoiceKey else { + throw DecodingError.typeMismatch(at: codingPath, expectation: type, reality: container) } - } - - private func decodeSignedInteger(_ type: T.Type, - forKey key: Key) throws -> T - where T: BinaryInteger & SignedInteger & Decodable { - return try decodeConcrete(type, forKey: key) - } - - private func decodeUnsignedInteger(_ type: T.Type, - forKey key: Key) throws -> T - where T: BinaryInteger & UnsignedInteger & Decodable { - return try decodeConcrete(type, forKey: key) - } - - private func decodeFloatingPoint(_ type: T.Type, - forKey key: Key) throws -> T - where T: BinaryFloatingPoint & Decodable { - return try decodeConcrete(type, forKey: key) - } - - private func decodeConcrete( - _ type: T.Type, - forKey key: Key - ) throws -> T { guard let strategy = self.decoder.nodeDecodings.last else { - preconditionFailure( - """ - Attempt to access node decoding strategy from empty stack. - """ - ) + preconditionFailure("Attempt to access node decoding strategy from empty stack.") } - let elements = container - .withShared { singleElementBox -> [KeyedBox.Element] in - if let unkeyed = singleElementBox.element as? UnkeyedBox { - return unkeyed - } else if let keyed = singleElementBox.element as? KeyedBox { - return keyed.elements[key.stringValue] - } else { - return [] - } - } decoder.codingPath.append(key) let nodeDecodings = decoder.options.nodeDecodingStrategy.nodeDecodings( forType: T.self, @@ -216,39 +99,24 @@ extension XMLChoiceDecodingContainer { _ = decoder.nodeDecodings.removeLast() decoder.codingPath.removeLast() } - let box: Box = elements - let value: T? - if !(type is AnySequence.Type), let unkeyedBox = box as? UnkeyedBox, - let first = unkeyedBox.first { - value = try decoder.unbox(first) - } else { - value = try decoder.unbox(box) - } + return try decoder.unbox(container.withShared { $0.element }) + } - if value == nil, let type = type as? AnyOptional.Type, - let result = type.init() as? T { - return result - } + public func nestedContainer( + keyedBy _: NestedKey.Type, forKey key: Key + ) throws -> KeyedDecodingContainer { + fatalError("Choice elements cannot produce a nested container.") + } - guard let unwrapped = value else { - throw DecodingError.valueNotFound(type, DecodingError.Context( - codingPath: decoder.codingPath, - debugDescription: - "Expected \(type) value but found null instead." - )) - } - return unwrapped + public func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { + fatalError("Choice elements cannot produce a unkeyed nested container.") } - private func _superDecoder(forKey key: CodingKey) throws -> Decoder { - decoder.codingPath.append(key) - defer { decoder.codingPath.removeLast() } - let box: Box = container.withShared { $0.element } - return XMLDecoderImplementation( - referencing: box, - options: decoder.options, - nodeDecodings: decoder.nodeDecodings, - codingPath: decoder.codingPath - ) + public func superDecoder() throws -> Decoder { + fatalError("XMLChoiceDecodingContainer cannot produce a super decoder.") + } + + public func superDecoder(forKey key: Key) throws -> Decoder { + fatalError("XMLChoiceDecodingContainer cannot produce a super decoder.") } } diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index c215aaa8..907bf82a 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -127,10 +127,16 @@ class XMLDecoderImplementation: Decoder { /// - Returns: A `KeyedDecodingContainer` for an XML choice element. public func choiceContainer(keyedBy _: Key.Type) throws -> KeyedDecodingContainer { let topContainer = try self.topContainer() - guard - let keyed = topContainer as? SharedBox, - let choiceBox = ChoiceBox(keyed.withShared { $0 }) - else { + let choiceBox: ChoiceBox? + switch topContainer { + case let choice as ChoiceBox: + choiceBox = choice + case let keyed as SharedBox: + choiceBox = ChoiceBox(keyed.withShared { $0 }) + default: + choiceBox = nil + } + guard let box = choiceBox else { throw DecodingError.typeMismatch( at: codingPath, expectation: [String: Any].self, @@ -139,7 +145,7 @@ class XMLDecoderImplementation: Decoder { } let container = XMLChoiceDecodingContainer( referencing: self, - wrapping: SharedBox(choiceBox) + wrapping: SharedBox(box) ) return KeyedDecodingContainer(container) } @@ -404,21 +410,8 @@ extension XMLDecoderImplementation { return urlBox.unboxed } - func unbox(_ box: SingleElementBox) throws -> T { - do { - return try unbox(box.element) - } catch { - // FIXME: Find a more economical way to unbox a `SingleElementBox` ! - return try unbox( - KeyedBox( - elements: KeyedStorage([(box.key, box.element)]), - attributes: [] - ) - ) - } - } - func unbox(_ box: Box) throws -> T { + let decoded: T? let type = T.self @@ -438,8 +431,6 @@ extension XMLDecoderImplementation { type == String.self || type == NSString.self, let value = (try unbox(box) as String) as? T { decoded = value - } else if let singleElementBox = box as? SingleElementBox { - decoded = try unbox(singleElementBox) } else { storage.push(container: box) defer { diff --git a/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift index ec0059f3..98f25d38 100644 --- a/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift @@ -102,7 +102,19 @@ struct XMLUnkeyedDecodingContainer: UnkeyedDecodingContainer { unkeyedBox[self.currentIndex] } - let value = try decode(decoder, box) + var value: T? + if let singleElement = box as? SingleElementBox { + do { + // Drill down to the element in the case of an nested unkeyed element + value = try decode(decoder, singleElement.element) + } catch { + // Specialize for choice elements + value = try decode(decoder, ChoiceBox(key: singleElement.key, element: singleElement.element)) + } + } else { + value = try decode(decoder, box) + } + defer { currentIndex += 1 } diff --git a/Sources/XMLCoder/Encoder/XMLSingleElementEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift similarity index 78% rename from Sources/XMLCoder/Encoder/XMLSingleElementEncodingContainer.swift rename to Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift index 9ea453f9..2f7e4862 100644 --- a/Sources/XMLCoder/Encoder/XMLSingleElementEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift @@ -7,7 +7,7 @@ import Foundation -struct XMLSingleElementEncodingContainer: KeyedEncodingContainerProtocol { +struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol { typealias Key = K // MARK: Properties @@ -16,8 +16,8 @@ struct XMLSingleElementEncodingContainer: KeyedEncodingContainerPr private let encoder: XMLEncoderImplementation /// A reference to the container we're writing to. - private var container: SharedBox - + private var container: SharedBox + /// The path of coding keys taken to get to this point in encoding. public private(set) var codingPath: [CodingKey] @@ -27,8 +27,8 @@ struct XMLSingleElementEncodingContainer: KeyedEncodingContainerPr init( referencing encoder: XMLEncoderImplementation, codingPath: [CodingKey], - wrapping container: SharedBox - ) { + wrapping container: SharedBox + ) { self.encoder = encoder self.codingPath = codingPath self.container = container @@ -92,11 +92,6 @@ struct XMLSingleElementEncodingContainer: KeyedEncodingContainerPr _ = self.encoder.nodeEncodings.removeLast() self.encoder.codingPath.removeLast() } - guard let strategy = self.encoder.nodeEncodings.last else { - preconditionFailure( - "Attempt to access node encoding strategy from empty stack." - ) - } encoder.codingPath.append(key) let nodeEncodings = encoder.options.nodeEncodingStrategy.nodeEncodings( forType: T.self, @@ -106,18 +101,6 @@ struct XMLSingleElementEncodingContainer: KeyedEncodingContainerPr let box = try encode(encoder, value) let mySelf = self - let attributeEncoder: (T, Key, Box) throws -> () = { value, key, box in - guard let attribute = box as? SimpleBox else { - throw EncodingError.invalidValue(value, EncodingError.Context( - codingPath: [], - debugDescription: "Complex values cannot be encoded as attributes." - )) - } - mySelf.container.withShared { container in - container.attributes.append(attribute, at: mySelf._converted(key).stringValue) - } - } - let elementEncoder: (T, Key, Box) throws -> () = { _, key, box in mySelf.container.withShared { container in container.element = box @@ -128,16 +111,8 @@ struct XMLSingleElementEncodingContainer: KeyedEncodingContainerPr defer { self = mySelf } - - switch strategy(key) { - case .attribute: - try attributeEncoder(value, key, box) - case .element: - try elementEncoder(value, key, box) - case .both: - try attributeEncoder(value, key, box) - try elementEncoder(value, key, box) - } + + try elementEncoder(value, key, box) } public mutating func nestedContainer( @@ -145,7 +120,7 @@ struct XMLSingleElementEncodingContainer: KeyedEncodingContainerPr forKey key: Key ) -> KeyedEncodingContainer { if NestedKey.self is XMLChoiceKey.Type { - return nestedSingleElementContainer(keyedBy: NestedKey.self, forKey: key) + return nestedChoiceContainer(keyedBy: NestedKey.self, forKey: key) } else { return nestedKeyedContainer(keyedBy: NestedKey.self, forKey: key) } @@ -172,25 +147,25 @@ struct XMLSingleElementEncodingContainer: KeyedEncodingContainerPr ) return KeyedEncodingContainer(container) } - - mutating func nestedSingleElementContainer( + + mutating func nestedChoiceContainer( keyedBy _: NestedKey.Type, forKey key: Key - ) -> KeyedEncodingContainer { - let sharedSingleElement = SharedBox(SingleElementBox()) - + ) -> KeyedEncodingContainer { + let sharedChoice = SharedBox(ChoiceBox()) + self.container.withShared { container in - container.element = sharedSingleElement + container.element = sharedChoice container.key = _converted(key).stringValue } codingPath.append(key) defer { self.codingPath.removeLast() } - - let container = XMLSingleElementEncodingContainer( + + let container = XMLChoiceEncodingContainer( referencing: encoder, codingPath: codingPath, - wrapping: sharedSingleElement + wrapping: sharedChoice ) return KeyedEncodingContainer(container) } diff --git a/Sources/XMLCoder/Encoder/XMLEncoder.swift b/Sources/XMLCoder/Encoder/XMLEncoder.swift index 3af11996..a1b4a3e0 100644 --- a/Sources/XMLCoder/Encoder/XMLEncoder.swift +++ b/Sources/XMLCoder/Encoder/XMLEncoder.swift @@ -338,8 +338,8 @@ open class XMLEncoder { elementOrNone = XMLCoderElement(key: rootKey, box: keyedBox) } else if let unkeyedBox = topLevel as? UnkeyedBox { elementOrNone = XMLCoderElement(key: rootKey, box: unkeyedBox) - } else if let singleElementBox = topLevel as? SingleElementBox { - elementOrNone = XMLCoderElement(key: rootKey, box: singleElementBox) + } else if let choiceBox = topLevel as? ChoiceBox { + elementOrNone = XMLCoderElement(key: rootKey, box: choiceBox) } else { fatalError("Unrecognized top-level element of type: \(type(of: topLevel))") } diff --git a/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift b/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift index 67fd38ff..171dd981 100644 --- a/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift +++ b/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift @@ -65,7 +65,7 @@ class XMLEncoderImplementation: Encoder { public func container(keyedBy _: Key.Type) -> KeyedEncodingContainer { if Key.self is XMLChoiceKey.Type { - return singleElementContainer(keyedBy: Key.self) + return choiceContainer(keyedBy: Key.self) } else { return keyedContainer(keyedBy: Key.self) } @@ -88,21 +88,21 @@ class XMLEncoderImplementation: Encoder { let container = XMLKeyedEncodingContainer(referencing: self, codingPath: codingPath, wrapping: topContainer) return KeyedEncodingContainer(container) } - - public func singleElementContainer(keyedBy _: Key.Type) -> KeyedEncodingContainer { - let topContainer: SharedBox + + public func choiceContainer(keyedBy _: Key.Type) -> KeyedEncodingContainer { + let topContainer: SharedBox if canEncodeNewValue { // We haven't yet pushed a container at this level; do so here. - topContainer = storage.pushSingleElementContainer() + topContainer = storage.pushChoiceContainer() } else { - guard let container = storage.lastContainer as? SharedBox else { + guard let container = storage.lastContainer as? SharedBox else { preconditionFailure("Attempt to push new (single element) keyed encoding container when already previously encoded at this path.") } topContainer = container } - - let container = XMLSingleElementEncodingContainer(referencing: self, codingPath: codingPath, wrapping: topContainer) + + let container = XMLChoiceEncodingContainer(referencing: self, codingPath: codingPath, wrapping: topContainer) return KeyedEncodingContainer(container) } diff --git a/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift b/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift index b27c4e55..86040f96 100644 --- a/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift +++ b/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift @@ -36,9 +36,9 @@ struct XMLEncodingStorage { containers.append(container) return container } - - mutating func pushSingleElementContainer() -> SharedBox { - let container = SharedBox(SingleElementBox()) + + mutating func pushChoiceContainer() -> SharedBox { + let container = SharedBox(ChoiceBox()) containers.append(container) return container } diff --git a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift index f7479d15..6c58f430 100644 --- a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift @@ -173,20 +173,20 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { mutating func nestedSingleElementContainer( keyedBy _: NestedKey.Type, forKey key: Key - ) -> KeyedEncodingContainer { - let sharedSingleElement = SharedBox(SingleElementBox()) - + ) -> KeyedEncodingContainer { + let sharedChoice = SharedBox(ChoiceBox()) + self.container.withShared { container in - container.elements.append(sharedSingleElement, at: _converted(key).stringValue) + container.elements.append(sharedChoice, at: _converted(key).stringValue) } codingPath.append(key) defer { self.codingPath.removeLast() } - - let container = XMLSingleElementEncodingContainer( + + let container = XMLChoiceEncodingContainer( referencing: encoder, codingPath: codingPath, - wrapping: sharedSingleElement + wrapping: sharedChoice ) return KeyedEncodingContainer(container) } diff --git a/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift b/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift index 79363093..74bdd9ac 100644 --- a/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift +++ b/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift @@ -26,7 +26,7 @@ class XMLReferencingEncoder: XMLEncoderImplementation { case keyed(SharedBox, String) /// Referencing a specific key in a keyed container. - case singleElement(SharedBox, String) + case choice(SharedBox, String) } // MARK: - Properties @@ -78,10 +78,10 @@ class XMLReferencingEncoder: XMLEncoderImplementation { referencing encoder: XMLEncoderImplementation, key: CodingKey, convertedKey: CodingKey, - wrapping sharedKeyed: SharedBox - ) { + wrapping sharedKeyed: SharedBox + ) { self.encoder = encoder - reference = .singleElement(sharedKeyed, convertedKey.stringValue) + reference = .choice(sharedKeyed, convertedKey.stringValue) super.init( options: encoder.options, nodeEncodings: encoder.nodeEncodings, @@ -120,10 +120,10 @@ class XMLReferencingEncoder: XMLEncoderImplementation { sharedKeyedBox.withShared { keyedBox in keyedBox.elements.append(box, at: key) } - case let .singleElement(sharedSingleElementBox, key): - sharedSingleElementBox.withShared { singleElementBox in - singleElementBox.element = box - singleElementBox.key = key + case let .choice(sharedChoiceBox, key): + sharedChoiceBox.withShared { choiceBox in + choiceBox.element = box + choiceBox.key = key } } } diff --git a/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift index 5fff4deb..c0e18470 100644 --- a/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift @@ -67,7 +67,7 @@ struct XMLUnkeyedEncodingContainer: UnkeyedEncodingContainer { keyedBy _: NestedKey.Type ) -> KeyedEncodingContainer { if NestedKey.self is XMLChoiceKey.Type { - return nestedSingleElementContainer(keyedBy: NestedKey.self) + return nestedChoiceContainer(keyedBy: NestedKey.self) } else { return nestedKeyedContainer(keyedBy: NestedKey.self) } @@ -89,20 +89,20 @@ struct XMLUnkeyedEncodingContainer: UnkeyedEncodingContainer { ) return KeyedEncodingContainer(container) } - - public mutating func nestedSingleElementContainer(keyedBy _: NestedKey.Type) -> KeyedEncodingContainer { + + public mutating func nestedChoiceContainer(keyedBy _: NestedKey.Type) -> KeyedEncodingContainer { codingPath.append(XMLKey(index: count)) defer { self.codingPath.removeLast() } - - let sharedSingleElement = SharedBox(SingleElementBox()) + + let sharedChoice = SharedBox(ChoiceBox()) self.container.withShared { container in - container.append(sharedSingleElement) + container.append(sharedChoice) } - - let container = XMLSingleElementEncodingContainer( + + let container = XMLChoiceEncodingContainer( referencing: encoder, codingPath: codingPath, - wrapping: sharedSingleElement + wrapping: sharedChoice ) return KeyedEncodingContainer(container) } diff --git a/Tests/XMLCoderTests/NestedAttributeChoiceTests.swift b/Tests/XMLCoderTests/NestedAttributeChoiceTests.swift new file mode 100644 index 00000000..a715cd6d --- /dev/null +++ b/Tests/XMLCoderTests/NestedAttributeChoiceTests.swift @@ -0,0 +1,144 @@ +// +// NestedAttributeChoiceTests.swift +// XMLCoderTests +// +// Created by Benjamin Wetherfield on 7/23/19. +// + +import XCTest +import XMLCoder + +private struct Container: Equatable { + let paragraphs: [Paragraph] +} + +private struct Paragraph: Equatable { + let entries: [Entry] +} + +private enum Entry: Equatable { + case run(Run) + case properties(Properties) + case br(Break) +} + +private struct Run: Codable, Equatable, DynamicNodeEncoding { + let id: Int + let text: String + + static func nodeEncoding(for key: CodingKey) -> XMLEncoder.NodeEncoding { + switch key { + case CodingKeys.id: + return .attribute + default: + return .element + } + } +} + +private struct Properties: Codable, Equatable, DynamicNodeEncoding { + let id: Int + let title: String + + static func nodeEncoding(for key: CodingKey) -> XMLEncoder.NodeEncoding { + return .attribute + } +} + +private struct Break: Codable, Equatable { } + +extension Container: Codable { + enum CodingKeys: String, CodingKey { + case paragraphs = "p" + } +} + +extension Paragraph: Codable { + init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + self.entries = try container.decode([Entry].self) + } + + func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + try container.encode(entries) + } +} + +extension Entry: Codable { + private enum CodingKeys: String, XMLChoiceKey { + case run, properties, br + } + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + do { + self = .run(try container.decode(Run.self, forKey: .run)) + } catch { + do { + self = .properties(try container.decode(Properties.self, forKey: .properties)) + } catch { + self = .br(try container.decode(Break.self, forKey: .br)) + } + } + } + + func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + switch self { + case let .run(value): + try container.encode(value, forKey: .run) + case let .properties(value): + try container.encode(value, forKey: .properties) + case let .br(value): + try container.encode(value, forKey: .br) + } + } +} + +class NestedAttributeChoiceTests: XCTestCase { + + private var encoder: XMLEncoder { + let encoder = XMLEncoder() + encoder.outputFormatting = [.prettyPrinted] + return encoder + } + + func testNestedEnumsEncoding() throws { + let xml = """ + +

+
+ + I am answering it again. + + +

+

+ + I am answering it again. + +
+

+
+ """ + let value = Container( + paragraphs: [ + Paragraph( + entries: [ + .br(Break()), + .run(Run(id: 1518, text: "I am answering it again.")), + .properties(Properties(id: 431, title: "A Word About Wake Times")), + ] + ), + Paragraph( + entries: [ + .run(Run(id: 1519, text: "I am answering it again.")), + .br(Break()), + ] + ) + ] + ) + let encoded = try encoder.encode(value, withRootKey: "container") + XCTAssertEqual(String(data: encoded, encoding: .utf8), xml) + } +} diff --git a/Tests/XMLCoderTests/SimpleChoiceTests.swift b/Tests/XMLCoderTests/SimpleChoiceTests.swift index 995d153f..8905cd9e 100644 --- a/Tests/XMLCoderTests/SimpleChoiceTests.swift +++ b/Tests/XMLCoderTests/SimpleChoiceTests.swift @@ -31,6 +31,7 @@ extension IntOrString: Codable { init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + print(type(of: container)) do { self = .int(try container.decode(Int.self, forKey: .int)) } catch { @@ -41,14 +42,22 @@ extension IntOrString: Codable { class SimpleChoiceTests: XCTestCase { func testIntOrStringIntDecoding() throws { - let xml = "42" + let xml = """ + + 42 + + """ let result = try XMLDecoder().decode(IntOrString.self, from: xml.data(using: .utf8)!) let expected = IntOrString.int(42) XCTAssertEqual(result, expected) } func testIntOrStringStringDecoding() throws { - let xml = "forty-two" + let xml = """ + + forty-two" + + """ let result = try XMLDecoder().decode(IntOrString.self, from: xml.data(using: .utf8)!) let expected = IntOrString.string("forty-two") XCTAssertEqual(result, expected) diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index 567e6ae3..e6308436 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -17,7 +17,7 @@ "en" ); mainGroup = "OBJ_5"; - productRefGroup = "OBJ_127"; + productRefGroup = "OBJ_128"; projectDirPath = "."; targets = ( "XMLCoder::XMLCoder", @@ -145,27 +145,27 @@ }; "OBJ_115" = { isa = "PBXFileReference"; - path = "NestedChoiceTests.swift"; + path = "NestedAttributeChoiceTests.swift"; sourceTree = ""; }; "OBJ_116" = { isa = "PBXFileReference"; - path = "NestingTests.swift"; + path = "NestedChoiceTests.swift"; sourceTree = ""; }; "OBJ_117" = { isa = "PBXFileReference"; - path = "NodeEncodingStrategyTests.swift"; + path = "NestingTests.swift"; sourceTree = ""; }; "OBJ_118" = { isa = "PBXFileReference"; - path = "NoteTest.swift"; + path = "NodeEncodingStrategyTests.swift"; sourceTree = ""; }; "OBJ_119" = { isa = "PBXFileReference"; - path = "PlantCatalog.swift"; + path = "NoteTest.swift"; sourceTree = ""; }; "OBJ_12" = { @@ -175,44 +175,49 @@ }; "OBJ_120" = { isa = "PBXFileReference"; - path = "PlantTest.swift"; + path = "PlantCatalog.swift"; sourceTree = ""; }; "OBJ_121" = { isa = "PBXFileReference"; - path = "RJISample.swift"; + path = "PlantTest.swift"; sourceTree = ""; }; "OBJ_122" = { isa = "PBXFileReference"; - path = "RJITest.swift"; + path = "RJISample.swift"; sourceTree = ""; }; "OBJ_123" = { isa = "PBXFileReference"; - path = "RelationshipsTest.swift"; + path = "RJITest.swift"; sourceTree = ""; }; "OBJ_124" = { isa = "PBXFileReference"; - path = "SimpleChoiceTests.swift"; + path = "RelationshipsTest.swift"; sourceTree = ""; }; "OBJ_125" = { isa = "PBXFileReference"; - path = "SingleChildTests.swift"; + path = "SimpleChoiceTests.swift"; sourceTree = ""; }; "OBJ_126" = { isa = "PBXFileReference"; - path = "SpacePreserveTest.swift"; + path = "SingleChildTests.swift"; sourceTree = ""; }; "OBJ_127" = { + isa = "PBXFileReference"; + path = "SpacePreserveTest.swift"; + sourceTree = ""; + }; + "OBJ_128" = { isa = "PBXGroup"; children = ( - "XMLCoder::XMLCoderTests::Product", - "XMLCoder::XMLCoder::Product" + "XMLCoder::XMLCoder::Product", + "XMLCoder::XMLCoderTests::Product" ); name = "Products"; path = ""; @@ -223,54 +228,49 @@ path = "Box.swift"; sourceTree = ""; }; - "OBJ_130" = { - isa = "PBXFileReference"; - path = "CODE_OF_CONDUCT.md"; - sourceTree = ""; - }; "OBJ_131" = { isa = "PBXFileReference"; - path = "codecov.yml"; + path = "CODE_OF_CONDUCT.md"; sourceTree = ""; }; "OBJ_132" = { isa = "PBXFileReference"; - path = "XMLCoder.podspec"; + path = "codecov.yml"; sourceTree = ""; }; "OBJ_133" = { isa = "PBXFileReference"; - path = "LICENSE"; + path = "XMLCoder.podspec"; sourceTree = ""; }; "OBJ_134" = { isa = "PBXFileReference"; - path = "CHANGELOG.md"; + path = "LICENSE"; sourceTree = ""; }; "OBJ_135" = { isa = "PBXFileReference"; - path = "test_swiftpm.sh"; + path = "CHANGELOG.md"; sourceTree = ""; }; "OBJ_136" = { isa = "PBXFileReference"; - path = "test_xcodebuild.sh"; + path = "test_swiftpm.sh"; sourceTree = ""; }; "OBJ_137" = { isa = "PBXFileReference"; - path = "lint.sh"; + path = "test_xcodebuild.sh"; sourceTree = ""; }; "OBJ_138" = { isa = "PBXFileReference"; - path = "azure-pipelines.yml"; + path = "lint.sh"; sourceTree = ""; }; "OBJ_139" = { isa = "PBXFileReference"; - path = "README.md"; + path = "azure-pipelines.yml"; sourceTree = ""; }; "OBJ_14" = { @@ -280,24 +280,29 @@ }; "OBJ_140" = { isa = "PBXFileReference"; - path = "docs.sh"; + path = "README.md"; sourceTree = ""; }; "OBJ_141" = { + isa = "PBXFileReference"; + path = "docs.sh"; + sourceTree = ""; + }; + "OBJ_142" = { isa = "PBXFileReference"; path = "pod.sh"; sourceTree = ""; }; - "OBJ_143" = { + "OBJ_144" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_144", - "OBJ_145" + "OBJ_145", + "OBJ_146" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_144" = { + "OBJ_145" = { isa = "XCBuildConfiguration"; buildSettings = { ENABLE_TESTABILITY = "YES"; @@ -338,7 +343,7 @@ }; name = "Debug"; }; - "OBJ_145" = { + "OBJ_146" = { isa = "XCBuildConfiguration"; buildSettings = { ENABLE_TESTABILITY = "YES"; @@ -379,10 +384,9 @@ }; name = "Release"; }; - "OBJ_146" = { + "OBJ_147" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_147", "OBJ_148", "OBJ_149", "OBJ_150", @@ -425,20 +429,17 @@ "OBJ_187", "OBJ_188", "OBJ_189", - "OBJ_190" + "OBJ_190", + "OBJ_191" ); }; - "OBJ_147" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_12"; - }; "OBJ_148" = { isa = "PBXBuildFile"; - fileRef = "OBJ_13"; + fileRef = "OBJ_12"; }; "OBJ_149" = { isa = "PBXBuildFile"; - fileRef = "OBJ_14"; + fileRef = "OBJ_13"; }; "OBJ_15" = { isa = "PBXFileReference"; @@ -447,43 +448,43 @@ }; "OBJ_150" = { isa = "PBXBuildFile"; - fileRef = "OBJ_15"; + fileRef = "OBJ_14"; }; "OBJ_151" = { isa = "PBXBuildFile"; - fileRef = "OBJ_16"; + fileRef = "OBJ_15"; }; "OBJ_152" = { isa = "PBXBuildFile"; - fileRef = "OBJ_17"; + fileRef = "OBJ_16"; }; "OBJ_153" = { isa = "PBXBuildFile"; - fileRef = "OBJ_18"; + fileRef = "OBJ_17"; }; "OBJ_154" = { isa = "PBXBuildFile"; - fileRef = "OBJ_19"; + fileRef = "OBJ_18"; }; "OBJ_155" = { isa = "PBXBuildFile"; - fileRef = "OBJ_20"; + fileRef = "OBJ_19"; }; "OBJ_156" = { isa = "PBXBuildFile"; - fileRef = "OBJ_21"; + fileRef = "OBJ_20"; }; "OBJ_157" = { isa = "PBXBuildFile"; - fileRef = "OBJ_22"; + fileRef = "OBJ_21"; }; "OBJ_158" = { isa = "PBXBuildFile"; - fileRef = "OBJ_23"; + fileRef = "OBJ_22"; }; "OBJ_159" = { isa = "PBXBuildFile"; - fileRef = "OBJ_24"; + fileRef = "OBJ_23"; }; "OBJ_16" = { isa = "PBXFileReference"; @@ -492,43 +493,43 @@ }; "OBJ_160" = { isa = "PBXBuildFile"; - fileRef = "OBJ_25"; + fileRef = "OBJ_24"; }; "OBJ_161" = { isa = "PBXBuildFile"; - fileRef = "OBJ_26"; + fileRef = "OBJ_25"; }; "OBJ_162" = { isa = "PBXBuildFile"; - fileRef = "OBJ_27"; + fileRef = "OBJ_26"; }; "OBJ_163" = { isa = "PBXBuildFile"; - fileRef = "OBJ_28"; + fileRef = "OBJ_27"; }; "OBJ_164" = { isa = "PBXBuildFile"; - fileRef = "OBJ_29"; + fileRef = "OBJ_28"; }; "OBJ_165" = { isa = "PBXBuildFile"; - fileRef = "OBJ_30"; + fileRef = "OBJ_29"; }; "OBJ_166" = { isa = "PBXBuildFile"; - fileRef = "OBJ_31"; + fileRef = "OBJ_30"; }; "OBJ_167" = { isa = "PBXBuildFile"; - fileRef = "OBJ_32"; + fileRef = "OBJ_31"; }; "OBJ_168" = { isa = "PBXBuildFile"; - fileRef = "OBJ_33"; + fileRef = "OBJ_32"; }; "OBJ_169" = { isa = "PBXBuildFile"; - fileRef = "OBJ_34"; + fileRef = "OBJ_33"; }; "OBJ_17" = { isa = "PBXFileReference"; @@ -537,43 +538,43 @@ }; "OBJ_170" = { isa = "PBXBuildFile"; - fileRef = "OBJ_35"; + fileRef = "OBJ_34"; }; "OBJ_171" = { isa = "PBXBuildFile"; - fileRef = "OBJ_36"; + fileRef = "OBJ_35"; }; "OBJ_172" = { isa = "PBXBuildFile"; - fileRef = "OBJ_38"; + fileRef = "OBJ_36"; }; "OBJ_173" = { isa = "PBXBuildFile"; - fileRef = "OBJ_39"; + fileRef = "OBJ_38"; }; "OBJ_174" = { isa = "PBXBuildFile"; - fileRef = "OBJ_40"; + fileRef = "OBJ_39"; }; "OBJ_175" = { isa = "PBXBuildFile"; - fileRef = "OBJ_41"; + fileRef = "OBJ_40"; }; "OBJ_176" = { isa = "PBXBuildFile"; - fileRef = "OBJ_42"; + fileRef = "OBJ_41"; }; "OBJ_177" = { isa = "PBXBuildFile"; - fileRef = "OBJ_43"; + fileRef = "OBJ_42"; }; "OBJ_178" = { isa = "PBXBuildFile"; - fileRef = "OBJ_44"; + fileRef = "OBJ_43"; }; "OBJ_179" = { isa = "PBXBuildFile"; - fileRef = "OBJ_45"; + fileRef = "OBJ_44"; }; "OBJ_18" = { isa = "PBXFileReference"; @@ -582,43 +583,43 @@ }; "OBJ_180" = { isa = "PBXBuildFile"; - fileRef = "OBJ_46"; + fileRef = "OBJ_45"; }; "OBJ_181" = { isa = "PBXBuildFile"; - fileRef = "OBJ_48"; + fileRef = "OBJ_46"; }; "OBJ_182" = { isa = "PBXBuildFile"; - fileRef = "OBJ_49"; + fileRef = "OBJ_48"; }; "OBJ_183" = { isa = "PBXBuildFile"; - fileRef = "OBJ_50"; + fileRef = "OBJ_49"; }; "OBJ_184" = { isa = "PBXBuildFile"; - fileRef = "OBJ_51"; + fileRef = "OBJ_50"; }; "OBJ_185" = { isa = "PBXBuildFile"; - fileRef = "OBJ_52"; + fileRef = "OBJ_51"; }; "OBJ_186" = { isa = "PBXBuildFile"; - fileRef = "OBJ_53"; + fileRef = "OBJ_52"; }; "OBJ_187" = { isa = "PBXBuildFile"; - fileRef = "OBJ_54"; + fileRef = "OBJ_53"; }; "OBJ_188" = { isa = "PBXBuildFile"; - fileRef = "OBJ_55"; + fileRef = "OBJ_54"; }; "OBJ_189" = { isa = "PBXBuildFile"; - fileRef = "OBJ_56"; + fileRef = "OBJ_55"; }; "OBJ_19" = { isa = "PBXFileReference"; @@ -627,23 +628,27 @@ }; "OBJ_190" = { isa = "PBXBuildFile"; - fileRef = "OBJ_57"; + fileRef = "OBJ_56"; }; "OBJ_191" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_57"; + }; + "OBJ_192" = { isa = "PBXFrameworksBuildPhase"; files = ( ); }; - "OBJ_193" = { + "OBJ_194" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_194", - "OBJ_195" + "OBJ_195", + "OBJ_196" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_194" = { + "OBJ_195" = { isa = "XCBuildConfiguration"; buildSettings = { LD = "/usr/bin/true"; @@ -661,7 +666,7 @@ }; name = "Debug"; }; - "OBJ_195" = { + "OBJ_196" = { isa = "XCBuildConfiguration"; buildSettings = { LD = "/usr/bin/true"; @@ -679,25 +684,16 @@ }; name = "Release"; }; - "OBJ_196" = { + "OBJ_197" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_197" + "OBJ_198" ); }; - "OBJ_197" = { + "OBJ_198" = { isa = "PBXBuildFile"; fileRef = "OBJ_6"; }; - "OBJ_199" = { - isa = "XCConfigurationList"; - buildConfigurations = ( - "OBJ_200", - "OBJ_201" - ); - defaultConfigurationIsVisible = "0"; - defaultConfigurationName = "Release"; - }; "OBJ_2" = { isa = "XCConfigurationList"; buildConfigurations = ( @@ -713,31 +709,40 @@ sourceTree = ""; }; "OBJ_200" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_201", + "OBJ_202" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_201" = { isa = "XCBuildConfiguration"; buildSettings = { }; name = "Debug"; }; - "OBJ_201" = { + "OBJ_202" = { isa = "XCBuildConfiguration"; buildSettings = { }; name = "Release"; }; - "OBJ_202" = { + "OBJ_203" = { isa = "PBXTargetDependency"; target = "XMLCoder::XMLCoderTests"; }; - "OBJ_204" = { + "OBJ_205" = { isa = "XCConfigurationList"; buildConfigurations = ( - "OBJ_205", - "OBJ_206" + "OBJ_206", + "OBJ_207" ); defaultConfigurationIsVisible = "0"; defaultConfigurationName = "Release"; }; - "OBJ_205" = { + "OBJ_206" = { isa = "XCBuildConfiguration"; buildSettings = { CLANG_ENABLE_MODULES = "YES"; @@ -776,7 +781,7 @@ }; name = "Debug"; }; - "OBJ_206" = { + "OBJ_207" = { isa = "XCBuildConfiguration"; buildSettings = { CLANG_ENABLE_MODULES = "YES"; @@ -815,10 +820,9 @@ }; name = "Release"; }; - "OBJ_207" = { + "OBJ_208" = { isa = "PBXSourcesBuildPhase"; files = ( - "OBJ_208", "OBJ_209", "OBJ_210", "OBJ_211", @@ -881,16 +885,14 @@ "OBJ_268", "OBJ_269", "OBJ_270", - "OBJ_271" + "OBJ_271", + "OBJ_272", + "OBJ_273" ); }; - "OBJ_208" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_60"; - }; "OBJ_209" = { isa = "PBXBuildFile"; - fileRef = "OBJ_61"; + fileRef = "OBJ_60"; }; "OBJ_21" = { isa = "PBXFileReference"; @@ -899,43 +901,43 @@ }; "OBJ_210" = { isa = "PBXBuildFile"; - fileRef = "OBJ_63"; + fileRef = "OBJ_61"; }; "OBJ_211" = { isa = "PBXBuildFile"; - fileRef = "OBJ_64"; + fileRef = "OBJ_63"; }; "OBJ_212" = { isa = "PBXBuildFile"; - fileRef = "OBJ_65"; + fileRef = "OBJ_64"; }; "OBJ_213" = { isa = "PBXBuildFile"; - fileRef = "OBJ_66"; + fileRef = "OBJ_65"; }; "OBJ_214" = { isa = "PBXBuildFile"; - fileRef = "OBJ_67"; + fileRef = "OBJ_66"; }; "OBJ_215" = { isa = "PBXBuildFile"; - fileRef = "OBJ_68"; + fileRef = "OBJ_67"; }; "OBJ_216" = { isa = "PBXBuildFile"; - fileRef = "OBJ_69"; + fileRef = "OBJ_68"; }; "OBJ_217" = { isa = "PBXBuildFile"; - fileRef = "OBJ_70"; + fileRef = "OBJ_69"; }; "OBJ_218" = { isa = "PBXBuildFile"; - fileRef = "OBJ_72"; + fileRef = "OBJ_70"; }; "OBJ_219" = { isa = "PBXBuildFile"; - fileRef = "OBJ_73"; + fileRef = "OBJ_72"; }; "OBJ_22" = { isa = "PBXFileReference"; @@ -944,43 +946,43 @@ }; "OBJ_220" = { isa = "PBXBuildFile"; - fileRef = "OBJ_74"; + fileRef = "OBJ_73"; }; "OBJ_221" = { isa = "PBXBuildFile"; - fileRef = "OBJ_75"; + fileRef = "OBJ_74"; }; "OBJ_222" = { isa = "PBXBuildFile"; - fileRef = "OBJ_76"; + fileRef = "OBJ_75"; }; "OBJ_223" = { isa = "PBXBuildFile"; - fileRef = "OBJ_77"; + fileRef = "OBJ_76"; }; "OBJ_224" = { isa = "PBXBuildFile"; - fileRef = "OBJ_78"; + fileRef = "OBJ_77"; }; "OBJ_225" = { isa = "PBXBuildFile"; - fileRef = "OBJ_79"; + fileRef = "OBJ_78"; }; "OBJ_226" = { isa = "PBXBuildFile"; - fileRef = "OBJ_80"; + fileRef = "OBJ_79"; }; "OBJ_227" = { isa = "PBXBuildFile"; - fileRef = "OBJ_81"; + fileRef = "OBJ_80"; }; "OBJ_228" = { isa = "PBXBuildFile"; - fileRef = "OBJ_82"; + fileRef = "OBJ_81"; }; "OBJ_229" = { isa = "PBXBuildFile"; - fileRef = "OBJ_83"; + fileRef = "OBJ_82"; }; "OBJ_23" = { isa = "PBXFileReference"; @@ -989,43 +991,43 @@ }; "OBJ_230" = { isa = "PBXBuildFile"; - fileRef = "OBJ_84"; + fileRef = "OBJ_83"; }; "OBJ_231" = { isa = "PBXBuildFile"; - fileRef = "OBJ_85"; + fileRef = "OBJ_84"; }; "OBJ_232" = { isa = "PBXBuildFile"; - fileRef = "OBJ_86"; + fileRef = "OBJ_85"; }; "OBJ_233" = { isa = "PBXBuildFile"; - fileRef = "OBJ_87"; + fileRef = "OBJ_86"; }; "OBJ_234" = { isa = "PBXBuildFile"; - fileRef = "OBJ_88"; + fileRef = "OBJ_87"; }; "OBJ_235" = { isa = "PBXBuildFile"; - fileRef = "OBJ_89"; + fileRef = "OBJ_88"; }; "OBJ_236" = { isa = "PBXBuildFile"; - fileRef = "OBJ_90"; + fileRef = "OBJ_89"; }; "OBJ_237" = { isa = "PBXBuildFile"; - fileRef = "OBJ_91"; + fileRef = "OBJ_90"; }; "OBJ_238" = { isa = "PBXBuildFile"; - fileRef = "OBJ_92"; + fileRef = "OBJ_91"; }; "OBJ_239" = { isa = "PBXBuildFile"; - fileRef = "OBJ_93"; + fileRef = "OBJ_92"; }; "OBJ_24" = { isa = "PBXFileReference"; @@ -1034,43 +1036,43 @@ }; "OBJ_240" = { isa = "PBXBuildFile"; - fileRef = "OBJ_94"; + fileRef = "OBJ_93"; }; "OBJ_241" = { isa = "PBXBuildFile"; - fileRef = "OBJ_96"; + fileRef = "OBJ_94"; }; "OBJ_242" = { isa = "PBXBuildFile"; - fileRef = "OBJ_97"; + fileRef = "OBJ_96"; }; "OBJ_243" = { isa = "PBXBuildFile"; - fileRef = "OBJ_98"; + fileRef = "OBJ_97"; }; "OBJ_244" = { isa = "PBXBuildFile"; - fileRef = "OBJ_99"; + fileRef = "OBJ_98"; }; "OBJ_245" = { isa = "PBXBuildFile"; - fileRef = "OBJ_100"; + fileRef = "OBJ_99"; }; "OBJ_246" = { isa = "PBXBuildFile"; - fileRef = "OBJ_101"; + fileRef = "OBJ_100"; }; "OBJ_247" = { isa = "PBXBuildFile"; - fileRef = "OBJ_102"; + fileRef = "OBJ_101"; }; "OBJ_248" = { isa = "PBXBuildFile"; - fileRef = "OBJ_103"; + fileRef = "OBJ_102"; }; "OBJ_249" = { isa = "PBXBuildFile"; - fileRef = "OBJ_104"; + fileRef = "OBJ_103"; }; "OBJ_25" = { isa = "PBXFileReference"; @@ -1079,43 +1081,43 @@ }; "OBJ_250" = { isa = "PBXBuildFile"; - fileRef = "OBJ_105"; + fileRef = "OBJ_104"; }; "OBJ_251" = { isa = "PBXBuildFile"; - fileRef = "OBJ_106"; + fileRef = "OBJ_105"; }; "OBJ_252" = { isa = "PBXBuildFile"; - fileRef = "OBJ_107"; + fileRef = "OBJ_106"; }; "OBJ_253" = { isa = "PBXBuildFile"; - fileRef = "OBJ_108"; + fileRef = "OBJ_107"; }; "OBJ_254" = { isa = "PBXBuildFile"; - fileRef = "OBJ_109"; + fileRef = "OBJ_108"; }; "OBJ_255" = { isa = "PBXBuildFile"; - fileRef = "OBJ_110"; + fileRef = "OBJ_109"; }; "OBJ_256" = { isa = "PBXBuildFile"; - fileRef = "OBJ_111"; + fileRef = "OBJ_110"; }; "OBJ_257" = { isa = "PBXBuildFile"; - fileRef = "OBJ_112"; + fileRef = "OBJ_111"; }; "OBJ_258" = { isa = "PBXBuildFile"; - fileRef = "OBJ_113"; + fileRef = "OBJ_112"; }; "OBJ_259" = { isa = "PBXBuildFile"; - fileRef = "OBJ_114"; + fileRef = "OBJ_113"; }; "OBJ_26" = { isa = "PBXFileReference"; @@ -1124,43 +1126,43 @@ }; "OBJ_260" = { isa = "PBXBuildFile"; - fileRef = "OBJ_115"; + fileRef = "OBJ_114"; }; "OBJ_261" = { isa = "PBXBuildFile"; - fileRef = "OBJ_116"; + fileRef = "OBJ_115"; }; "OBJ_262" = { isa = "PBXBuildFile"; - fileRef = "OBJ_117"; + fileRef = "OBJ_116"; }; "OBJ_263" = { isa = "PBXBuildFile"; - fileRef = "OBJ_118"; + fileRef = "OBJ_117"; }; "OBJ_264" = { isa = "PBXBuildFile"; - fileRef = "OBJ_119"; + fileRef = "OBJ_118"; }; "OBJ_265" = { isa = "PBXBuildFile"; - fileRef = "OBJ_120"; + fileRef = "OBJ_119"; }; "OBJ_266" = { isa = "PBXBuildFile"; - fileRef = "OBJ_121"; + fileRef = "OBJ_120"; }; "OBJ_267" = { isa = "PBXBuildFile"; - fileRef = "OBJ_122"; + fileRef = "OBJ_121"; }; "OBJ_268" = { isa = "PBXBuildFile"; - fileRef = "OBJ_123"; + fileRef = "OBJ_122"; }; "OBJ_269" = { isa = "PBXBuildFile"; - fileRef = "OBJ_124"; + fileRef = "OBJ_123"; }; "OBJ_27" = { isa = "PBXFileReference"; @@ -1169,23 +1171,31 @@ }; "OBJ_270" = { isa = "PBXBuildFile"; - fileRef = "OBJ_125"; + fileRef = "OBJ_124"; }; "OBJ_271" = { isa = "PBXBuildFile"; - fileRef = "OBJ_126"; + fileRef = "OBJ_125"; }; "OBJ_272" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_126"; + }; + "OBJ_273" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_127"; + }; + "OBJ_274" = { isa = "PBXFrameworksBuildPhase"; files = ( - "OBJ_273" + "OBJ_275" ); }; - "OBJ_273" = { + "OBJ_275" = { isa = "PBXBuildFile"; fileRef = "XMLCoder::XMLCoder::Product"; }; - "OBJ_274" = { + "OBJ_276" = { isa = "PBXTargetDependency"; target = "XMLCoder::XMLCoder"; }; @@ -1408,8 +1418,7 @@ "OBJ_6", "OBJ_7", "OBJ_58", - "OBJ_127", - "OBJ_130", + "OBJ_128", "OBJ_131", "OBJ_132", "OBJ_133", @@ -1420,7 +1429,8 @@ "OBJ_138", "OBJ_139", "OBJ_140", - "OBJ_141" + "OBJ_141", + "OBJ_142" ); path = ""; sourceTree = ""; @@ -1432,32 +1442,32 @@ }; "OBJ_51" = { isa = "PBXFileReference"; - path = "XMLEncoder.swift"; + path = "XMLChoiceEncodingContainer.swift"; sourceTree = ""; }; "OBJ_52" = { isa = "PBXFileReference"; - path = "XMLEncoderImplementation.swift"; + path = "XMLEncoder.swift"; sourceTree = ""; }; "OBJ_53" = { isa = "PBXFileReference"; - path = "XMLEncodingStorage.swift"; + path = "XMLEncoderImplementation.swift"; sourceTree = ""; }; "OBJ_54" = { isa = "PBXFileReference"; - path = "XMLKeyedEncodingContainer.swift"; + path = "XMLEncodingStorage.swift"; sourceTree = ""; }; "OBJ_55" = { isa = "PBXFileReference"; - path = "XMLReferencingEncoder.swift"; + path = "XMLKeyedEncodingContainer.swift"; sourceTree = ""; }; "OBJ_56" = { isa = "PBXFileReference"; - path = "XMLSingleElementEncodingContainer.swift"; + path = "XMLReferencingEncoder.swift"; sourceTree = ""; }; "OBJ_57" = { @@ -1508,7 +1518,8 @@ "OBJ_123", "OBJ_124", "OBJ_125", - "OBJ_126" + "OBJ_126", + "OBJ_127" ); name = "XMLCoderTests"; path = "Tests/XMLCoderTests"; @@ -1792,9 +1803,9 @@ }; "XMLCoder::SwiftPMPackageDescription" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_193"; + buildConfigurationList = "OBJ_194"; buildPhases = ( - "OBJ_196" + "OBJ_197" ); dependencies = ( ); @@ -1804,10 +1815,10 @@ }; "XMLCoder::XMLCoder" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_143"; + buildConfigurationList = "OBJ_144"; buildPhases = ( - "OBJ_146", - "OBJ_191" + "OBJ_147", + "OBJ_192" ); dependencies = ( ); @@ -1823,24 +1834,24 @@ }; "XMLCoder::XMLCoderPackageTests::ProductTarget" = { isa = "PBXAggregateTarget"; - buildConfigurationList = "OBJ_199"; + buildConfigurationList = "OBJ_200"; buildPhases = ( ); dependencies = ( - "OBJ_202" + "OBJ_203" ); name = "XMLCoderPackageTests"; productName = "XMLCoderPackageTests"; }; "XMLCoder::XMLCoderTests" = { isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_204"; + buildConfigurationList = "OBJ_205"; buildPhases = ( - "OBJ_207", - "OBJ_272" + "OBJ_208", + "OBJ_274" ); dependencies = ( - "OBJ_274" + "OBJ_276" ); name = "XMLCoderTests"; productName = "XMLCoderTests"; diff --git a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From 91693e95499580972acfcde75961a701db94c35d Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 17:37:35 -0700 Subject: [PATCH 06/34] Rename XMLChoiceKey -> XMLChoiceCodingKey Add doc comment for XMLChoiceCodingKey --- .../Auxiliaries/XMLChoiceCodingKey.swift | 10 ++++ .../XMLCoder/Auxiliaries/XMLChoiceKey.swift | 8 --- .../Auxiliaries/XMLCoderElement.swift | 4 +- .../Decoder/XMLChoiceDecodingContainer.swift | 21 +++----- .../Decoder/XMLDecoderImplementation.swift | 3 +- .../Decoder/XMLUnkeyedDecodingContainer.swift | 1 - .../Encoder/XMLChoiceEncodingContainer.swift | 16 +++--- .../Encoder/XMLEncoderImplementation.swift | 6 +-- .../XMLCoder/Encoder/XMLEncodingStorage.swift | 2 +- .../Encoder/XMLKeyedEncodingContainer.swift | 8 +-- .../Encoder/XMLReferencingEncoder.swift | 2 +- .../Encoder/XMLUnkeyedEncodingContainer.swift | 8 +-- .../XMLCoderTests/CompositeChoiceTests.swift | 2 +- .../NestedAttributeChoiceTests.swift | 50 +++++++++---------- Tests/XMLCoderTests/NestedChoiceTests.swift | 2 +- Tests/XMLCoderTests/SimpleChoiceTests.swift | 2 +- XMLCoder.xcodeproj/project.pbxproj | 2 +- 17 files changed, 69 insertions(+), 78 deletions(-) create mode 100644 Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift delete mode 100644 Sources/XMLCoder/Auxiliaries/XMLChoiceKey.swift diff --git a/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift b/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift new file mode 100644 index 00000000..0ea70fd9 --- /dev/null +++ b/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift @@ -0,0 +1,10 @@ +// +// XMLChoiceCodingKey.swift +// XMLCoder +// +// Created by Benjamin Wetherfield on 7/17/19. +// + +/// An empty marker protocol that can be used in place of `CodingKey`. It must be used when conforming a union-type–like enum with +/// associated values to `Codable` when the encoded format is `XML`. +public protocol XMLChoiceCodingKey: CodingKey {} diff --git a/Sources/XMLCoder/Auxiliaries/XMLChoiceKey.swift b/Sources/XMLCoder/Auxiliaries/XMLChoiceKey.swift deleted file mode 100644 index 7c45a04a..00000000 --- a/Sources/XMLCoder/Auxiliaries/XMLChoiceKey.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// XMLChoiceKey.swift -// XMLCoder -// -// Created by Benjamin Wetherfield on 7/17/19. -// - -public protocol XMLChoiceKey: CodingKey {} diff --git a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift index 25f1cdf2..0fb8b62a 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift @@ -245,13 +245,13 @@ extension XMLCoderElement { init(key: String, box: UnkeyedBox) { if let containsChoice = box as? [ChoiceBox] { self.init(key: key, elements: containsChoice.map { - return XMLCoderElement(key: $0.key, box: $0.element) + XMLCoderElement(key: $0.key, box: $0.element) }) } else { self.init(key: key, elements: box.map { XMLCoderElement(key: key, box: $0) }) } } - + init(key: String, box: ChoiceBox) { self.init(key: key, elements: [XMLCoderElement(key: box.key, box: box.element)]) } diff --git a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift index b80a8e3a..f29441b6 100644 --- a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift @@ -83,21 +83,12 @@ struct XMLChoiceDecodingContainer: KeyedDecodingContainerProtocol } public func decode(_ type: T.Type, forKey key: Key) throws -> T { - guard container.withShared({ $0.key == key.stringValue }), key is XMLChoiceKey else { - throw DecodingError.typeMismatch(at: codingPath, expectation: type, reality: container) - } - guard let strategy = self.decoder.nodeDecodings.last else { - preconditionFailure("Attempt to access node decoding strategy from empty stack.") - } - decoder.codingPath.append(key) - let nodeDecodings = decoder.options.nodeDecodingStrategy.nodeDecodings( - forType: T.self, - with: decoder - ) - decoder.nodeDecodings.append(nodeDecodings) - defer { - _ = decoder.nodeDecodings.removeLast() - decoder.codingPath.removeLast() + guard container.withShared({ $0.key == key.stringValue }), key is XMLChoiceCodingKey else { + throw DecodingError.typeMismatch( + at: codingPath, + expectation: type, + reality: container + ) } return try decoder.unbox(container.withShared { $0.element }) } diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index 907bf82a..84888fcc 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -71,7 +71,7 @@ class XMLDecoderImplementation: Decoder { } public func container(keyedBy keyType: Key.Type) throws -> KeyedDecodingContainer { - if Key.self is XMLChoiceKey.Type { + if Key.self is XMLChoiceCodingKey.Type { return try choiceContainer(keyedBy: keyType) } else { return try keyedContainer(keyedBy: keyType) @@ -411,7 +411,6 @@ extension XMLDecoderImplementation { } func unbox(_ box: Box) throws -> T { - let decoded: T? let type = T.self diff --git a/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift index 98f25d38..ec37fcc7 100644 --- a/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift @@ -114,7 +114,6 @@ struct XMLUnkeyedDecodingContainer: UnkeyedDecodingContainer { } else { value = try decode(decoder, box) } - defer { currentIndex += 1 } diff --git a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift index 2f7e4862..f78e47b1 100644 --- a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift @@ -17,7 +17,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol /// A reference to the container we're writing to. private var container: SharedBox - + /// The path of coding keys taken to get to this point in encoding. public private(set) var codingPath: [CodingKey] @@ -28,7 +28,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol referencing encoder: XMLEncoderImplementation, codingPath: [CodingKey], wrapping container: SharedBox - ) { + ) { self.encoder = encoder self.codingPath = codingPath self.container = container @@ -111,7 +111,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol defer { self = mySelf } - + try elementEncoder(value, key, box) } @@ -119,7 +119,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol keyedBy _: NestedKey.Type, forKey key: Key ) -> KeyedEncodingContainer { - if NestedKey.self is XMLChoiceKey.Type { + if NestedKey.self is XMLChoiceCodingKey.Type { return nestedChoiceContainer(keyedBy: NestedKey.self, forKey: key) } else { return nestedKeyedContainer(keyedBy: NestedKey.self, forKey: key) @@ -147,13 +147,13 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol ) return KeyedEncodingContainer(container) } - + mutating func nestedChoiceContainer( keyedBy _: NestedKey.Type, forKey key: Key - ) -> KeyedEncodingContainer { + ) -> KeyedEncodingContainer { let sharedChoice = SharedBox(ChoiceBox()) - + self.container.withShared { container in container.element = sharedChoice container.key = _converted(key).stringValue @@ -161,7 +161,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol codingPath.append(key) defer { self.codingPath.removeLast() } - + let container = XMLChoiceEncodingContainer( referencing: encoder, codingPath: codingPath, diff --git a/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift b/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift index 171dd981..57c146c2 100644 --- a/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift +++ b/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift @@ -64,7 +64,7 @@ class XMLEncoderImplementation: Encoder { // MARK: - Encoder Methods public func container(keyedBy _: Key.Type) -> KeyedEncodingContainer { - if Key.self is XMLChoiceKey.Type { + if Key.self is XMLChoiceCodingKey.Type { return choiceContainer(keyedBy: Key.self) } else { return keyedContainer(keyedBy: Key.self) @@ -88,7 +88,7 @@ class XMLEncoderImplementation: Encoder { let container = XMLKeyedEncodingContainer(referencing: self, codingPath: codingPath, wrapping: topContainer) return KeyedEncodingContainer(container) } - + public func choiceContainer(keyedBy _: Key.Type) -> KeyedEncodingContainer { let topContainer: SharedBox if canEncodeNewValue { @@ -101,7 +101,7 @@ class XMLEncoderImplementation: Encoder { topContainer = container } - + let container = XMLChoiceEncodingContainer(referencing: self, codingPath: codingPath, wrapping: topContainer) return KeyedEncodingContainer(container) } diff --git a/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift b/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift index 86040f96..eecba789 100644 --- a/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift +++ b/Sources/XMLCoder/Encoder/XMLEncodingStorage.swift @@ -36,7 +36,7 @@ struct XMLEncodingStorage { containers.append(container) return container } - + mutating func pushChoiceContainer() -> SharedBox { let container = SharedBox(ChoiceBox()) containers.append(container) diff --git a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift index 6c58f430..398c2cb3 100644 --- a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift @@ -142,7 +142,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { keyedBy _: NestedKey.Type, forKey key: Key ) -> KeyedEncodingContainer { - if NestedKey.self is XMLChoiceKey.Type { + if NestedKey.self is XMLChoiceCodingKey.Type { return nestedSingleElementContainer(keyedBy: NestedKey.self, forKey: key) } else { return nestedKeyedContainer(keyedBy: NestedKey.self, forKey: key) @@ -173,16 +173,16 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { mutating func nestedSingleElementContainer( keyedBy _: NestedKey.Type, forKey key: Key - ) -> KeyedEncodingContainer { + ) -> KeyedEncodingContainer { let sharedChoice = SharedBox(ChoiceBox()) - + self.container.withShared { container in container.elements.append(sharedChoice, at: _converted(key).stringValue) } codingPath.append(key) defer { self.codingPath.removeLast() } - + let container = XMLChoiceEncodingContainer( referencing: encoder, codingPath: codingPath, diff --git a/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift b/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift index 74bdd9ac..0a9e6484 100644 --- a/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift +++ b/Sources/XMLCoder/Encoder/XMLReferencingEncoder.swift @@ -79,7 +79,7 @@ class XMLReferencingEncoder: XMLEncoderImplementation { key: CodingKey, convertedKey: CodingKey, wrapping sharedKeyed: SharedBox - ) { + ) { self.encoder = encoder reference = .choice(sharedKeyed, convertedKey.stringValue) super.init( diff --git a/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift index c0e18470..f3160980 100644 --- a/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift @@ -66,7 +66,7 @@ struct XMLUnkeyedEncodingContainer: UnkeyedEncodingContainer { public mutating func nestedContainer( keyedBy _: NestedKey.Type ) -> KeyedEncodingContainer { - if NestedKey.self is XMLChoiceKey.Type { + if NestedKey.self is XMLChoiceCodingKey.Type { return nestedChoiceContainer(keyedBy: NestedKey.self) } else { return nestedKeyedContainer(keyedBy: NestedKey.self) @@ -89,16 +89,16 @@ struct XMLUnkeyedEncodingContainer: UnkeyedEncodingContainer { ) return KeyedEncodingContainer(container) } - + public mutating func nestedChoiceContainer(keyedBy _: NestedKey.Type) -> KeyedEncodingContainer { codingPath.append(XMLKey(index: count)) defer { self.codingPath.removeLast() } - + let sharedChoice = SharedBox(ChoiceBox()) self.container.withShared { container in container.append(sharedChoice) } - + let container = XMLChoiceEncodingContainer( referencing: encoder, codingPath: codingPath, diff --git a/Tests/XMLCoderTests/CompositeChoiceTests.swift b/Tests/XMLCoderTests/CompositeChoiceTests.swift index d17dc5b9..8d9bb6b3 100644 --- a/Tests/XMLCoderTests/CompositeChoiceTests.swift +++ b/Tests/XMLCoderTests/CompositeChoiceTests.swift @@ -22,7 +22,7 @@ private enum IntOrStringWrapper: Equatable { } extension IntOrStringWrapper: Codable { - enum CodingKeys: String, XMLChoiceKey { + enum CodingKeys: String, XMLChoiceCodingKey { case int case string } diff --git a/Tests/XMLCoderTests/NestedAttributeChoiceTests.swift b/Tests/XMLCoderTests/NestedAttributeChoiceTests.swift index a715cd6d..42879488 100644 --- a/Tests/XMLCoderTests/NestedAttributeChoiceTests.swift +++ b/Tests/XMLCoderTests/NestedAttributeChoiceTests.swift @@ -25,7 +25,7 @@ private enum Entry: Equatable { private struct Run: Codable, Equatable, DynamicNodeEncoding { let id: Int let text: String - + static func nodeEncoding(for key: CodingKey) -> XMLEncoder.NodeEncoding { switch key { case CodingKeys.id: @@ -39,13 +39,13 @@ private struct Run: Codable, Equatable, DynamicNodeEncoding { private struct Properties: Codable, Equatable, DynamicNodeEncoding { let id: Int let title: String - + static func nodeEncoding(for key: CodingKey) -> XMLEncoder.NodeEncoding { return .attribute } } -private struct Break: Codable, Equatable { } +private struct Break: Codable, Equatable {} extension Container: Codable { enum CodingKeys: String, CodingKey { @@ -56,9 +56,9 @@ extension Container: Codable { extension Paragraph: Codable { init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() - self.entries = try container.decode([Entry].self) + entries = try container.decode([Entry].self) } - + func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() try container.encode(entries) @@ -66,9 +66,10 @@ extension Paragraph: Codable { } extension Entry: Codable { - private enum CodingKeys: String, XMLChoiceKey { + private enum CodingKeys: String, XMLChoiceCodingKey { case run, properties, br } + public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { @@ -81,7 +82,7 @@ extension Entry: Codable { } } } - + func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) switch self { @@ -96,7 +97,6 @@ extension Entry: Codable { } class NestedAttributeChoiceTests: XCTestCase { - private var encoder: XMLEncoder { let encoder = XMLEncoder() encoder.outputFormatting = [.prettyPrinted] @@ -105,22 +105,22 @@ class NestedAttributeChoiceTests: XCTestCase { func testNestedEnumsEncoding() throws { let xml = """ - -

-
- - I am answering it again. - - -

-

- - I am answering it again. - -
-

-
- """ + +

+
+ + I am answering it again. + + +

+

+ + I am answering it again. + +
+

+
+ """ let value = Container( paragraphs: [ Paragraph( @@ -135,7 +135,7 @@ class NestedAttributeChoiceTests: XCTestCase { .run(Run(id: 1519, text: "I am answering it again.")), .br(Break()), ] - ) + ), ] ) let encoded = try encoder.encode(value, withRootKey: "container") diff --git a/Tests/XMLCoderTests/NestedChoiceTests.swift b/Tests/XMLCoderTests/NestedChoiceTests.swift index 5f6a2f31..4810c454 100644 --- a/Tests/XMLCoderTests/NestedChoiceTests.swift +++ b/Tests/XMLCoderTests/NestedChoiceTests.swift @@ -53,7 +53,7 @@ extension Paragraph: Codable { } extension Entry: Codable { - private enum CodingKeys: String, XMLChoiceKey { + private enum CodingKeys: String, XMLChoiceCodingKey { case run, properties, br } diff --git a/Tests/XMLCoderTests/SimpleChoiceTests.swift b/Tests/XMLCoderTests/SimpleChoiceTests.swift index 8905cd9e..4ab85290 100644 --- a/Tests/XMLCoderTests/SimpleChoiceTests.swift +++ b/Tests/XMLCoderTests/SimpleChoiceTests.swift @@ -14,7 +14,7 @@ private enum IntOrString: Equatable { } extension IntOrString: Codable { - enum CodingKeys: String, CodingKey { + enum CodingKeys: String, XMLChoiceCodingKey { case int case string } diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index e6308436..d3571d7c 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -1262,7 +1262,7 @@ }; "OBJ_32" = { isa = "PBXFileReference"; - path = "XMLChoiceKey.swift"; + path = "XMLChoiceCodingKey.swift"; sourceTree = ""; }; "OBJ_33" = { From b5684f355d29ddcf7748a811a6bdd6950935bc5c Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 14:08:38 -0700 Subject: [PATCH 07/34] Rename SingleElementBox to SingleKeyedBox Remove unused SingleKeyedBox.init?(_: KeyedBox) Change internal property name from singleElementBox to singleKeyedBox Remove internal property names singleElement -> singleKeyed --- Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift | 4 ++-- ...SingleElementBox.swift => SingleKeyedBox.swift} | 14 +++----------- .../Decoder/XMLDecoderImplementation.swift | 4 +++- .../Decoder/XMLUnkeyedDecodingContainer.swift | 6 +++--- XMLCoder.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 -------- 6 files changed, 12 insertions(+), 26 deletions(-) rename Sources/XMLCoder/Auxiliaries/Box/{SingleElementBox.swift => SingleKeyedBox.swift} (63%) delete mode 100644 XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift b/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift index 9b8c2e20..9a4749ce 100644 --- a/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift +++ b/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift @@ -30,7 +30,7 @@ extension ChoiceBox { self.init(key: firstKey, element: firstElement) } - init(_ singleElementBox: SingleElementBox) { - self.init(key: singleElementBox.key, element: singleElementBox.element) + init(_ singleKeyedBox: SingleKeyedBox) { + self.init(key: singleKeyedBox.key, element: singleKeyedBox.element) } } diff --git a/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift b/Sources/XMLCoder/Auxiliaries/Box/SingleKeyedBox.swift similarity index 63% rename from Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift rename to Sources/XMLCoder/Auxiliaries/Box/SingleKeyedBox.swift index 53a34168..f4925085 100644 --- a/Sources/XMLCoder/Auxiliaries/Box/SingleElementBox.swift +++ b/Sources/XMLCoder/Auxiliaries/Box/SingleKeyedBox.swift @@ -1,5 +1,5 @@ // -// SingleElementBox.swift +// SingleKeyedBox.swift // XMLCoder // // Created by James Bean on 7/15/19. @@ -8,7 +8,7 @@ /// A `Box` which contains a single `key` and `element` pair. This is useful for disambiguating elements which could either represent /// an element nested in a keyed or unkeyed container, or an choice between multiple known-typed values (implemented in Swift using /// enums with associated values). -struct SingleElementBox: SimpleBox { +struct SingleKeyedBox: SimpleBox { typealias Key = String typealias Attribute = SimpleBox typealias Attributes = KeyedStorage @@ -18,7 +18,7 @@ struct SingleElementBox: SimpleBox { var element: Box = NullBox() } -extension SingleElementBox: Box { +extension SingleKeyedBox: Box { var isNull: Bool { return false } @@ -27,11 +27,3 @@ extension SingleElementBox: Box { return nil } } - -extension SingleElementBox { - init?(_ keyedBox: KeyedBox) { - guard let firstKey = keyedBox.elements.keys.first else { return nil } - let firstElement = keyedBox.elements[firstKey] - self.init(attributes: keyedBox.attributes, key: firstKey, element: firstElement) - } -} diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index 84888fcc..a789207f 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -131,6 +131,8 @@ class XMLDecoderImplementation: Decoder { switch topContainer { case let choice as ChoiceBox: choiceBox = choice + case let singleKeyed as SingleKeyedBox: + choiceBox = ChoiceBox(singleKeyed) case let keyed as SharedBox: choiceBox = ChoiceBox(keyed.withShared { $0 }) default: @@ -174,7 +176,7 @@ class XMLDecoderImplementation: Decoder { referencing: self, wrapping: SharedBox( keyed.withShared { $0.elements.map { key, box in - SingleElementBox(attributes: .init(), key: key, element: box) + SingleKeyedBox(attributes: .init(), key: key, element: box) } } ) diff --git a/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift index ec37fcc7..513843e1 100644 --- a/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift @@ -103,13 +103,13 @@ struct XMLUnkeyedDecodingContainer: UnkeyedDecodingContainer { } var value: T? - if let singleElement = box as? SingleElementBox { + if let singleKeyed = box as? SingleKeyedBox { do { // Drill down to the element in the case of an nested unkeyed element - value = try decode(decoder, singleElement.element) + value = try decode(decoder, singleKeyed.element) } catch { // Specialize for choice elements - value = try decode(decoder, ChoiceBox(key: singleElement.key, element: singleElement.element)) + value = try decode(decoder, ChoiceBox(key: singleKeyed.key, element: singleKeyed.element)) } } else { value = try decode(decoder, box) diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index d3571d7c..69041046 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -986,7 +986,7 @@ }; "OBJ_23" = { isa = "PBXFileReference"; - path = "SingleElementBox.swift"; + path = "SingleKeyedBox.swift"; sourceTree = ""; }; "OBJ_230" = { diff --git a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - From 5fd8d8f3f847914a30111279c7b2cc05efb47932 Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 17:38:26 -0700 Subject: [PATCH 08/34] Rename nestedSingleElementContainer -> nestedChoiceContainer Rename header XMLSingleElementEncodingContainer -> XMLChoiceEncodingContainer Fix formatting --- Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift | 2 +- Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift index f78e47b1..cb46f7ea 100644 --- a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift @@ -1,5 +1,5 @@ // -// XMLSingleElementEncodingContainer.swift +// XMLChoiceEncodingContainer.swift // XMLCoder // // Created by Benjamin Wetherfield on 7/17/19. diff --git a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift index 398c2cb3..f14ae336 100644 --- a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift @@ -143,7 +143,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { forKey key: Key ) -> KeyedEncodingContainer { if NestedKey.self is XMLChoiceCodingKey.Type { - return nestedSingleElementContainer(keyedBy: NestedKey.self, forKey: key) + return nestedChoiceContainer(keyedBy: NestedKey.self, forKey: key) } else { return nestedKeyedContainer(keyedBy: NestedKey.self, forKey: key) } @@ -170,7 +170,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { return KeyedEncodingContainer(container) } - mutating func nestedSingleElementContainer( + mutating func nestedChoiceContainer( keyedBy _: NestedKey.Type, forKey key: Key ) -> KeyedEncodingContainer { From 5bda791ea4a9d3b4bc73814e135237c67f7c692e Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 17:39:11 -0700 Subject: [PATCH 09/34] Cull redundancies Slim down SingleKeyedBox Remove Foundation imports where not necessary --- Sources/XMLCoder/Auxiliaries/Box/SingleKeyedBox.swift | 9 ++------- .../XMLCoder/Decoder/XMLChoiceDecodingContainer.swift | 2 -- Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift | 2 +- .../XMLCoder/Encoder/XMLChoiceEncodingContainer.swift | 2 -- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Sources/XMLCoder/Auxiliaries/Box/SingleKeyedBox.swift b/Sources/XMLCoder/Auxiliaries/Box/SingleKeyedBox.swift index f4925085..42f0cbb5 100644 --- a/Sources/XMLCoder/Auxiliaries/Box/SingleKeyedBox.swift +++ b/Sources/XMLCoder/Auxiliaries/Box/SingleKeyedBox.swift @@ -9,13 +9,8 @@ /// an element nested in a keyed or unkeyed container, or an choice between multiple known-typed values (implemented in Swift using /// enums with associated values). struct SingleKeyedBox: SimpleBox { - typealias Key = String - typealias Attribute = SimpleBox - typealias Attributes = KeyedStorage - - var attributes = Attributes() - var key: String = "" - var element: Box = NullBox() + var key: String + var element: Box } extension SingleKeyedBox: Box { diff --git a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift index f29441b6..7f5adf17 100644 --- a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift @@ -5,8 +5,6 @@ // Created by James Bean on 7/18/19. // -import Foundation - /// Container specialized for decoding XML choice elements. struct XMLChoiceDecodingContainer: KeyedDecodingContainerProtocol { typealias Key = K diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index a789207f..ce42c024 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -176,7 +176,7 @@ class XMLDecoderImplementation: Decoder { referencing: self, wrapping: SharedBox( keyed.withShared { $0.elements.map { key, box in - SingleKeyedBox(attributes: .init(), key: key, element: box) + SingleKeyedBox(key: key, element: box) } } ) diff --git a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift index cb46f7ea..04d9a52c 100644 --- a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift @@ -5,8 +5,6 @@ // Created by Benjamin Wetherfield on 7/17/19. // -import Foundation - struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol { typealias Key = K From 045e07c130c82e1d13f13f6ad65c91ab2c1b696a Mon Sep 17 00:00:00 2001 From: Ben Wetherfield Date: Fri, 26 Jul 2019 17:17:39 -0700 Subject: [PATCH 10/34] Add enum with associated value encoding tests Add nested array encoding test Add array within dictionary test Formatting Add keyed within unkeyed test Add roundtrip test for keyed within keyed case Update test to roundtrip for robustness Add wrapped tests for encoding Fix formatting --- .../XMLCoderTests/CompositeChoiceTests.swift | 86 ++++++----- Tests/XMLCoderTests/NestingTests.swift | 134 ++++++++++-------- 2 files changed, 129 insertions(+), 91 deletions(-) diff --git a/Tests/XMLCoderTests/CompositeChoiceTests.swift b/Tests/XMLCoderTests/CompositeChoiceTests.swift index 8d9bb6b3..54db559c 100644 --- a/Tests/XMLCoderTests/CompositeChoiceTests.swift +++ b/Tests/XMLCoderTests/CompositeChoiceTests.swift @@ -47,40 +47,60 @@ extension IntOrStringWrapper: Codable { } } -class CompositeChoiceTests: XCTestCase { - func testIntOrStringWrapper() throws { - let xml = """ - - - A Word About Woke Times - - - """ - let result = try XMLDecoder().decode(IntOrStringWrapper.self, from: xml.data(using: .utf8)!) - let expected = IntOrStringWrapper.string(StringWrapper(wrapped: "A Word About Woke Times")) - XCTAssertEqual(result, expected) +class EnumAssociatedValueTestComposite: XCTestCase { + var encoder: XMLEncoder { + let encoder = XMLEncoder() + encoder.outputFormatting = [.prettyPrinted] + return encoder } - func testArrayOfIntOrStringWrappers() throws { - let xml = """ - - - A Word About Woke Times - - - 9000 - - - A Word About Woke Tomes - - - """ - let result = try XMLDecoder().decode([IntOrStringWrapper].self, from: xml.data(using: .utf8)!) - let expected: [IntOrStringWrapper] = [ - .string(StringWrapper(wrapped: "A Word About Woke Times")), - .int(IntWrapper(wrapped: 9000)), - .string(StringWrapper(wrapped: "A Word About Woke Tomes")), - ] - XCTAssertEqual(result, expected) + private let simpleString = IntOrStringWrapper.string(StringWrapper(wrapped: "A Word About Woke Times")) + + private let xmlSimpleString = """ + + + A Word About Woke Times + + + """ + + private let simpleArray: [IntOrStringWrapper] = [ + .string(StringWrapper(wrapped: "A Word About Woke Times")), + .int(IntWrapper(wrapped: 9000)), + .string(StringWrapper(wrapped: "A Word About Woke Tomes")), + ] + + private let xmlSimpleArray = """ + + + A Word About Woke Times + + + 9000 + + + A Word About Woke Tomes + + + """ + + func testDecodeIntOrStringWrapper() throws { + let decoded = try XMLDecoder().decode(IntOrStringWrapper.self, from: xmlSimpleString.data(using: .utf8)!) + XCTAssertEqual(decoded, simpleString) + } + + func testEncodeIntOrStringWrapper() throws { + let encoded = try encoder.encode(simpleString, withRootKey: "container") + XCTAssertEqual(String(data: encoded, encoding: .utf8), xmlSimpleString) + } + + func testDecodeArrayOfIntOrStringWrappers() throws { + let decoded = try XMLDecoder().decode([IntOrStringWrapper].self, from: xmlSimpleArray.data(using: .utf8)!) + XCTAssertEqual(decoded, simpleArray) + } + + func testEncodeArrayOfIntOrStringWrappers() throws { + let encoded = try encoder.encode(simpleArray, withRootKey: "container") + XCTAssertEqual(String(data: encoded, encoding: .utf8), xmlSimpleArray) } } diff --git a/Tests/XMLCoderTests/NestingTests.swift b/Tests/XMLCoderTests/NestingTests.swift index 6aa48d3f..26c893cc 100644 --- a/Tests/XMLCoderTests/NestingTests.swift +++ b/Tests/XMLCoderTests/NestingTests.swift @@ -25,107 +25,125 @@ final class NestingTests: XCTestCase { [1, 2, 3], ] + let xmlUnkeyedWithinUnkeyed = + """ + + + 1 + 2 + 3 + + + 1 + 2 + 3 + + + """ + let unkeyedWithinKeyed: [String: [Int]] = [ "first": [1, 2, 3], "second": [1, 2, 3], ] + let xmlUnkeyedWithinKeyed = + """ + + 1 + 2 + 3 + 1 + 2 + 3 + + """ + let keyedWithinUnkeyed: [[String: Int]] = [ ["first": 1], ["second": 2], ] + let xmlKeyedWithinUnkeyed = + """ + + + 1 + + + 2 + + + """ + let keyedWithinKeyed: [String: [String: Int]] = [ "first": ["a": 1, "b": 2], "second": ["c": 3, "d": 4], ] + let xmlKeyedWithinKeyed = + """ + + + 2 + 1 + + + 3 + 4 + + + """ + func testEncodeUnkeyedWithinUnkeyed() throws { - XCTAssertNoThrow(try encoder.encode(unkeyedWithinUnkeyed, withRootKey: "element")) + let encoded = try encoder.encode(unkeyedWithinUnkeyed, withRootKey: "element") + XCTAssertEqual(String(data: encoded, encoding: .utf8), xmlUnkeyedWithinUnkeyed) } func testEncodeUnkeyedWithinKeyed() throws { - XCTAssertNoThrow(try encoder.encode(unkeyedWithinKeyed, withRootKey: "element")) + let encoded = try encoder.encode(unkeyedWithinKeyed, withRootKey: "element") + let decoded = try decoder.decode([String: [Int]].self, from: encoded) + XCTAssertEqual(decoded, unkeyedWithinKeyed) } func testEncodeKeyedWithinUnkeyed() throws { - XCTAssertNoThrow(try encoder.encode(keyedWithinUnkeyed, withRootKey: "element")) + let encoded = try encoder.encode(keyedWithinUnkeyed, withRootKey: "element") + XCTAssertEqual(String(data: encoded, encoding: .utf8), xmlKeyedWithinUnkeyed) } func testEncodeKeyedWithinKeyed() throws { - XCTAssertNoThrow(try encoder.encode(keyedWithinKeyed, withRootKey: "element")) + let encoded = try encoder.encode(keyedWithinKeyed, withRootKey: "element") + let decoded = try decoder.decode([String: [String: Int]].self, from: encoded) + XCTAssertEqual(decoded, keyedWithinKeyed) } func testDecodeUnkeyedWithinUnkeyed() throws { - let xml = - """ - - - 1 - 2 - 3 - - - 1 - 2 - 3 - - - """ - let encoded = xml.data(using: .utf8)! + let encoded = xmlUnkeyedWithinUnkeyed.data(using: .utf8)! + let expected = [[1, 2, 3], [1, 2, 3]] + let decoded = try decoder.decode([[Int]].self, from: encoded) XCTAssertNoThrow(try decoder.decode(type(of: unkeyedWithinUnkeyed), from: encoded)) } func testDecodeUnkeyedWithinKeyed() throws { - let xml = - """ - - 1 - 2 - 3 - 1 - 2 - 3 - - """ - let encoded = xml.data(using: .utf8)! + let encoded = xmlUnkeyedWithinKeyed.data(using: .utf8)! + let expected = ["first": [1, 2, 3], "second": [1, 2, 3]] + let decoded = try decoder.decode([String: [Int]].self, from: encoded) XCTAssertNoThrow(try decoder.decode(type(of: unkeyedWithinKeyed), from: encoded)) } func testDecodeKeyedWithinUnkeyed() throws { - let xml = - """ - - - 1 - - - 2 - - - """ - let encoded = xml.data(using: .utf8)! + let encoded = xmlKeyedWithinUnkeyed.data(using: .utf8)! + let expected = [["first": 1], ["second": 2]] + let decoded = try decoder.decode([[String: Int]].self, from: encoded) XCTAssertNoThrow(try decoder.decode(type(of: keyedWithinUnkeyed), from: encoded)) } func testDecodeKeyedWithinKeyed() throws { - let xml = - """ - - - 2 - 1 - - - 3 - 4 - - - """ - let encoded = xml.data(using: .utf8)! + let encoded = xmlKeyedWithinKeyed.data(using: .utf8)! + let expected = ["first": ["a": 1, "b": 2], "second": ["c": 3, "d": 4]] + let decoded = try decoder.decode([String: [String: Int]].self, from: encoded) XCTAssertNoThrow(try decoder.decode(type(of: keyedWithinKeyed), from: encoded)) } From a7fb985c72cef2ffde794598a2b69f8c4d289529 Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 10:39:15 -0700 Subject: [PATCH 11/34] Fix usage to one key in the XMLChoiceDecodingContainer Resolve merge conflict Replace xcodeproj --- Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift | 2 +- XMLCoder.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift index 7f5adf17..75dd32f7 100644 --- a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift @@ -69,7 +69,7 @@ struct XMLChoiceDecodingContainer: KeyedDecodingContainerProtocol // MARK: - KeyedDecodingContainerProtocol Methods public var allKeys: [Key] { - return container.withShared { Key(stringValue: $0.key) }.map { [$0] } ?? [] + return container.withShared { [Key(stringValue: $0.key)!] } } public func contains(_ key: Key) -> Bool { diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index 69041046..7e795a0c 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -216,8 +216,8 @@ "OBJ_128" = { isa = "PBXGroup"; children = ( - "XMLCoder::XMLCoder::Product", - "XMLCoder::XMLCoderTests::Product" + "XMLCoder::XMLCoderTests::Product", + "XMLCoder::XMLCoder::Product" ); name = "Products"; path = ""; diff --git a/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/XMLCoder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From b1b6c27980c9d38046a17359133e52e582ea5f96 Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 13:15:29 -0700 Subject: [PATCH 12/34] Factor out mapKeys to XMLDecoderImplementation.transformKeyedContainer Reorder key decoding strategy cases Touch less Mutate directly --- .../Decoder/XMLChoiceDecodingContainer.swift | 40 +---------------- .../Decoder/XMLDecoderImplementation.swift | 19 ++++++++ .../Decoder/XMLKeyedDecodingContainer.swift | 44 ++----------------- 3 files changed, 25 insertions(+), 78 deletions(-) diff --git a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift index 75dd32f7..25a248f1 100644 --- a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift @@ -25,44 +25,8 @@ struct XMLChoiceDecodingContainer: KeyedDecodingContainerProtocol /// Initializes `self` by referencing the given decoder and container. init(referencing decoder: XMLDecoderImplementation, wrapping container: SharedBox) { self.decoder = decoder - - func mapKeys( - _ container: SharedBox, closure: (String) -> String - ) -> SharedBox { - return SharedBox( - ChoiceBox( - key: closure(container.withShared { $0.key }), - element: container.withShared { $0.element } - ) - ) - } - // FIXME: Keep DRY from XMLKeyedDecodingContainer.init - switch decoder.options.keyDecodingStrategy { - case .useDefaultKeys: - self.container = container - case .convertFromSnakeCase: - // Convert the snake case keys in the container to camel case. - // If we hit a duplicate key after conversion, then we'll use the - // first one we saw. Effectively an undefined behavior with dictionaries. - self.container = mapKeys(container) { key in - XMLDecoder.KeyDecodingStrategy._convertFromSnakeCase(key) - } - case .convertFromKebabCase: - self.container = mapKeys(container) { key in - XMLDecoder.KeyDecodingStrategy._convertFromKebabCase(key) - } - case .convertFromCapitalized: - self.container = mapKeys(container) { key in - XMLDecoder.KeyDecodingStrategy._convertFromCapitalized(key) - } - case let .custom(converter): - self.container = mapKeys(container) { key in - let codingPath = decoder.codingPath + [ - XMLKey(stringValue: key, intValue: nil), - ] - return converter(codingPath).stringValue - } - } + container.withShared { $0.key = decoder.keyTransform($0.key) } + self.container = container codingPath = decoder.codingPath } diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index ce42c024..d43b565d 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -460,3 +460,22 @@ extension XMLDecoderImplementation { return result } } + +extension XMLDecoderImplementation { + var keyTransform: (String) -> String { + switch options.keyDecodingStrategy { + case .convertFromSnakeCase: + return XMLDecoder.KeyDecodingStrategy._convertFromSnakeCase + case .convertFromCapitalized: + return XMLDecoder.KeyDecodingStrategy._convertFromCapitalized + case .convertFromKebabCase: + return XMLDecoder.KeyDecodingStrategy._convertFromKebabCase + case .useDefaultKeys: + return { key in key } + case let .custom(converter): + return { key in + converter(self.codingPath + [XMLKey(stringValue: key, intValue: nil)]).stringValue + } + } + } +} diff --git a/Sources/XMLCoder/Decoder/XMLKeyedDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLKeyedDecodingContainer.swift index 8ccd2b15..cbf42eb2 100644 --- a/Sources/XMLCoder/Decoder/XMLKeyedDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLKeyedDecodingContainer.swift @@ -34,47 +34,11 @@ struct XMLKeyedDecodingContainer: KeyedDecodingContainerProtocol { wrapping container: KeyedContainer ) { self.decoder = decoder - - func mapKeys( - _ container: KeyedContainer, - closure: (String) -> String - ) -> KeyedContainer { - let attributes = container.withShared { keyedBox in - keyedBox.attributes.map { (closure($0), $1) } - } - let elements = container.withShared { keyedBox in - keyedBox.elements.map { (closure($0), $1) } - } - let keyedBox = KeyedBox(elements: elements, attributes: attributes) - return SharedBox(keyedBox) - } - - switch decoder.options.keyDecodingStrategy { - case .useDefaultKeys: - self.container = container - case .convertFromSnakeCase: - // Convert the snake case keys in the container to camel case. - // If we hit a duplicate key after conversion, then we'll use the - // first one we saw. Effectively an undefined behavior with dictionaries. - self.container = mapKeys(container) { key in - XMLDecoder.KeyDecodingStrategy._convertFromSnakeCase(key) - } - case .convertFromKebabCase: - self.container = mapKeys(container) { key in - XMLDecoder.KeyDecodingStrategy._convertFromKebabCase(key) - } - case .convertFromCapitalized: - self.container = mapKeys(container) { key in - XMLDecoder.KeyDecodingStrategy._convertFromCapitalized(key) - } - case let .custom(converter): - self.container = mapKeys(container) { key in - let codingPath = decoder.codingPath + [ - XMLKey(stringValue: key, intValue: nil), - ] - return converter(codingPath).stringValue - } + container.withShared { + $0.elements = .init($0.elements.map { (decoder.keyTransform($0), $1) }) + $0.attributes = .init($0.attributes.map { (decoder.keyTransform($0), $1) }) } + self.container = container codingPath = decoder.codingPath } From 048d0c3a45aa219a66d5b3d83e81f6d6f3e6ca64 Mon Sep 17 00:00:00 2001 From: James Bean Date: Fri, 26 Jul 2019 22:40:34 -0700 Subject: [PATCH 13/34] Be more assertive in NestingTests (#44) --- Tests/XMLCoderTests/NestingTests.swift | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Tests/XMLCoderTests/NestingTests.swift b/Tests/XMLCoderTests/NestingTests.swift index 26c893cc..22048997 100644 --- a/Tests/XMLCoderTests/NestingTests.swift +++ b/Tests/XMLCoderTests/NestingTests.swift @@ -118,34 +118,30 @@ final class NestingTests: XCTestCase { func testDecodeUnkeyedWithinUnkeyed() throws { let encoded = xmlUnkeyedWithinUnkeyed.data(using: .utf8)! - let expected = [[1, 2, 3], [1, 2, 3]] + let expected = unkeyedWithinUnkeyed let decoded = try decoder.decode([[Int]].self, from: encoded) - - XCTAssertNoThrow(try decoder.decode(type(of: unkeyedWithinUnkeyed), from: encoded)) + XCTAssertEqual(decoded, expected) } func testDecodeUnkeyedWithinKeyed() throws { let encoded = xmlUnkeyedWithinKeyed.data(using: .utf8)! - let expected = ["first": [1, 2, 3], "second": [1, 2, 3]] + let expected = unkeyedWithinKeyed let decoded = try decoder.decode([String: [Int]].self, from: encoded) - - XCTAssertNoThrow(try decoder.decode(type(of: unkeyedWithinKeyed), from: encoded)) + XCTAssertEqual(decoded, expected) } func testDecodeKeyedWithinUnkeyed() throws { let encoded = xmlKeyedWithinUnkeyed.data(using: .utf8)! - let expected = [["first": 1], ["second": 2]] + let expected = keyedWithinUnkeyed let decoded = try decoder.decode([[String: Int]].self, from: encoded) - - XCTAssertNoThrow(try decoder.decode(type(of: keyedWithinUnkeyed), from: encoded)) + XCTAssertEqual(decoded, expected) } func testDecodeKeyedWithinKeyed() throws { let encoded = xmlKeyedWithinKeyed.data(using: .utf8)! - let expected = ["first": ["a": 1, "b": 2], "second": ["c": 3, "d": 4]] + let expected = keyedWithinKeyed let decoded = try decoder.decode([String: [String: Int]].self, from: encoded) - - XCTAssertNoThrow(try decoder.decode(type(of: keyedWithinKeyed), from: encoded)) + XCTAssertEqual(decoded, expected) } static var allTests = [ From c6ee065872c2ec5795f0ba5afda1a90ce5cac899 Mon Sep 17 00:00:00 2001 From: James Bean Date: Sat, 27 Jul 2019 00:12:57 -0700 Subject: [PATCH 14/34] Use KeyedBox like we used to (#46) --- Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift | 2 +- Sources/XMLCoder/Auxiliaries/XMLStackParser.swift | 2 +- Tests/XMLCoderTests/Minimal/BoxTreeTests.swift | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift index 0fb8b62a..25f862f7 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift @@ -51,7 +51,7 @@ struct XMLCoderElement: Equatable { elements.append(element) } - func transformToBoxTree() -> Box { + func transformToBoxTree() -> KeyedBox { let attributes = KeyedStorage(self.attributes.map { attribute in (key: attribute.key, value: StringBox(attribute.value) as SimpleBox) }) diff --git a/Sources/XMLCoder/Auxiliaries/XMLStackParser.swift b/Sources/XMLCoder/Auxiliaries/XMLStackParser.swift index ee7a4ecd..07ec9b51 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLStackParser.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLStackParser.swift @@ -23,7 +23,7 @@ class XMLStackParser: NSObject { errorContextLength length: UInt, shouldProcessNamespaces: Bool, trimValueWhitespaces: Bool - ) throws -> Box { + ) throws -> KeyedBox { let parser = XMLStackParser(trimValueWhitespaces: trimValueWhitespaces) let node = try parser.parse( diff --git a/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift b/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift index 6dda3c6c..0707a128 100644 --- a/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift +++ b/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift @@ -29,10 +29,7 @@ class BoxTreeTests: XCTestCase { attributes: [] ) - guard let boxTree = root.transformToBoxTree() as? KeyedBox else { - XCTFail("boxtTree is not a KeyedBox") - return - } + let boxTree = root.transformToBoxTree() let foo = boxTree.elements["foo"] XCTAssertEqual(foo.count, 2) } From e6467d5f876b7a870e4d0fccbe09481433db8223 Mon Sep 17 00:00:00 2001 From: James Bean Date: Sat, 27 Jul 2019 20:18:48 -0700 Subject: [PATCH 15/34] Rename scheme XMLCoder-Package -> XMLCoder --- .../xcschemes/XMLCoder-Package.xcscheme | 81 ------------------- 1 file changed, 81 deletions(-) delete mode 100644 XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder-Package.xcscheme diff --git a/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder-Package.xcscheme b/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder-Package.xcscheme deleted file mode 100644 index c117e5d6..00000000 --- a/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder-Package.xcscheme +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From ce09102bee57ccf338a0b2659bbf7e96a058767b Mon Sep 17 00:00:00 2001 From: James Bean Date: Sat, 27 Jul 2019 20:35:11 -0700 Subject: [PATCH 16/34] Share scheme --- .../xcshareddata/xcschemes/XMLCoder.xcscheme | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme diff --git a/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme b/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme new file mode 100644 index 00000000..59df07f8 --- /dev/null +++ b/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From f09c79d9405dd1aaa8874857676c38b0780246da Mon Sep 17 00:00:00 2001 From: James Bean Date: Sat, 27 Jul 2019 20:40:40 -0700 Subject: [PATCH 17/34] Use Swift 4.2 --- XMLCoder.xcodeproj/project.pbxproj | 2859 ++++++++++------------------ 1 file changed, 994 insertions(+), 1865 deletions(-) diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index 7e795a0c..3980fbc2 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -1,1868 +1,997 @@ // !$*UTF8*$! { - archiveVersion = "1"; - objectVersion = "46"; - objects = { - "OBJ_1" = { - isa = "PBXProject"; - attributes = { - LastSwiftMigration = "9999"; - LastUpgradeCheck = "9999"; - }; - buildConfigurationList = "OBJ_2"; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = "English"; - hasScannedForEncodings = "0"; - knownRegions = ( - "en" - ); - mainGroup = "OBJ_5"; - productRefGroup = "OBJ_128"; - projectDirPath = "."; - targets = ( - "XMLCoder::XMLCoder", - "XMLCoder::SwiftPMPackageDescription", - "XMLCoder::XMLCoderPackageTests::ProductTarget", - "XMLCoder::XMLCoderTests" - ); - }; - "OBJ_10" = { - isa = "PBXGroup"; - children = ( - "OBJ_11", - "OBJ_28", - "OBJ_29", - "OBJ_30", - "OBJ_31", - "OBJ_32", - "OBJ_33", - "OBJ_34", - "OBJ_35", - "OBJ_36" - ); - name = "Auxiliaries"; - path = "Auxiliaries"; - sourceTree = ""; - }; - "OBJ_100" = { - isa = "PBXFileReference"; - path = "DecimalTests.swift"; - sourceTree = ""; - }; - "OBJ_101" = { - isa = "PBXFileReference"; - path = "EmptyTests.swift"; - sourceTree = ""; - }; - "OBJ_102" = { - isa = "PBXFileReference"; - path = "FloatTests.swift"; - sourceTree = ""; - }; - "OBJ_103" = { - isa = "PBXFileReference"; - path = "IntTests.swift"; - sourceTree = ""; - }; - "OBJ_104" = { - isa = "PBXFileReference"; - path = "KeyedIntTests.swift"; - sourceTree = ""; - }; - "OBJ_105" = { - isa = "PBXFileReference"; - path = "KeyedTests.swift"; - sourceTree = ""; - }; - "OBJ_106" = { - isa = "PBXFileReference"; - path = "NullTests.swift"; - sourceTree = ""; - }; - "OBJ_107" = { - isa = "PBXFileReference"; - path = "OptionalTests.swift"; - sourceTree = ""; - }; - "OBJ_108" = { - isa = "PBXFileReference"; - path = "StringTests.swift"; - sourceTree = ""; - }; - "OBJ_109" = { - isa = "PBXFileReference"; - path = "UIntTests.swift"; - sourceTree = ""; - }; - "OBJ_11" = { - isa = "PBXGroup"; - children = ( - "OBJ_12", - "OBJ_13", - "OBJ_14", - "OBJ_15", - "OBJ_16", - "OBJ_17", - "OBJ_18", - "OBJ_19", - "OBJ_20", - "OBJ_21", - "OBJ_22", - "OBJ_23", - "OBJ_24", - "OBJ_25", - "OBJ_26", - "OBJ_27" - ); - name = "Box"; - path = "Box"; - sourceTree = ""; - }; - "OBJ_110" = { - isa = "PBXFileReference"; - path = "URLTests.swift"; - sourceTree = ""; - }; - "OBJ_111" = { - isa = "PBXFileReference"; - path = "UnkeyedIntTests.swift"; - sourceTree = ""; - }; - "OBJ_112" = { - isa = "PBXFileReference"; - path = "UnkeyedTests.swift"; - sourceTree = ""; - }; - "OBJ_113" = { - isa = "PBXFileReference"; - path = "MixedContainerTest.swift"; - sourceTree = ""; - }; - "OBJ_114" = { - isa = "PBXFileReference"; - path = "NamespaceTest.swift"; - sourceTree = ""; - }; - "OBJ_115" = { - isa = "PBXFileReference"; - path = "NestedAttributeChoiceTests.swift"; - sourceTree = ""; - }; - "OBJ_116" = { - isa = "PBXFileReference"; - path = "NestedChoiceTests.swift"; - sourceTree = ""; - }; - "OBJ_117" = { - isa = "PBXFileReference"; - path = "NestingTests.swift"; - sourceTree = ""; - }; - "OBJ_118" = { - isa = "PBXFileReference"; - path = "NodeEncodingStrategyTests.swift"; - sourceTree = ""; - }; - "OBJ_119" = { - isa = "PBXFileReference"; - path = "NoteTest.swift"; - sourceTree = ""; - }; - "OBJ_12" = { - isa = "PBXFileReference"; - path = "BoolBox.swift"; - sourceTree = ""; - }; - "OBJ_120" = { - isa = "PBXFileReference"; - path = "PlantCatalog.swift"; - sourceTree = ""; - }; - "OBJ_121" = { - isa = "PBXFileReference"; - path = "PlantTest.swift"; - sourceTree = ""; - }; - "OBJ_122" = { - isa = "PBXFileReference"; - path = "RJISample.swift"; - sourceTree = ""; - }; - "OBJ_123" = { - isa = "PBXFileReference"; - path = "RJITest.swift"; - sourceTree = ""; - }; - "OBJ_124" = { - isa = "PBXFileReference"; - path = "RelationshipsTest.swift"; - sourceTree = ""; - }; - "OBJ_125" = { - isa = "PBXFileReference"; - path = "SimpleChoiceTests.swift"; - sourceTree = ""; - }; - "OBJ_126" = { - isa = "PBXFileReference"; - path = "SingleChildTests.swift"; - sourceTree = ""; - }; - "OBJ_127" = { - isa = "PBXFileReference"; - path = "SpacePreserveTest.swift"; - sourceTree = ""; - }; - "OBJ_128" = { - isa = "PBXGroup"; - children = ( - "XMLCoder::XMLCoderTests::Product", - "XMLCoder::XMLCoder::Product" - ); - name = "Products"; - path = ""; - sourceTree = "BUILT_PRODUCTS_DIR"; - }; - "OBJ_13" = { - isa = "PBXFileReference"; - path = "Box.swift"; - sourceTree = ""; - }; - "OBJ_131" = { - isa = "PBXFileReference"; - path = "CODE_OF_CONDUCT.md"; - sourceTree = ""; - }; - "OBJ_132" = { - isa = "PBXFileReference"; - path = "codecov.yml"; - sourceTree = ""; - }; - "OBJ_133" = { - isa = "PBXFileReference"; - path = "XMLCoder.podspec"; - sourceTree = ""; - }; - "OBJ_134" = { - isa = "PBXFileReference"; - path = "LICENSE"; - sourceTree = ""; - }; - "OBJ_135" = { - isa = "PBXFileReference"; - path = "CHANGELOG.md"; - sourceTree = ""; - }; - "OBJ_136" = { - isa = "PBXFileReference"; - path = "test_swiftpm.sh"; - sourceTree = ""; - }; - "OBJ_137" = { - isa = "PBXFileReference"; - path = "test_xcodebuild.sh"; - sourceTree = ""; - }; - "OBJ_138" = { - isa = "PBXFileReference"; - path = "lint.sh"; - sourceTree = ""; - }; - "OBJ_139" = { - isa = "PBXFileReference"; - path = "azure-pipelines.yml"; - sourceTree = ""; - }; - "OBJ_14" = { - isa = "PBXFileReference"; - path = "ChoiceBox.swift"; - sourceTree = ""; - }; - "OBJ_140" = { - isa = "PBXFileReference"; - path = "README.md"; - sourceTree = ""; - }; - "OBJ_141" = { - isa = "PBXFileReference"; - path = "docs.sh"; - sourceTree = ""; - }; - "OBJ_142" = { - isa = "PBXFileReference"; - path = "pod.sh"; - sourceTree = ""; - }; - "OBJ_144" = { - isa = "XCConfigurationList"; - buildConfigurations = ( - "OBJ_145", - "OBJ_146" - ); - defaultConfigurationIsVisible = "0"; - defaultConfigurationName = "Release"; - }; - "OBJ_145" = { - isa = "XCBuildConfiguration"; - buildSettings = { - ENABLE_TESTABILITY = "YES"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks" - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)" - ); - INFOPLIST_FILE = "XMLCoder.xcodeproj/XMLCoder_Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = "8.0"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" - ); - MACOSX_DEPLOYMENT_TARGET = "10.10"; - OTHER_CFLAGS = ( - "$(inherited)" - ); - OTHER_LDFLAGS = ( - "$(inherited)" - ); - OTHER_SWIFT_FLAGS = ( - "$(inherited)" - ); - PRODUCT_BUNDLE_IDENTIFIER = "XMLCoder"; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = "YES"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( - "$(inherited)" - ); - SWIFT_VERSION = "5.0"; - TARGET_NAME = "XMLCoder"; - TVOS_DEPLOYMENT_TARGET = "9.0"; - WATCHOS_DEPLOYMENT_TARGET = "2.0"; - }; - name = "Debug"; - }; - "OBJ_146" = { - isa = "XCBuildConfiguration"; - buildSettings = { - ENABLE_TESTABILITY = "YES"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks" - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)" - ); - INFOPLIST_FILE = "XMLCoder.xcodeproj/XMLCoder_Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = "8.0"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" - ); - MACOSX_DEPLOYMENT_TARGET = "10.10"; - OTHER_CFLAGS = ( - "$(inherited)" - ); - OTHER_LDFLAGS = ( - "$(inherited)" - ); - OTHER_SWIFT_FLAGS = ( - "$(inherited)" - ); - PRODUCT_BUNDLE_IDENTIFIER = "XMLCoder"; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = "YES"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( - "$(inherited)" - ); - SWIFT_VERSION = "5.0"; - TARGET_NAME = "XMLCoder"; - TVOS_DEPLOYMENT_TARGET = "9.0"; - WATCHOS_DEPLOYMENT_TARGET = "2.0"; - }; - name = "Release"; - }; - "OBJ_147" = { - isa = "PBXSourcesBuildPhase"; - files = ( - "OBJ_148", - "OBJ_149", - "OBJ_150", - "OBJ_151", - "OBJ_152", - "OBJ_153", - "OBJ_154", - "OBJ_155", - "OBJ_156", - "OBJ_157", - "OBJ_158", - "OBJ_159", - "OBJ_160", - "OBJ_161", - "OBJ_162", - "OBJ_163", - "OBJ_164", - "OBJ_165", - "OBJ_166", - "OBJ_167", - "OBJ_168", - "OBJ_169", - "OBJ_170", - "OBJ_171", - "OBJ_172", - "OBJ_173", - "OBJ_174", - "OBJ_175", - "OBJ_176", - "OBJ_177", - "OBJ_178", - "OBJ_179", - "OBJ_180", - "OBJ_181", - "OBJ_182", - "OBJ_183", - "OBJ_184", - "OBJ_185", - "OBJ_186", - "OBJ_187", - "OBJ_188", - "OBJ_189", - "OBJ_190", - "OBJ_191" - ); - }; - "OBJ_148" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_12"; - }; - "OBJ_149" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_13"; - }; - "OBJ_15" = { - isa = "PBXFileReference"; - path = "DataBox.swift"; - sourceTree = ""; - }; - "OBJ_150" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_14"; - }; - "OBJ_151" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_15"; - }; - "OBJ_152" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_16"; - }; - "OBJ_153" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_17"; - }; - "OBJ_154" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_18"; - }; - "OBJ_155" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_19"; - }; - "OBJ_156" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_20"; - }; - "OBJ_157" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_21"; - }; - "OBJ_158" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_22"; - }; - "OBJ_159" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_23"; - }; - "OBJ_16" = { - isa = "PBXFileReference"; - path = "DateBox.swift"; - sourceTree = ""; - }; - "OBJ_160" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_24"; - }; - "OBJ_161" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_25"; - }; - "OBJ_162" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_26"; - }; - "OBJ_163" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_27"; - }; - "OBJ_164" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_28"; - }; - "OBJ_165" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_29"; - }; - "OBJ_166" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_30"; - }; - "OBJ_167" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_31"; - }; - "OBJ_168" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_32"; - }; - "OBJ_169" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_33"; - }; - "OBJ_17" = { - isa = "PBXFileReference"; - path = "DecimalBox.swift"; - sourceTree = ""; - }; - "OBJ_170" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_34"; - }; - "OBJ_171" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_35"; - }; - "OBJ_172" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_36"; - }; - "OBJ_173" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_38"; - }; - "OBJ_174" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_39"; - }; - "OBJ_175" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_40"; - }; - "OBJ_176" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_41"; - }; - "OBJ_177" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_42"; - }; - "OBJ_178" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_43"; - }; - "OBJ_179" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_44"; - }; - "OBJ_18" = { - isa = "PBXFileReference"; - path = "FloatBox.swift"; - sourceTree = ""; - }; - "OBJ_180" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_45"; - }; - "OBJ_181" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_46"; - }; - "OBJ_182" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_48"; - }; - "OBJ_183" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_49"; - }; - "OBJ_184" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_50"; - }; - "OBJ_185" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_51"; - }; - "OBJ_186" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_52"; - }; - "OBJ_187" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_53"; - }; - "OBJ_188" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_54"; - }; - "OBJ_189" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_55"; - }; - "OBJ_19" = { - isa = "PBXFileReference"; - path = "IntBox.swift"; - sourceTree = ""; - }; - "OBJ_190" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_56"; - }; - "OBJ_191" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_57"; - }; - "OBJ_192" = { - isa = "PBXFrameworksBuildPhase"; - files = ( - ); - }; - "OBJ_194" = { - isa = "XCConfigurationList"; - buildConfigurations = ( - "OBJ_195", - "OBJ_196" - ); - defaultConfigurationIsVisible = "0"; - defaultConfigurationName = "Release"; - }; - "OBJ_195" = { - isa = "XCBuildConfiguration"; - buildSettings = { - LD = "/usr/bin/true"; - OTHER_SWIFT_FLAGS = ( - "-swift-version", - "5", - "-I", - "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", - "-target", - "x86_64-apple-macosx10.10", - "-sdk", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk" - ); - SWIFT_VERSION = "5.0"; - }; - name = "Debug"; - }; - "OBJ_196" = { - isa = "XCBuildConfiguration"; - buildSettings = { - LD = "/usr/bin/true"; - OTHER_SWIFT_FLAGS = ( - "-swift-version", - "5", - "-I", - "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", - "-target", - "x86_64-apple-macosx10.10", - "-sdk", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk" - ); - SWIFT_VERSION = "5.0"; - }; - name = "Release"; - }; - "OBJ_197" = { - isa = "PBXSourcesBuildPhase"; - files = ( - "OBJ_198" - ); - }; - "OBJ_198" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_6"; - }; - "OBJ_2" = { - isa = "XCConfigurationList"; - buildConfigurations = ( - "OBJ_3", - "OBJ_4" - ); - defaultConfigurationIsVisible = "0"; - defaultConfigurationName = "Release"; - }; - "OBJ_20" = { - isa = "PBXFileReference"; - path = "KeyedBox.swift"; - sourceTree = ""; - }; - "OBJ_200" = { - isa = "XCConfigurationList"; - buildConfigurations = ( - "OBJ_201", - "OBJ_202" - ); - defaultConfigurationIsVisible = "0"; - defaultConfigurationName = "Release"; - }; - "OBJ_201" = { - isa = "XCBuildConfiguration"; - buildSettings = { - }; - name = "Debug"; - }; - "OBJ_202" = { - isa = "XCBuildConfiguration"; - buildSettings = { - }; - name = "Release"; - }; - "OBJ_203" = { - isa = "PBXTargetDependency"; - target = "XMLCoder::XMLCoderTests"; - }; - "OBJ_205" = { - isa = "XCConfigurationList"; - buildConfigurations = ( - "OBJ_206", - "OBJ_207" - ); - defaultConfigurationIsVisible = "0"; - defaultConfigurationName = "Release"; - }; - "OBJ_206" = { - isa = "XCBuildConfiguration"; - buildSettings = { - CLANG_ENABLE_MODULES = "YES"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks" - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)" - ); - INFOPLIST_FILE = "XMLCoder.xcodeproj/XMLCoderTests_Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = "8.0"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@loader_path/../Frameworks", - "@loader_path/Frameworks" - ); - MACOSX_DEPLOYMENT_TARGET = "10.10"; - OTHER_CFLAGS = ( - "$(inherited)" - ); - OTHER_LDFLAGS = ( - "$(inherited)" - ); - OTHER_SWIFT_FLAGS = ( - "$(inherited)" - ); - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( - "$(inherited)" - ); - SWIFT_VERSION = "5.0"; - TARGET_NAME = "XMLCoderTests"; - TVOS_DEPLOYMENT_TARGET = "9.0"; - WATCHOS_DEPLOYMENT_TARGET = "2.0"; - }; - name = "Debug"; - }; - "OBJ_207" = { - isa = "XCBuildConfiguration"; - buildSettings = { - CLANG_ENABLE_MODULES = "YES"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks" - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)" - ); - INFOPLIST_FILE = "XMLCoder.xcodeproj/XMLCoderTests_Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = "8.0"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@loader_path/../Frameworks", - "@loader_path/Frameworks" - ); - MACOSX_DEPLOYMENT_TARGET = "10.10"; - OTHER_CFLAGS = ( - "$(inherited)" - ); - OTHER_LDFLAGS = ( - "$(inherited)" - ); - OTHER_SWIFT_FLAGS = ( - "$(inherited)" - ); - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( - "$(inherited)" - ); - SWIFT_VERSION = "5.0"; - TARGET_NAME = "XMLCoderTests"; - TVOS_DEPLOYMENT_TARGET = "9.0"; - WATCHOS_DEPLOYMENT_TARGET = "2.0"; - }; - name = "Release"; - }; - "OBJ_208" = { - isa = "PBXSourcesBuildPhase"; - files = ( - "OBJ_209", - "OBJ_210", - "OBJ_211", - "OBJ_212", - "OBJ_213", - "OBJ_214", - "OBJ_215", - "OBJ_216", - "OBJ_217", - "OBJ_218", - "OBJ_219", - "OBJ_220", - "OBJ_221", - "OBJ_222", - "OBJ_223", - "OBJ_224", - "OBJ_225", - "OBJ_226", - "OBJ_227", - "OBJ_228", - "OBJ_229", - "OBJ_230", - "OBJ_231", - "OBJ_232", - "OBJ_233", - "OBJ_234", - "OBJ_235", - "OBJ_236", - "OBJ_237", - "OBJ_238", - "OBJ_239", - "OBJ_240", - "OBJ_241", - "OBJ_242", - "OBJ_243", - "OBJ_244", - "OBJ_245", - "OBJ_246", - "OBJ_247", - "OBJ_248", - "OBJ_249", - "OBJ_250", - "OBJ_251", - "OBJ_252", - "OBJ_253", - "OBJ_254", - "OBJ_255", - "OBJ_256", - "OBJ_257", - "OBJ_258", - "OBJ_259", - "OBJ_260", - "OBJ_261", - "OBJ_262", - "OBJ_263", - "OBJ_264", - "OBJ_265", - "OBJ_266", - "OBJ_267", - "OBJ_268", - "OBJ_269", - "OBJ_270", - "OBJ_271", - "OBJ_272", - "OBJ_273" - ); - }; - "OBJ_209" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_60"; - }; - "OBJ_21" = { - isa = "PBXFileReference"; - path = "NullBox.swift"; - sourceTree = ""; - }; - "OBJ_210" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_61"; - }; - "OBJ_211" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_63"; - }; - "OBJ_212" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_64"; - }; - "OBJ_213" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_65"; - }; - "OBJ_214" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_66"; - }; - "OBJ_215" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_67"; - }; - "OBJ_216" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_68"; - }; - "OBJ_217" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_69"; - }; - "OBJ_218" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_70"; - }; - "OBJ_219" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_72"; - }; - "OBJ_22" = { - isa = "PBXFileReference"; - path = "SharedBox.swift"; - sourceTree = ""; - }; - "OBJ_220" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_73"; - }; - "OBJ_221" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_74"; - }; - "OBJ_222" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_75"; - }; - "OBJ_223" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_76"; - }; - "OBJ_224" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_77"; - }; - "OBJ_225" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_78"; - }; - "OBJ_226" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_79"; - }; - "OBJ_227" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_80"; - }; - "OBJ_228" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_81"; - }; - "OBJ_229" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_82"; - }; - "OBJ_23" = { - isa = "PBXFileReference"; - path = "SingleKeyedBox.swift"; - sourceTree = ""; - }; - "OBJ_230" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_83"; - }; - "OBJ_231" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_84"; - }; - "OBJ_232" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_85"; - }; - "OBJ_233" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_86"; - }; - "OBJ_234" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_87"; - }; - "OBJ_235" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_88"; - }; - "OBJ_236" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_89"; - }; - "OBJ_237" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_90"; - }; - "OBJ_238" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_91"; - }; - "OBJ_239" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_92"; - }; - "OBJ_24" = { - isa = "PBXFileReference"; - path = "StringBox.swift"; - sourceTree = ""; - }; - "OBJ_240" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_93"; - }; - "OBJ_241" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_94"; - }; - "OBJ_242" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_96"; - }; - "OBJ_243" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_97"; - }; - "OBJ_244" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_98"; - }; - "OBJ_245" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_99"; - }; - "OBJ_246" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_100"; - }; - "OBJ_247" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_101"; - }; - "OBJ_248" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_102"; - }; - "OBJ_249" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_103"; - }; - "OBJ_25" = { - isa = "PBXFileReference"; - path = "UIntBox.swift"; - sourceTree = ""; - }; - "OBJ_250" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_104"; - }; - "OBJ_251" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_105"; - }; - "OBJ_252" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_106"; - }; - "OBJ_253" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_107"; - }; - "OBJ_254" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_108"; - }; - "OBJ_255" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_109"; - }; - "OBJ_256" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_110"; - }; - "OBJ_257" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_111"; - }; - "OBJ_258" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_112"; - }; - "OBJ_259" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_113"; - }; - "OBJ_26" = { - isa = "PBXFileReference"; - path = "URLBox.swift"; - sourceTree = ""; - }; - "OBJ_260" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_114"; - }; - "OBJ_261" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_115"; - }; - "OBJ_262" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_116"; - }; - "OBJ_263" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_117"; - }; - "OBJ_264" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_118"; - }; - "OBJ_265" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_119"; - }; - "OBJ_266" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_120"; - }; - "OBJ_267" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_121"; - }; - "OBJ_268" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_122"; - }; - "OBJ_269" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_123"; - }; - "OBJ_27" = { - isa = "PBXFileReference"; - path = "UnkeyedBox.swift"; - sourceTree = ""; - }; - "OBJ_270" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_124"; - }; - "OBJ_271" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_125"; - }; - "OBJ_272" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_126"; - }; - "OBJ_273" = { - isa = "PBXBuildFile"; - fileRef = "OBJ_127"; - }; - "OBJ_274" = { - isa = "PBXFrameworksBuildPhase"; - files = ( - "OBJ_275" - ); - }; - "OBJ_275" = { - isa = "PBXBuildFile"; - fileRef = "XMLCoder::XMLCoder::Product"; - }; - "OBJ_276" = { - isa = "PBXTargetDependency"; - target = "XMLCoder::XMLCoder"; - }; - "OBJ_28" = { - isa = "PBXFileReference"; - path = "ISO8601DateFormatter.swift"; - sourceTree = ""; - }; - "OBJ_29" = { - isa = "PBXFileReference"; - path = "KeyedStorage.swift"; - sourceTree = ""; - }; - "OBJ_3" = { - isa = "XCBuildConfiguration"; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = "YES"; - COMBINE_HIDPI_IMAGES = "YES"; - COPY_PHASE_STRIP = "NO"; - DEBUG_INFORMATION_FORMAT = "dwarf"; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_NS_ASSERTIONS = "YES"; - GCC_OPTIMIZATION_LEVEL = "0"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "SWIFT_PACKAGE=1", - "DEBUG=1" - ); - MACOSX_DEPLOYMENT_TARGET = "10.10"; - ONLY_ACTIVE_ARCH = "YES"; - OTHER_SWIFT_FLAGS = ( - "-DXcode" - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = "macosx"; - SUPPORTED_PLATFORMS = ( - "macosx", - "iphoneos", - "iphonesimulator", - "appletvos", - "appletvsimulator", - "watchos", - "watchsimulator" - ); - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( - "$(inherited)", - "SWIFT_PACKAGE", - "DEBUG" - ); - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - USE_HEADERMAP = "NO"; - }; - name = "Debug"; - }; - "OBJ_30" = { - isa = "PBXFileReference"; - path = "Metatypes.swift"; - sourceTree = ""; - }; - "OBJ_31" = { - isa = "PBXFileReference"; - path = "String+Extensions.swift"; - sourceTree = ""; - }; - "OBJ_32" = { - isa = "PBXFileReference"; - path = "XMLChoiceCodingKey.swift"; - sourceTree = ""; - }; - "OBJ_33" = { - isa = "PBXFileReference"; - path = "XMLCoderElement.swift"; - sourceTree = ""; - }; - "OBJ_34" = { - isa = "PBXFileReference"; - path = "XMLHeader.swift"; - sourceTree = ""; - }; - "OBJ_35" = { - isa = "PBXFileReference"; - path = "XMLKey.swift"; - sourceTree = ""; - }; - "OBJ_36" = { - isa = "PBXFileReference"; - path = "XMLStackParser.swift"; - sourceTree = ""; - }; - "OBJ_37" = { - isa = "PBXGroup"; - children = ( - "OBJ_38", - "OBJ_39", - "OBJ_40", - "OBJ_41", - "OBJ_42", - "OBJ_43", - "OBJ_44", - "OBJ_45", - "OBJ_46" - ); - name = "Decoder"; - path = "Decoder"; - sourceTree = ""; - }; - "OBJ_38" = { - isa = "PBXFileReference"; - path = "DecodingErrorExtension.swift"; - sourceTree = ""; - }; - "OBJ_39" = { - isa = "PBXFileReference"; - path = "DynamicNodeDecoding.swift"; - sourceTree = ""; - }; - "OBJ_4" = { - isa = "XCBuildConfiguration"; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = "YES"; - COMBINE_HIDPI_IMAGES = "YES"; - COPY_PHASE_STRIP = "YES"; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_OPTIMIZATION_LEVEL = "s"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "SWIFT_PACKAGE=1" - ); - MACOSX_DEPLOYMENT_TARGET = "10.10"; - OTHER_SWIFT_FLAGS = ( - "-DXcode" - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = "macosx"; - SUPPORTED_PLATFORMS = ( - "macosx", - "iphoneos", - "iphonesimulator", - "appletvos", - "appletvsimulator", - "watchos", - "watchsimulator" - ); - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( - "$(inherited)", - "SWIFT_PACKAGE" - ); - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - USE_HEADERMAP = "NO"; - }; - name = "Release"; - }; - "OBJ_40" = { - isa = "PBXFileReference"; - path = "SingleValueDecodingContainer.swift"; - sourceTree = ""; - }; - "OBJ_41" = { - isa = "PBXFileReference"; - path = "XMLChoiceDecodingContainer.swift"; - sourceTree = ""; - }; - "OBJ_42" = { - isa = "PBXFileReference"; - path = "XMLDecoder.swift"; - sourceTree = ""; - }; - "OBJ_43" = { - isa = "PBXFileReference"; - path = "XMLDecoderImplementation.swift"; - sourceTree = ""; - }; - "OBJ_44" = { - isa = "PBXFileReference"; - path = "XMLDecodingStorage.swift"; - sourceTree = ""; - }; - "OBJ_45" = { - isa = "PBXFileReference"; - path = "XMLKeyedDecodingContainer.swift"; - sourceTree = ""; - }; - "OBJ_46" = { - isa = "PBXFileReference"; - path = "XMLUnkeyedDecodingContainer.swift"; - sourceTree = ""; - }; - "OBJ_47" = { - isa = "PBXGroup"; - children = ( - "OBJ_48", - "OBJ_49", - "OBJ_50", - "OBJ_51", - "OBJ_52", - "OBJ_53", - "OBJ_54", - "OBJ_55", - "OBJ_56", - "OBJ_57" - ); - name = "Encoder"; - path = "Encoder"; - sourceTree = ""; - }; - "OBJ_48" = { - isa = "PBXFileReference"; - path = "DynamicNodeEncoding.swift"; - sourceTree = ""; - }; - "OBJ_49" = { - isa = "PBXFileReference"; - path = "EncodingErrorExtension.swift"; - sourceTree = ""; - }; - "OBJ_5" = { - isa = "PBXGroup"; - children = ( - "OBJ_6", - "OBJ_7", - "OBJ_58", - "OBJ_128", - "OBJ_131", - "OBJ_132", - "OBJ_133", - "OBJ_134", - "OBJ_135", - "OBJ_136", - "OBJ_137", - "OBJ_138", - "OBJ_139", - "OBJ_140", - "OBJ_141", - "OBJ_142" - ); - path = ""; - sourceTree = ""; - }; - "OBJ_50" = { - isa = "PBXFileReference"; - path = "SingleValueEncodingContainer.swift"; - sourceTree = ""; - }; - "OBJ_51" = { - isa = "PBXFileReference"; - path = "XMLChoiceEncodingContainer.swift"; - sourceTree = ""; - }; - "OBJ_52" = { - isa = "PBXFileReference"; - path = "XMLEncoder.swift"; - sourceTree = ""; - }; - "OBJ_53" = { - isa = "PBXFileReference"; - path = "XMLEncoderImplementation.swift"; - sourceTree = ""; - }; - "OBJ_54" = { - isa = "PBXFileReference"; - path = "XMLEncodingStorage.swift"; - sourceTree = ""; - }; - "OBJ_55" = { - isa = "PBXFileReference"; - path = "XMLKeyedEncodingContainer.swift"; - sourceTree = ""; - }; - "OBJ_56" = { - isa = "PBXFileReference"; - path = "XMLReferencingEncoder.swift"; - sourceTree = ""; - }; - "OBJ_57" = { - isa = "PBXFileReference"; - path = "XMLUnkeyedEncodingContainer.swift"; - sourceTree = ""; - }; - "OBJ_58" = { - isa = "PBXGroup"; - children = ( - "OBJ_59" - ); - name = "Tests"; - path = ""; - sourceTree = "SOURCE_ROOT"; - }; - "OBJ_59" = { - isa = "PBXGroup"; - children = ( - "OBJ_60", - "OBJ_61", - "OBJ_62", - "OBJ_68", - "OBJ_69", - "OBJ_70", - "OBJ_71", - "OBJ_85", - "OBJ_86", - "OBJ_87", - "OBJ_88", - "OBJ_89", - "OBJ_90", - "OBJ_91", - "OBJ_92", - "OBJ_93", - "OBJ_94", - "OBJ_95", - "OBJ_113", - "OBJ_114", - "OBJ_115", - "OBJ_116", - "OBJ_117", - "OBJ_118", - "OBJ_119", - "OBJ_120", - "OBJ_121", - "OBJ_122", - "OBJ_123", - "OBJ_124", - "OBJ_125", - "OBJ_126", - "OBJ_127" - ); - name = "XMLCoderTests"; - path = "Tests/XMLCoderTests"; - sourceTree = "SOURCE_ROOT"; - }; - "OBJ_6" = { - isa = "PBXFileReference"; - explicitFileType = "sourcecode.swift"; - path = "Package.swift"; - sourceTree = ""; - }; - "OBJ_60" = { - isa = "PBXFileReference"; - path = "AttributedEnumIntrinsicTest.swift"; - sourceTree = ""; - }; - "OBJ_61" = { - isa = "PBXFileReference"; - path = "AttributedIntrinsicTest.swift"; - sourceTree = ""; - }; - "OBJ_62" = { - isa = "PBXGroup"; - children = ( - "OBJ_63", - "OBJ_64", - "OBJ_65", - "OBJ_66", - "OBJ_67" - ); - name = "Auxiliary"; - path = "Auxiliary"; - sourceTree = ""; - }; - "OBJ_63" = { - isa = "PBXFileReference"; - path = "String+ExtensionsTests.swift"; - sourceTree = ""; - }; - "OBJ_64" = { - isa = "PBXFileReference"; - path = "XMLElementTests.swift"; - sourceTree = ""; - }; - "OBJ_65" = { - isa = "PBXFileReference"; - path = "XMLHeaderTests.swift"; - sourceTree = ""; - }; - "OBJ_66" = { - isa = "PBXFileReference"; - path = "XMLKeyTests.swift"; - sourceTree = ""; - }; - "OBJ_67" = { - isa = "PBXFileReference"; - path = "XMLStackParserTests.swift"; - sourceTree = ""; - }; - "OBJ_68" = { - isa = "PBXFileReference"; - path = "BenchmarkTests.swift"; - sourceTree = ""; - }; - "OBJ_69" = { - isa = "PBXFileReference"; - path = "BooksTest.swift"; - sourceTree = ""; - }; - "OBJ_7" = { - isa = "PBXGroup"; - children = ( - "OBJ_8" - ); - name = "Sources"; - path = ""; - sourceTree = "SOURCE_ROOT"; - }; - "OBJ_70" = { - isa = "PBXFileReference"; - path = "BorderTest.swift"; - sourceTree = ""; - }; - "OBJ_71" = { - isa = "PBXGroup"; - children = ( - "OBJ_72", - "OBJ_73", - "OBJ_74", - "OBJ_75", - "OBJ_76", - "OBJ_77", - "OBJ_78", - "OBJ_79", - "OBJ_80", - "OBJ_81", - "OBJ_82", - "OBJ_83", - "OBJ_84" - ); - name = "Box"; - path = "Box"; - sourceTree = ""; - }; - "OBJ_72" = { - isa = "PBXFileReference"; - path = "BoolBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_73" = { - isa = "PBXFileReference"; - path = "DataBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_74" = { - isa = "PBXFileReference"; - path = "DateBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_75" = { - isa = "PBXFileReference"; - path = "DecimalBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_76" = { - isa = "PBXFileReference"; - path = "FloatBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_77" = { - isa = "PBXFileReference"; - path = "IntBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_78" = { - isa = "PBXFileReference"; - path = "KeyedBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_79" = { - isa = "PBXFileReference"; - path = "NullBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_8" = { - isa = "PBXGroup"; - children = ( - "OBJ_9", - "OBJ_10", - "OBJ_37", - "OBJ_47" - ); - name = "XMLCoder"; - path = "Sources/XMLCoder"; - sourceTree = "SOURCE_ROOT"; - }; - "OBJ_80" = { - isa = "PBXFileReference"; - path = "SharedBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_81" = { - isa = "PBXFileReference"; - path = "StringBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_82" = { - isa = "PBXFileReference"; - path = "UIntBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_83" = { - isa = "PBXFileReference"; - path = "URLBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_84" = { - isa = "PBXFileReference"; - path = "UnkeyedBoxTests.swift"; - sourceTree = ""; - }; - "OBJ_85" = { - isa = "PBXFileReference"; - path = "BreakfastTest.swift"; - sourceTree = ""; - }; - "OBJ_86" = { - isa = "PBXFileReference"; - path = "CDCatalog.swift"; - sourceTree = ""; - }; - "OBJ_87" = { - isa = "PBXFileReference"; - path = "CDTest.swift"; - sourceTree = ""; - }; - "OBJ_88" = { - isa = "PBXFileReference"; - path = "ClassTests.swift"; - sourceTree = ""; - }; - "OBJ_89" = { - isa = "PBXFileReference"; - path = "CompositeChoiceTests.swift"; - sourceTree = ""; - }; - "OBJ_9" = { - isa = "PBXFileReference"; - path = "Info.plist"; - sourceTree = ""; - }; - "OBJ_90" = { - isa = "PBXFileReference"; - path = "DecodingContainerTests.swift"; - sourceTree = ""; - }; - "OBJ_91" = { - isa = "PBXFileReference"; - path = "DynamicNodeDecodingTest.swift"; - sourceTree = ""; - }; - "OBJ_92" = { - isa = "PBXFileReference"; - path = "DynamicNodeEncodingTest.swift"; - sourceTree = ""; - }; - "OBJ_93" = { - isa = "PBXFileReference"; - path = "ErrorContextTest.swift"; - sourceTree = ""; - }; - "OBJ_94" = { - isa = "PBXFileReference"; - path = "KeyDecodingAndEncodingStrategyTests.swift"; - sourceTree = ""; - }; - "OBJ_95" = { - isa = "PBXGroup"; - children = ( - "OBJ_96", - "OBJ_97", - "OBJ_98", - "OBJ_99", - "OBJ_100", - "OBJ_101", - "OBJ_102", - "OBJ_103", - "OBJ_104", - "OBJ_105", - "OBJ_106", - "OBJ_107", - "OBJ_108", - "OBJ_109", - "OBJ_110", - "OBJ_111", - "OBJ_112" - ); - name = "Minimal"; - path = "Minimal"; - sourceTree = ""; - }; - "OBJ_96" = { - isa = "PBXFileReference"; - path = "BoolTests.swift"; - sourceTree = ""; - }; - "OBJ_97" = { - isa = "PBXFileReference"; - path = "BoxTreeTests.swift"; - sourceTree = ""; - }; - "OBJ_98" = { - isa = "PBXFileReference"; - path = "DataTests.swift"; - sourceTree = ""; - }; - "OBJ_99" = { - isa = "PBXFileReference"; - path = "DateTests.swift"; - sourceTree = ""; - }; - "XMLCoder::SwiftPMPackageDescription" = { - isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_194"; - buildPhases = ( - "OBJ_197" - ); - dependencies = ( - ); - name = "XMLCoderPackageDescription"; - productName = "XMLCoderPackageDescription"; - productType = "com.apple.product-type.framework"; - }; - "XMLCoder::XMLCoder" = { - isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_144"; - buildPhases = ( - "OBJ_147", - "OBJ_192" - ); - dependencies = ( - ); - name = "XMLCoder"; - productName = "XMLCoder"; - productReference = "XMLCoder::XMLCoder::Product"; - productType = "com.apple.product-type.framework"; - }; - "XMLCoder::XMLCoder::Product" = { - isa = "PBXFileReference"; - path = "XMLCoder.framework"; - sourceTree = "BUILT_PRODUCTS_DIR"; - }; - "XMLCoder::XMLCoderPackageTests::ProductTarget" = { - isa = "PBXAggregateTarget"; - buildConfigurationList = "OBJ_200"; - buildPhases = ( - ); - dependencies = ( - "OBJ_203" - ); - name = "XMLCoderPackageTests"; - productName = "XMLCoderPackageTests"; - }; - "XMLCoder::XMLCoderTests" = { - isa = "PBXNativeTarget"; - buildConfigurationList = "OBJ_205"; - buildPhases = ( - "OBJ_208", - "OBJ_274" - ); - dependencies = ( - "OBJ_276" - ); - name = "XMLCoderTests"; - productName = "XMLCoderTests"; - productReference = "XMLCoder::XMLCoderTests::Product"; - productType = "com.apple.product-type.bundle.unit-test"; - }; - "XMLCoder::XMLCoderTests::Product" = { - isa = "PBXFileReference"; - path = "XMLCoderTests.xctest"; - sourceTree = "BUILT_PRODUCTS_DIR"; - }; - }; - rootObject = "OBJ_1"; + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXAggregateTarget section */ + "XMLCoder::XMLCoderPackageTests::ProductTarget" /* XMLCoderPackageTests */ = { + isa = PBXAggregateTarget; + buildConfigurationList = OBJ_200 /* Build configuration list for PBXAggregateTarget "XMLCoderPackageTests" */; + buildPhases = ( + ); + dependencies = ( + OBJ_203 /* PBXTargetDependency */, + ); + name = XMLCoderPackageTests; + productName = XMLCoderPackageTests; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + OBJ_148 /* BoolBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* BoolBox.swift */; }; + OBJ_149 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* Box.swift */; }; + OBJ_150 /* ChoiceBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* ChoiceBox.swift */; }; + OBJ_151 /* DataBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_15 /* DataBox.swift */; }; + OBJ_152 /* DateBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* DateBox.swift */; }; + OBJ_153 /* DecimalBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* DecimalBox.swift */; }; + OBJ_154 /* FloatBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_18 /* FloatBox.swift */; }; + OBJ_155 /* IntBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* IntBox.swift */; }; + OBJ_156 /* KeyedBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_20 /* KeyedBox.swift */; }; + OBJ_157 /* NullBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_21 /* NullBox.swift */; }; + OBJ_158 /* SharedBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_22 /* SharedBox.swift */; }; + OBJ_159 /* SingleKeyedBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_23 /* SingleKeyedBox.swift */; }; + OBJ_160 /* StringBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_24 /* StringBox.swift */; }; + OBJ_161 /* UIntBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_25 /* UIntBox.swift */; }; + OBJ_162 /* URLBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_26 /* URLBox.swift */; }; + OBJ_163 /* UnkeyedBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_27 /* UnkeyedBox.swift */; }; + OBJ_164 /* ISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_28 /* ISO8601DateFormatter.swift */; }; + OBJ_165 /* KeyedStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_29 /* KeyedStorage.swift */; }; + OBJ_166 /* Metatypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_30 /* Metatypes.swift */; }; + OBJ_167 /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_31 /* String+Extensions.swift */; }; + OBJ_168 /* XMLChoiceCodingKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_32 /* XMLChoiceCodingKey.swift */; }; + OBJ_169 /* XMLCoderElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_33 /* XMLCoderElement.swift */; }; + OBJ_170 /* XMLHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_34 /* XMLHeader.swift */; }; + OBJ_171 /* XMLKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_35 /* XMLKey.swift */; }; + OBJ_172 /* XMLStackParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_36 /* XMLStackParser.swift */; }; + OBJ_173 /* DecodingErrorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_38 /* DecodingErrorExtension.swift */; }; + OBJ_174 /* DynamicNodeDecoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_39 /* DynamicNodeDecoding.swift */; }; + OBJ_175 /* SingleValueDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_40 /* SingleValueDecodingContainer.swift */; }; + OBJ_176 /* XMLChoiceDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_41 /* XMLChoiceDecodingContainer.swift */; }; + OBJ_177 /* XMLDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_42 /* XMLDecoder.swift */; }; + OBJ_178 /* XMLDecoderImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_43 /* XMLDecoderImplementation.swift */; }; + OBJ_179 /* XMLDecodingStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_44 /* XMLDecodingStorage.swift */; }; + OBJ_180 /* XMLKeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_45 /* XMLKeyedDecodingContainer.swift */; }; + OBJ_181 /* XMLUnkeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_46 /* XMLUnkeyedDecodingContainer.swift */; }; + OBJ_182 /* DynamicNodeEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_48 /* DynamicNodeEncoding.swift */; }; + OBJ_183 /* EncodingErrorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_49 /* EncodingErrorExtension.swift */; }; + OBJ_184 /* SingleValueEncodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_50 /* SingleValueEncodingContainer.swift */; }; + OBJ_185 /* XMLChoiceEncodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_51 /* XMLChoiceEncodingContainer.swift */; }; + OBJ_186 /* XMLEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_52 /* XMLEncoder.swift */; }; + OBJ_187 /* XMLEncoderImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_53 /* XMLEncoderImplementation.swift */; }; + OBJ_188 /* XMLEncodingStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_54 /* XMLEncodingStorage.swift */; }; + OBJ_189 /* XMLKeyedEncodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_55 /* XMLKeyedEncodingContainer.swift */; }; + OBJ_190 /* XMLReferencingEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_56 /* XMLReferencingEncoder.swift */; }; + OBJ_191 /* XMLUnkeyedEncodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_57 /* XMLUnkeyedEncodingContainer.swift */; }; + OBJ_198 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; + OBJ_209 /* AttributedEnumIntrinsicTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_60 /* AttributedEnumIntrinsicTest.swift */; }; + OBJ_210 /* AttributedIntrinsicTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_61 /* AttributedIntrinsicTest.swift */; }; + OBJ_211 /* String+ExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_63 /* String+ExtensionsTests.swift */; }; + OBJ_212 /* XMLElementTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_64 /* XMLElementTests.swift */; }; + OBJ_213 /* XMLHeaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_65 /* XMLHeaderTests.swift */; }; + OBJ_214 /* XMLKeyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_66 /* XMLKeyTests.swift */; }; + OBJ_215 /* XMLStackParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_67 /* XMLStackParserTests.swift */; }; + OBJ_216 /* BenchmarkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_68 /* BenchmarkTests.swift */; }; + OBJ_217 /* BooksTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_69 /* BooksTest.swift */; }; + OBJ_218 /* BorderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_70 /* BorderTest.swift */; }; + OBJ_219 /* BoolBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_72 /* BoolBoxTests.swift */; }; + OBJ_220 /* DataBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_73 /* DataBoxTests.swift */; }; + OBJ_221 /* DateBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_74 /* DateBoxTests.swift */; }; + OBJ_222 /* DecimalBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_75 /* DecimalBoxTests.swift */; }; + OBJ_223 /* FloatBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_76 /* FloatBoxTests.swift */; }; + OBJ_224 /* IntBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_77 /* IntBoxTests.swift */; }; + OBJ_225 /* KeyedBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_78 /* KeyedBoxTests.swift */; }; + OBJ_226 /* NullBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_79 /* NullBoxTests.swift */; }; + OBJ_227 /* SharedBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_80 /* SharedBoxTests.swift */; }; + OBJ_228 /* StringBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_81 /* StringBoxTests.swift */; }; + OBJ_229 /* UIntBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_82 /* UIntBoxTests.swift */; }; + OBJ_230 /* URLBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_83 /* URLBoxTests.swift */; }; + OBJ_231 /* UnkeyedBoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_84 /* UnkeyedBoxTests.swift */; }; + OBJ_232 /* BreakfastTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_85 /* BreakfastTest.swift */; }; + OBJ_233 /* CDCatalog.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_86 /* CDCatalog.swift */; }; + OBJ_234 /* CDTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_87 /* CDTest.swift */; }; + OBJ_235 /* ClassTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_88 /* ClassTests.swift */; }; + OBJ_236 /* CompositeChoiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_89 /* CompositeChoiceTests.swift */; }; + OBJ_237 /* DecodingContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_90 /* DecodingContainerTests.swift */; }; + OBJ_238 /* DynamicNodeDecodingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_91 /* DynamicNodeDecodingTest.swift */; }; + OBJ_239 /* DynamicNodeEncodingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_92 /* DynamicNodeEncodingTest.swift */; }; + OBJ_240 /* ErrorContextTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_93 /* ErrorContextTest.swift */; }; + OBJ_241 /* KeyDecodingAndEncodingStrategyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_94 /* KeyDecodingAndEncodingStrategyTests.swift */; }; + OBJ_242 /* BoolTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_96 /* BoolTests.swift */; }; + OBJ_243 /* BoxTreeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_97 /* BoxTreeTests.swift */; }; + OBJ_244 /* DataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_98 /* DataTests.swift */; }; + OBJ_245 /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_99 /* DateTests.swift */; }; + OBJ_246 /* DecimalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_100 /* DecimalTests.swift */; }; + OBJ_247 /* EmptyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_101 /* EmptyTests.swift */; }; + OBJ_248 /* FloatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_102 /* FloatTests.swift */; }; + OBJ_249 /* IntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_103 /* IntTests.swift */; }; + OBJ_250 /* KeyedIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_104 /* KeyedIntTests.swift */; }; + OBJ_251 /* KeyedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_105 /* KeyedTests.swift */; }; + OBJ_252 /* NullTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_106 /* NullTests.swift */; }; + OBJ_253 /* OptionalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_107 /* OptionalTests.swift */; }; + OBJ_254 /* StringTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_108 /* StringTests.swift */; }; + OBJ_255 /* UIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_109 /* UIntTests.swift */; }; + OBJ_256 /* URLTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_110 /* URLTests.swift */; }; + OBJ_257 /* UnkeyedIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_111 /* UnkeyedIntTests.swift */; }; + OBJ_258 /* UnkeyedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_112 /* UnkeyedTests.swift */; }; + OBJ_259 /* MixedContainerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_113 /* MixedContainerTest.swift */; }; + OBJ_260 /* NamespaceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_114 /* NamespaceTest.swift */; }; + OBJ_261 /* NestedAttributeChoiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_115 /* NestedAttributeChoiceTests.swift */; }; + OBJ_262 /* NestedChoiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_116 /* NestedChoiceTests.swift */; }; + OBJ_263 /* NestingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_117 /* NestingTests.swift */; }; + OBJ_264 /* NodeEncodingStrategyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_118 /* NodeEncodingStrategyTests.swift */; }; + OBJ_265 /* NoteTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_119 /* NoteTest.swift */; }; + OBJ_266 /* PlantCatalog.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_120 /* PlantCatalog.swift */; }; + OBJ_267 /* PlantTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_121 /* PlantTest.swift */; }; + OBJ_268 /* RJISample.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_122 /* RJISample.swift */; }; + OBJ_269 /* RJITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_123 /* RJITest.swift */; }; + OBJ_270 /* RelationshipsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_124 /* RelationshipsTest.swift */; }; + OBJ_271 /* SimpleChoiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_125 /* SimpleChoiceTests.swift */; }; + OBJ_272 /* SingleChildTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_126 /* SingleChildTests.swift */; }; + OBJ_273 /* SpacePreserveTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_127 /* SpacePreserveTest.swift */; }; + OBJ_275 /* XMLCoder.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 143B746122ED4A67005D7765 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = "XMLCoder::XMLCoder"; + remoteInfo = XMLCoder; + }; + 143B746222ED4A67005D7765 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = "XMLCoder::XMLCoderTests"; + remoteInfo = XMLCoderTests; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + OBJ_100 /* DecimalTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecimalTests.swift; sourceTree = ""; }; + OBJ_101 /* EmptyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyTests.swift; sourceTree = ""; }; + OBJ_102 /* FloatTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatTests.swift; sourceTree = ""; }; + OBJ_103 /* IntTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntTests.swift; sourceTree = ""; }; + OBJ_104 /* KeyedIntTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyedIntTests.swift; sourceTree = ""; }; + OBJ_105 /* KeyedTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyedTests.swift; sourceTree = ""; }; + OBJ_106 /* NullTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NullTests.swift; sourceTree = ""; }; + OBJ_107 /* OptionalTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptionalTests.swift; sourceTree = ""; }; + OBJ_108 /* StringTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringTests.swift; sourceTree = ""; }; + OBJ_109 /* UIntTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIntTests.swift; sourceTree = ""; }; + OBJ_110 /* URLTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLTests.swift; sourceTree = ""; }; + OBJ_111 /* UnkeyedIntTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnkeyedIntTests.swift; sourceTree = ""; }; + OBJ_112 /* UnkeyedTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnkeyedTests.swift; sourceTree = ""; }; + OBJ_113 /* MixedContainerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedContainerTest.swift; sourceTree = ""; }; + OBJ_114 /* NamespaceTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NamespaceTest.swift; sourceTree = ""; }; + OBJ_115 /* NestedAttributeChoiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NestedAttributeChoiceTests.swift; sourceTree = ""; }; + OBJ_116 /* NestedChoiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NestedChoiceTests.swift; sourceTree = ""; }; + OBJ_117 /* NestingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NestingTests.swift; sourceTree = ""; }; + OBJ_118 /* NodeEncodingStrategyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeEncodingStrategyTests.swift; sourceTree = ""; }; + OBJ_119 /* NoteTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteTest.swift; sourceTree = ""; }; + OBJ_12 /* BoolBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoolBox.swift; sourceTree = ""; }; + OBJ_120 /* PlantCatalog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlantCatalog.swift; sourceTree = ""; }; + OBJ_121 /* PlantTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlantTest.swift; sourceTree = ""; }; + OBJ_122 /* RJISample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RJISample.swift; sourceTree = ""; }; + OBJ_123 /* RJITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RJITest.swift; sourceTree = ""; }; + OBJ_124 /* RelationshipsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelationshipsTest.swift; sourceTree = ""; }; + OBJ_125 /* SimpleChoiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleChoiceTests.swift; sourceTree = ""; }; + OBJ_126 /* SingleChildTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleChildTests.swift; sourceTree = ""; }; + OBJ_127 /* SpacePreserveTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpacePreserveTest.swift; sourceTree = ""; }; + OBJ_13 /* Box.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Box.swift; sourceTree = ""; }; + OBJ_131 /* CODE_OF_CONDUCT.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CODE_OF_CONDUCT.md; sourceTree = ""; }; + OBJ_132 /* codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = codecov.yml; sourceTree = ""; }; + OBJ_133 /* XMLCoder.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = XMLCoder.podspec; sourceTree = ""; }; + OBJ_134 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + OBJ_135 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; + OBJ_136 /* test_swiftpm.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = test_swiftpm.sh; sourceTree = ""; }; + OBJ_137 /* test_xcodebuild.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = test_xcodebuild.sh; sourceTree = ""; }; + OBJ_138 /* lint.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = lint.sh; sourceTree = ""; }; + OBJ_139 /* azure-pipelines.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = "azure-pipelines.yml"; sourceTree = ""; }; + OBJ_14 /* ChoiceBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChoiceBox.swift; sourceTree = ""; }; + OBJ_140 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + OBJ_141 /* docs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = docs.sh; sourceTree = ""; }; + OBJ_142 /* pod.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = pod.sh; sourceTree = ""; }; + OBJ_15 /* DataBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBox.swift; sourceTree = ""; }; + OBJ_16 /* DateBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateBox.swift; sourceTree = ""; }; + OBJ_17 /* DecimalBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecimalBox.swift; sourceTree = ""; }; + OBJ_18 /* FloatBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatBox.swift; sourceTree = ""; }; + OBJ_19 /* IntBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntBox.swift; sourceTree = ""; }; + OBJ_20 /* KeyedBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyedBox.swift; sourceTree = ""; }; + OBJ_21 /* NullBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NullBox.swift; sourceTree = ""; }; + OBJ_22 /* SharedBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedBox.swift; sourceTree = ""; }; + OBJ_23 /* SingleKeyedBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleKeyedBox.swift; sourceTree = ""; }; + OBJ_24 /* StringBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBox.swift; sourceTree = ""; }; + OBJ_25 /* UIntBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIntBox.swift; sourceTree = ""; }; + OBJ_26 /* URLBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLBox.swift; sourceTree = ""; }; + OBJ_27 /* UnkeyedBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnkeyedBox.swift; sourceTree = ""; }; + OBJ_28 /* ISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ISO8601DateFormatter.swift; sourceTree = ""; }; + OBJ_29 /* KeyedStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyedStorage.swift; sourceTree = ""; }; + OBJ_30 /* Metatypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Metatypes.swift; sourceTree = ""; }; + OBJ_31 /* String+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = ""; }; + OBJ_32 /* XMLChoiceCodingKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLChoiceCodingKey.swift; sourceTree = ""; }; + OBJ_33 /* XMLCoderElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLCoderElement.swift; sourceTree = ""; }; + OBJ_34 /* XMLHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLHeader.swift; sourceTree = ""; }; + OBJ_35 /* XMLKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLKey.swift; sourceTree = ""; }; + OBJ_36 /* XMLStackParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLStackParser.swift; sourceTree = ""; }; + OBJ_38 /* DecodingErrorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecodingErrorExtension.swift; sourceTree = ""; }; + OBJ_39 /* DynamicNodeDecoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicNodeDecoding.swift; sourceTree = ""; }; + OBJ_40 /* SingleValueDecodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleValueDecodingContainer.swift; sourceTree = ""; }; + OBJ_41 /* XMLChoiceDecodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLChoiceDecodingContainer.swift; sourceTree = ""; }; + OBJ_42 /* XMLDecoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLDecoder.swift; sourceTree = ""; }; + OBJ_43 /* XMLDecoderImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLDecoderImplementation.swift; sourceTree = ""; }; + OBJ_44 /* XMLDecodingStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLDecodingStorage.swift; sourceTree = ""; }; + OBJ_45 /* XMLKeyedDecodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLKeyedDecodingContainer.swift; sourceTree = ""; }; + OBJ_46 /* XMLUnkeyedDecodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLUnkeyedDecodingContainer.swift; sourceTree = ""; }; + OBJ_48 /* DynamicNodeEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicNodeEncoding.swift; sourceTree = ""; }; + OBJ_49 /* EncodingErrorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncodingErrorExtension.swift; sourceTree = ""; }; + OBJ_50 /* SingleValueEncodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleValueEncodingContainer.swift; sourceTree = ""; }; + OBJ_51 /* XMLChoiceEncodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLChoiceEncodingContainer.swift; sourceTree = ""; }; + OBJ_52 /* XMLEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLEncoder.swift; sourceTree = ""; }; + OBJ_53 /* XMLEncoderImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLEncoderImplementation.swift; sourceTree = ""; }; + OBJ_54 /* XMLEncodingStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLEncodingStorage.swift; sourceTree = ""; }; + OBJ_55 /* XMLKeyedEncodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLKeyedEncodingContainer.swift; sourceTree = ""; }; + OBJ_56 /* XMLReferencingEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLReferencingEncoder.swift; sourceTree = ""; }; + OBJ_57 /* XMLUnkeyedEncodingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLUnkeyedEncodingContainer.swift; sourceTree = ""; }; + OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + OBJ_60 /* AttributedEnumIntrinsicTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributedEnumIntrinsicTest.swift; sourceTree = ""; }; + OBJ_61 /* AttributedIntrinsicTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributedIntrinsicTest.swift; sourceTree = ""; }; + OBJ_63 /* String+ExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+ExtensionsTests.swift"; sourceTree = ""; }; + OBJ_64 /* XMLElementTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLElementTests.swift; sourceTree = ""; }; + OBJ_65 /* XMLHeaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLHeaderTests.swift; sourceTree = ""; }; + OBJ_66 /* XMLKeyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLKeyTests.swift; sourceTree = ""; }; + OBJ_67 /* XMLStackParserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLStackParserTests.swift; sourceTree = ""; }; + OBJ_68 /* BenchmarkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BenchmarkTests.swift; sourceTree = ""; }; + OBJ_69 /* BooksTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BooksTest.swift; sourceTree = ""; }; + OBJ_70 /* BorderTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderTest.swift; sourceTree = ""; }; + OBJ_72 /* BoolBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoolBoxTests.swift; sourceTree = ""; }; + OBJ_73 /* DataBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBoxTests.swift; sourceTree = ""; }; + OBJ_74 /* DateBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateBoxTests.swift; sourceTree = ""; }; + OBJ_75 /* DecimalBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecimalBoxTests.swift; sourceTree = ""; }; + OBJ_76 /* FloatBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatBoxTests.swift; sourceTree = ""; }; + OBJ_77 /* IntBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntBoxTests.swift; sourceTree = ""; }; + OBJ_78 /* KeyedBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyedBoxTests.swift; sourceTree = ""; }; + OBJ_79 /* NullBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NullBoxTests.swift; sourceTree = ""; }; + OBJ_80 /* SharedBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedBoxTests.swift; sourceTree = ""; }; + OBJ_81 /* StringBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBoxTests.swift; sourceTree = ""; }; + OBJ_82 /* UIntBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIntBoxTests.swift; sourceTree = ""; }; + OBJ_83 /* URLBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLBoxTests.swift; sourceTree = ""; }; + OBJ_84 /* UnkeyedBoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnkeyedBoxTests.swift; sourceTree = ""; }; + OBJ_85 /* BreakfastTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreakfastTest.swift; sourceTree = ""; }; + OBJ_86 /* CDCatalog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDCatalog.swift; sourceTree = ""; }; + OBJ_87 /* CDTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDTest.swift; sourceTree = ""; }; + OBJ_88 /* ClassTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassTests.swift; sourceTree = ""; }; + OBJ_89 /* CompositeChoiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompositeChoiceTests.swift; sourceTree = ""; }; + OBJ_9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + OBJ_90 /* DecodingContainerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecodingContainerTests.swift; sourceTree = ""; }; + OBJ_91 /* DynamicNodeDecodingTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicNodeDecodingTest.swift; sourceTree = ""; }; + OBJ_92 /* DynamicNodeEncodingTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicNodeEncodingTest.swift; sourceTree = ""; }; + OBJ_93 /* ErrorContextTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorContextTest.swift; sourceTree = ""; }; + OBJ_94 /* KeyDecodingAndEncodingStrategyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyDecodingAndEncodingStrategyTests.swift; sourceTree = ""; }; + OBJ_96 /* BoolTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoolTests.swift; sourceTree = ""; }; + OBJ_97 /* BoxTreeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoxTreeTests.swift; sourceTree = ""; }; + OBJ_98 /* DataTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataTests.swift; sourceTree = ""; }; + OBJ_99 /* DateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = ""; }; + "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = XMLCoder.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + "XMLCoder::XMLCoderTests::Product" /* XMLCoderTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = XMLCoderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + OBJ_192 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_274 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + OBJ_275 /* XMLCoder.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + OBJ_10 /* Auxiliaries */ = { + isa = PBXGroup; + children = ( + OBJ_11 /* Box */, + OBJ_28 /* ISO8601DateFormatter.swift */, + OBJ_29 /* KeyedStorage.swift */, + OBJ_30 /* Metatypes.swift */, + OBJ_31 /* String+Extensions.swift */, + OBJ_32 /* XMLChoiceCodingKey.swift */, + OBJ_33 /* XMLCoderElement.swift */, + OBJ_34 /* XMLHeader.swift */, + OBJ_35 /* XMLKey.swift */, + OBJ_36 /* XMLStackParser.swift */, + ); + path = Auxiliaries; + sourceTree = ""; + }; + OBJ_11 /* Box */ = { + isa = PBXGroup; + children = ( + OBJ_12 /* BoolBox.swift */, + OBJ_13 /* Box.swift */, + OBJ_14 /* ChoiceBox.swift */, + OBJ_15 /* DataBox.swift */, + OBJ_16 /* DateBox.swift */, + OBJ_17 /* DecimalBox.swift */, + OBJ_18 /* FloatBox.swift */, + OBJ_19 /* IntBox.swift */, + OBJ_20 /* KeyedBox.swift */, + OBJ_21 /* NullBox.swift */, + OBJ_22 /* SharedBox.swift */, + OBJ_23 /* SingleKeyedBox.swift */, + OBJ_24 /* StringBox.swift */, + OBJ_25 /* UIntBox.swift */, + OBJ_26 /* URLBox.swift */, + OBJ_27 /* UnkeyedBox.swift */, + ); + path = Box; + sourceTree = ""; + }; + OBJ_128 /* Products */ = { + isa = PBXGroup; + children = ( + "XMLCoder::XMLCoderTests::Product" /* XMLCoderTests.xctest */, + "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */, + ); + name = Products; + sourceTree = BUILT_PRODUCTS_DIR; + }; + OBJ_37 /* Decoder */ = { + isa = PBXGroup; + children = ( + OBJ_38 /* DecodingErrorExtension.swift */, + OBJ_39 /* DynamicNodeDecoding.swift */, + OBJ_40 /* SingleValueDecodingContainer.swift */, + OBJ_41 /* XMLChoiceDecodingContainer.swift */, + OBJ_42 /* XMLDecoder.swift */, + OBJ_43 /* XMLDecoderImplementation.swift */, + OBJ_44 /* XMLDecodingStorage.swift */, + OBJ_45 /* XMLKeyedDecodingContainer.swift */, + OBJ_46 /* XMLUnkeyedDecodingContainer.swift */, + ); + path = Decoder; + sourceTree = ""; + }; + OBJ_47 /* Encoder */ = { + isa = PBXGroup; + children = ( + OBJ_48 /* DynamicNodeEncoding.swift */, + OBJ_49 /* EncodingErrorExtension.swift */, + OBJ_50 /* SingleValueEncodingContainer.swift */, + OBJ_51 /* XMLChoiceEncodingContainer.swift */, + OBJ_52 /* XMLEncoder.swift */, + OBJ_53 /* XMLEncoderImplementation.swift */, + OBJ_54 /* XMLEncodingStorage.swift */, + OBJ_55 /* XMLKeyedEncodingContainer.swift */, + OBJ_56 /* XMLReferencingEncoder.swift */, + OBJ_57 /* XMLUnkeyedEncodingContainer.swift */, + ); + path = Encoder; + sourceTree = ""; + }; + OBJ_5 /* */ = { + isa = PBXGroup; + children = ( + OBJ_6 /* Package.swift */, + OBJ_7 /* Sources */, + OBJ_58 /* Tests */, + OBJ_128 /* Products */, + OBJ_131 /* CODE_OF_CONDUCT.md */, + OBJ_132 /* codecov.yml */, + OBJ_133 /* XMLCoder.podspec */, + OBJ_134 /* LICENSE */, + OBJ_135 /* CHANGELOG.md */, + OBJ_136 /* test_swiftpm.sh */, + OBJ_137 /* test_xcodebuild.sh */, + OBJ_138 /* lint.sh */, + OBJ_139 /* azure-pipelines.yml */, + OBJ_140 /* README.md */, + OBJ_141 /* docs.sh */, + OBJ_142 /* pod.sh */, + ); + name = ""; + sourceTree = ""; + }; + OBJ_58 /* Tests */ = { + isa = PBXGroup; + children = ( + OBJ_59 /* XMLCoderTests */, + ); + name = Tests; + sourceTree = SOURCE_ROOT; + }; + OBJ_59 /* XMLCoderTests */ = { + isa = PBXGroup; + children = ( + OBJ_60 /* AttributedEnumIntrinsicTest.swift */, + OBJ_61 /* AttributedIntrinsicTest.swift */, + OBJ_62 /* Auxiliary */, + OBJ_68 /* BenchmarkTests.swift */, + OBJ_69 /* BooksTest.swift */, + OBJ_70 /* BorderTest.swift */, + OBJ_71 /* Box */, + OBJ_85 /* BreakfastTest.swift */, + OBJ_86 /* CDCatalog.swift */, + OBJ_87 /* CDTest.swift */, + OBJ_88 /* ClassTests.swift */, + OBJ_89 /* CompositeChoiceTests.swift */, + OBJ_90 /* DecodingContainerTests.swift */, + OBJ_91 /* DynamicNodeDecodingTest.swift */, + OBJ_92 /* DynamicNodeEncodingTest.swift */, + OBJ_93 /* ErrorContextTest.swift */, + OBJ_94 /* KeyDecodingAndEncodingStrategyTests.swift */, + OBJ_95 /* Minimal */, + OBJ_113 /* MixedContainerTest.swift */, + OBJ_114 /* NamespaceTest.swift */, + OBJ_115 /* NestedAttributeChoiceTests.swift */, + OBJ_116 /* NestedChoiceTests.swift */, + OBJ_117 /* NestingTests.swift */, + OBJ_118 /* NodeEncodingStrategyTests.swift */, + OBJ_119 /* NoteTest.swift */, + OBJ_120 /* PlantCatalog.swift */, + OBJ_121 /* PlantTest.swift */, + OBJ_122 /* RJISample.swift */, + OBJ_123 /* RJITest.swift */, + OBJ_124 /* RelationshipsTest.swift */, + OBJ_125 /* SimpleChoiceTests.swift */, + OBJ_126 /* SingleChildTests.swift */, + OBJ_127 /* SpacePreserveTest.swift */, + ); + name = XMLCoderTests; + path = Tests/XMLCoderTests; + sourceTree = SOURCE_ROOT; + }; + OBJ_62 /* Auxiliary */ = { + isa = PBXGroup; + children = ( + OBJ_63 /* String+ExtensionsTests.swift */, + OBJ_64 /* XMLElementTests.swift */, + OBJ_65 /* XMLHeaderTests.swift */, + OBJ_66 /* XMLKeyTests.swift */, + OBJ_67 /* XMLStackParserTests.swift */, + ); + path = Auxiliary; + sourceTree = ""; + }; + OBJ_7 /* Sources */ = { + isa = PBXGroup; + children = ( + OBJ_8 /* XMLCoder */, + ); + name = Sources; + sourceTree = SOURCE_ROOT; + }; + OBJ_71 /* Box */ = { + isa = PBXGroup; + children = ( + OBJ_72 /* BoolBoxTests.swift */, + OBJ_73 /* DataBoxTests.swift */, + OBJ_74 /* DateBoxTests.swift */, + OBJ_75 /* DecimalBoxTests.swift */, + OBJ_76 /* FloatBoxTests.swift */, + OBJ_77 /* IntBoxTests.swift */, + OBJ_78 /* KeyedBoxTests.swift */, + OBJ_79 /* NullBoxTests.swift */, + OBJ_80 /* SharedBoxTests.swift */, + OBJ_81 /* StringBoxTests.swift */, + OBJ_82 /* UIntBoxTests.swift */, + OBJ_83 /* URLBoxTests.swift */, + OBJ_84 /* UnkeyedBoxTests.swift */, + ); + path = Box; + sourceTree = ""; + }; + OBJ_8 /* XMLCoder */ = { + isa = PBXGroup; + children = ( + OBJ_9 /* Info.plist */, + OBJ_10 /* Auxiliaries */, + OBJ_37 /* Decoder */, + OBJ_47 /* Encoder */, + ); + name = XMLCoder; + path = Sources/XMLCoder; + sourceTree = SOURCE_ROOT; + }; + OBJ_95 /* Minimal */ = { + isa = PBXGroup; + children = ( + OBJ_96 /* BoolTests.swift */, + OBJ_97 /* BoxTreeTests.swift */, + OBJ_98 /* DataTests.swift */, + OBJ_99 /* DateTests.swift */, + OBJ_100 /* DecimalTests.swift */, + OBJ_101 /* EmptyTests.swift */, + OBJ_102 /* FloatTests.swift */, + OBJ_103 /* IntTests.swift */, + OBJ_104 /* KeyedIntTests.swift */, + OBJ_105 /* KeyedTests.swift */, + OBJ_106 /* NullTests.swift */, + OBJ_107 /* OptionalTests.swift */, + OBJ_108 /* StringTests.swift */, + OBJ_109 /* UIntTests.swift */, + OBJ_110 /* URLTests.swift */, + OBJ_111 /* UnkeyedIntTests.swift */, + OBJ_112 /* UnkeyedTests.swift */, + ); + path = Minimal; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + "XMLCoder::SwiftPMPackageDescription" /* XMLCoderPackageDescription */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_194 /* Build configuration list for PBXNativeTarget "XMLCoderPackageDescription" */; + buildPhases = ( + OBJ_197 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = XMLCoderPackageDescription; + productName = XMLCoderPackageDescription; + productType = "com.apple.product-type.framework"; + }; + "XMLCoder::XMLCoder" /* XMLCoder */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_144 /* Build configuration list for PBXNativeTarget "XMLCoder" */; + buildPhases = ( + OBJ_147 /* Sources */, + OBJ_192 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = XMLCoder; + productName = XMLCoder; + productReference = "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */; + productType = "com.apple.product-type.framework"; + }; + "XMLCoder::XMLCoderTests" /* XMLCoderTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_205 /* Build configuration list for PBXNativeTarget "XMLCoderTests" */; + buildPhases = ( + OBJ_208 /* Sources */, + OBJ_274 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + OBJ_276 /* PBXTargetDependency */, + ); + name = XMLCoderTests; + productName = XMLCoderTests; + productReference = "XMLCoder::XMLCoderTests::Product" /* XMLCoderTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + OBJ_1 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftMigration = 9999; + LastUpgradeCheck = 9999; + }; + buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "XMLCoder" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + ); + mainGroup = OBJ_5 /* */; + productRefGroup = OBJ_128 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + "XMLCoder::XMLCoder" /* XMLCoder */, + "XMLCoder::SwiftPMPackageDescription" /* XMLCoderPackageDescription */, + "XMLCoder::XMLCoderPackageTests::ProductTarget" /* XMLCoderPackageTests */, + "XMLCoder::XMLCoderTests" /* XMLCoderTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + OBJ_147 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_148 /* BoolBox.swift in Sources */, + OBJ_149 /* Box.swift in Sources */, + OBJ_150 /* ChoiceBox.swift in Sources */, + OBJ_151 /* DataBox.swift in Sources */, + OBJ_152 /* DateBox.swift in Sources */, + OBJ_153 /* DecimalBox.swift in Sources */, + OBJ_154 /* FloatBox.swift in Sources */, + OBJ_155 /* IntBox.swift in Sources */, + OBJ_156 /* KeyedBox.swift in Sources */, + OBJ_157 /* NullBox.swift in Sources */, + OBJ_158 /* SharedBox.swift in Sources */, + OBJ_159 /* SingleKeyedBox.swift in Sources */, + OBJ_160 /* StringBox.swift in Sources */, + OBJ_161 /* UIntBox.swift in Sources */, + OBJ_162 /* URLBox.swift in Sources */, + OBJ_163 /* UnkeyedBox.swift in Sources */, + OBJ_164 /* ISO8601DateFormatter.swift in Sources */, + OBJ_165 /* KeyedStorage.swift in Sources */, + OBJ_166 /* Metatypes.swift in Sources */, + OBJ_167 /* String+Extensions.swift in Sources */, + OBJ_168 /* XMLChoiceCodingKey.swift in Sources */, + OBJ_169 /* XMLCoderElement.swift in Sources */, + OBJ_170 /* XMLHeader.swift in Sources */, + OBJ_171 /* XMLKey.swift in Sources */, + OBJ_172 /* XMLStackParser.swift in Sources */, + OBJ_173 /* DecodingErrorExtension.swift in Sources */, + OBJ_174 /* DynamicNodeDecoding.swift in Sources */, + OBJ_175 /* SingleValueDecodingContainer.swift in Sources */, + OBJ_176 /* XMLChoiceDecodingContainer.swift in Sources */, + OBJ_177 /* XMLDecoder.swift in Sources */, + OBJ_178 /* XMLDecoderImplementation.swift in Sources */, + OBJ_179 /* XMLDecodingStorage.swift in Sources */, + OBJ_180 /* XMLKeyedDecodingContainer.swift in Sources */, + OBJ_181 /* XMLUnkeyedDecodingContainer.swift in Sources */, + OBJ_182 /* DynamicNodeEncoding.swift in Sources */, + OBJ_183 /* EncodingErrorExtension.swift in Sources */, + OBJ_184 /* SingleValueEncodingContainer.swift in Sources */, + OBJ_185 /* XMLChoiceEncodingContainer.swift in Sources */, + OBJ_186 /* XMLEncoder.swift in Sources */, + OBJ_187 /* XMLEncoderImplementation.swift in Sources */, + OBJ_188 /* XMLEncodingStorage.swift in Sources */, + OBJ_189 /* XMLKeyedEncodingContainer.swift in Sources */, + OBJ_190 /* XMLReferencingEncoder.swift in Sources */, + OBJ_191 /* XMLUnkeyedEncodingContainer.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_197 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_198 /* Package.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_208 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_209 /* AttributedEnumIntrinsicTest.swift in Sources */, + OBJ_210 /* AttributedIntrinsicTest.swift in Sources */, + OBJ_211 /* String+ExtensionsTests.swift in Sources */, + OBJ_212 /* XMLElementTests.swift in Sources */, + OBJ_213 /* XMLHeaderTests.swift in Sources */, + OBJ_214 /* XMLKeyTests.swift in Sources */, + OBJ_215 /* XMLStackParserTests.swift in Sources */, + OBJ_216 /* BenchmarkTests.swift in Sources */, + OBJ_217 /* BooksTest.swift in Sources */, + OBJ_218 /* BorderTest.swift in Sources */, + OBJ_219 /* BoolBoxTests.swift in Sources */, + OBJ_220 /* DataBoxTests.swift in Sources */, + OBJ_221 /* DateBoxTests.swift in Sources */, + OBJ_222 /* DecimalBoxTests.swift in Sources */, + OBJ_223 /* FloatBoxTests.swift in Sources */, + OBJ_224 /* IntBoxTests.swift in Sources */, + OBJ_225 /* KeyedBoxTests.swift in Sources */, + OBJ_226 /* NullBoxTests.swift in Sources */, + OBJ_227 /* SharedBoxTests.swift in Sources */, + OBJ_228 /* StringBoxTests.swift in Sources */, + OBJ_229 /* UIntBoxTests.swift in Sources */, + OBJ_230 /* URLBoxTests.swift in Sources */, + OBJ_231 /* UnkeyedBoxTests.swift in Sources */, + OBJ_232 /* BreakfastTest.swift in Sources */, + OBJ_233 /* CDCatalog.swift in Sources */, + OBJ_234 /* CDTest.swift in Sources */, + OBJ_235 /* ClassTests.swift in Sources */, + OBJ_236 /* CompositeChoiceTests.swift in Sources */, + OBJ_237 /* DecodingContainerTests.swift in Sources */, + OBJ_238 /* DynamicNodeDecodingTest.swift in Sources */, + OBJ_239 /* DynamicNodeEncodingTest.swift in Sources */, + OBJ_240 /* ErrorContextTest.swift in Sources */, + OBJ_241 /* KeyDecodingAndEncodingStrategyTests.swift in Sources */, + OBJ_242 /* BoolTests.swift in Sources */, + OBJ_243 /* BoxTreeTests.swift in Sources */, + OBJ_244 /* DataTests.swift in Sources */, + OBJ_245 /* DateTests.swift in Sources */, + OBJ_246 /* DecimalTests.swift in Sources */, + OBJ_247 /* EmptyTests.swift in Sources */, + OBJ_248 /* FloatTests.swift in Sources */, + OBJ_249 /* IntTests.swift in Sources */, + OBJ_250 /* KeyedIntTests.swift in Sources */, + OBJ_251 /* KeyedTests.swift in Sources */, + OBJ_252 /* NullTests.swift in Sources */, + OBJ_253 /* OptionalTests.swift in Sources */, + OBJ_254 /* StringTests.swift in Sources */, + OBJ_255 /* UIntTests.swift in Sources */, + OBJ_256 /* URLTests.swift in Sources */, + OBJ_257 /* UnkeyedIntTests.swift in Sources */, + OBJ_258 /* UnkeyedTests.swift in Sources */, + OBJ_259 /* MixedContainerTest.swift in Sources */, + OBJ_260 /* NamespaceTest.swift in Sources */, + OBJ_261 /* NestedAttributeChoiceTests.swift in Sources */, + OBJ_262 /* NestedChoiceTests.swift in Sources */, + OBJ_263 /* NestingTests.swift in Sources */, + OBJ_264 /* NodeEncodingStrategyTests.swift in Sources */, + OBJ_265 /* NoteTest.swift in Sources */, + OBJ_266 /* PlantCatalog.swift in Sources */, + OBJ_267 /* PlantTest.swift in Sources */, + OBJ_268 /* RJISample.swift in Sources */, + OBJ_269 /* RJITest.swift in Sources */, + OBJ_270 /* RelationshipsTest.swift in Sources */, + OBJ_271 /* SimpleChoiceTests.swift in Sources */, + OBJ_272 /* SingleChildTests.swift in Sources */, + OBJ_273 /* SpacePreserveTest.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + OBJ_203 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = "XMLCoder::XMLCoderTests" /* XMLCoderTests */; + targetProxy = 143B746222ED4A67005D7765 /* PBXContainerItemProxy */; + }; + OBJ_276 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = "XMLCoder::XMLCoder" /* XMLCoder */; + targetProxy = 143B746122ED4A67005D7765 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + OBJ_145 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = XMLCoder.xcodeproj/XMLCoder_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = XMLCoder; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 4.2; + TARGET_NAME = XMLCoder; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + OBJ_146 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = XMLCoder.xcodeproj/XMLCoder_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = XMLCoder; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 4.2; + TARGET_NAME = XMLCoder; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; + OBJ_195 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD = /usr/bin/true; + OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + OBJ_196 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD = /usr/bin/true; + OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + OBJ_201 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + OBJ_202 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; + OBJ_206 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = XMLCoder.xcodeproj/XMLCoderTests_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 5.0; + TARGET_NAME = XMLCoderTests; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + OBJ_207 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = XMLCoder.xcodeproj/XMLCoderTests_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 5.0; + TARGET_NAME = XMLCoderTests; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; + OBJ_3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + "DEBUG=1", + ); + MACOSX_DEPLOYMENT_TARGET = 10.10; + ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE DEBUG"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + USE_HEADERMAP = NO; + }; + name = Debug; + }; + OBJ_4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + ); + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + USE_HEADERMAP = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + OBJ_144 /* Build configuration list for PBXNativeTarget "XMLCoder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_145 /* Debug */, + OBJ_146 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_194 /* Build configuration list for PBXNativeTarget "XMLCoderPackageDescription" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_195 /* Debug */, + OBJ_196 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_2 /* Build configuration list for PBXProject "XMLCoder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_3 /* Debug */, + OBJ_4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_200 /* Build configuration list for PBXAggregateTarget "XMLCoderPackageTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_201 /* Debug */, + OBJ_202 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_205 /* Build configuration list for PBXNativeTarget "XMLCoderTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_206 /* Debug */, + OBJ_207 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = OBJ_1 /* Project object */; } From 0414fd841f1a0147e132913108b66f3722d17005 Mon Sep 17 00:00:00 2001 From: James Bean Date: Sat, 27 Jul 2019 20:42:53 -0700 Subject: [PATCH 18/34] Use Swift 4.2 everywhere --- XMLCoder.xcodeproj/project.pbxproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index 3980fbc2..e6c05c36 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -276,7 +276,7 @@ OBJ_98 /* DataTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataTests.swift; sourceTree = ""; }; OBJ_99 /* DateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = ""; }; "XMLCoder::XMLCoder::Product" /* XMLCoder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = XMLCoder.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - "XMLCoder::XMLCoderTests::Product" /* XMLCoderTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = XMLCoderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + "XMLCoder::XMLCoderTests::Product" /* XMLCoderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = XMLCoderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -817,7 +817,7 @@ buildSettings = { LD = /usr/bin/true; OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -826,7 +826,7 @@ buildSettings = { LD = /usr/bin/true; OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -860,7 +860,7 @@ OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; TARGET_NAME = XMLCoderTests; TVOS_DEPLOYMENT_TARGET = 9.0; WATCHOS_DEPLOYMENT_TARGET = 2.0; @@ -885,7 +885,7 @@ OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 4.2; TARGET_NAME = XMLCoderTests; TVOS_DEPLOYMENT_TARGET = 9.0; WATCHOS_DEPLOYMENT_TARGET = 2.0; From e1f0c4566ca62c8a6ce0d71c8f935b57ca4d767b Mon Sep 17 00:00:00 2001 From: James Bean Date: Mon, 29 Jul 2019 15:04:03 -0400 Subject: [PATCH 19/34] Bring back old performance testing baseline --- ...76E090BF-7AFE-4988-A06A-3C423396A4A4.plist | 245 ++++++++++++++++++ .../Info.plist | 33 +++ 2 files changed, 278 insertions(+) create mode 100644 XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist create mode 100644 XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist diff --git a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist new file mode 100644 index 00000000..65f02410 --- /dev/null +++ b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist @@ -0,0 +1,245 @@ + + + + + classNames + + BenchmarkTests + + testDecodeArrays() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.355 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeBools() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.0131 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeDatas() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.0143 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeDates() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.013922 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeDecimals() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.011251 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeDictionaries() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.08847 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeFloats() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.015645 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeInts() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.014091 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeNulls() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.0093493 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeUInts() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.014785 + baselineIntegrationDisplayName + Local Baseline + + + testDecodeURLs() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.014802 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeArrays() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.076162 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeBools() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.015558 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeDatas() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.017226 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeDates() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.019835 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeDecimals() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.014639 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeDictionaries() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.092163 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeFloats() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.016656 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeInts() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.015619 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeNulls() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.0071232 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeUInts() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.015903 + baselineIntegrationDisplayName + Local Baseline + + + testEncodeURLs() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.016821 + baselineIntegrationDisplayName + Local Baseline + + + + RJITest + + testBenchmarkRSS() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.018708 + baselineIntegrationDisplayName + Local Baseline + + + + + + \ No newline at end of file diff --git a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist new file mode 100644 index 00000000..f554dc0e --- /dev/null +++ b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist @@ -0,0 +1,33 @@ + + + + + runDestinationsByUUID + + 76E090BF-7AFE-4988-A06A-3C423396A4A4 + + localComputer + + busSpeedInMHz + 400 + cpuCount + 1 + cpuKind + Intel Core i9 + cpuSpeedInMHz + 2900 + logicalCPUCoresPerPackage + 12 + modelCode + MacBookPro15,1 + physicalCPUCoresPerPackage + 6 + platformIdentifier + com.apple.platform.macosx + + targetArchitecture + x86_64 + + + + \ No newline at end of file From 0b9c5ccac86f087e686d23bc91ee4bb1a6b8b1db Mon Sep 17 00:00:00 2001 From: James Bean Date: Mon, 29 Jul 2019 15:05:15 -0400 Subject: [PATCH 20/34] Whitespace --- .../76E090BF-7AFE-4988-A06A-3C423396A4A4.plist | 2 +- .../xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist index 65f02410..606e6b36 100644 --- a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist +++ b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/76E090BF-7AFE-4988-A06A-3C423396A4A4.plist @@ -242,4 +242,4 @@ - \ No newline at end of file + diff --git a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist index f554dc0e..80b7837a 100644 --- a/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist +++ b/XMLCoder.xcodeproj/xcshareddata/xcbaselines/XMLCoder::XMLCoderTests.xcbaseline/Info.plist @@ -30,4 +30,4 @@ - \ No newline at end of file + From a8125e24daa5eeb122a01e9bf6fd64f25199e9c4 Mon Sep 17 00:00:00 2001 From: James Bean Date: Mon, 29 Jul 2019 15:07:36 -0400 Subject: [PATCH 21/34] Bring back scheme management plist --- .../xcshareddata/xcschemes/xcschememanagement.plist | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 XMLCoder.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist diff --git a/XMLCoder.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist b/XMLCoder.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..cd0056de --- /dev/null +++ b/XMLCoder.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist @@ -0,0 +1,12 @@ + + + + SchemeUserState + + XMLParsing-Package.xcscheme + + + SuppressBuildableAutocreation + + + From bf52ca853a4155adf42a70da7846be468390bdfd Mon Sep 17 00:00:00 2001 From: James Bean Date: Mon, 29 Jul 2019 15:14:59 -0400 Subject: [PATCH 22/34] Bring back in empty AdditionalOptions --- XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme b/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme index 59df07f8..547713e4 100644 --- a/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme +++ b/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme @@ -39,6 +39,8 @@ + + + + Date: Mon, 29 Jul 2019 15:15:59 -0400 Subject: [PATCH 23/34] Whitespace --- XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme b/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme index 547713e4..c117e5d6 100644 --- a/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme +++ b/XMLCoder.xcodeproj/xcshareddata/xcschemes/XMLCoder.xcscheme @@ -39,7 +39,7 @@ - + - + Date: Mon, 29 Jul 2019 16:33:41 -0400 Subject: [PATCH 24/34] Remove print statement --- Tests/XMLCoderTests/SimpleChoiceTests.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/XMLCoderTests/SimpleChoiceTests.swift b/Tests/XMLCoderTests/SimpleChoiceTests.swift index 4ab85290..e22ce864 100644 --- a/Tests/XMLCoderTests/SimpleChoiceTests.swift +++ b/Tests/XMLCoderTests/SimpleChoiceTests.swift @@ -31,7 +31,6 @@ extension IntOrString: Codable { init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - print(type(of: container)) do { self = .int(try container.decode(Int.self, forKey: .int)) } catch { From 5a7a64abb403ecbfcd84c0d5d86ae57153d79f77 Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 11:05:37 -0400 Subject: [PATCH 25/34] Merge early exits in ChoiceBox.init?(_: KeyedBox) --- Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift b/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift index 9a4749ce..ad2b6835 100644 --- a/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift +++ b/Sources/XMLCoder/Auxiliaries/Box/ChoiceBox.swift @@ -25,8 +25,12 @@ extension ChoiceBox: SimpleBox {} extension ChoiceBox { init?(_ keyedBox: KeyedBox) { - guard let firstKey = keyedBox.elements.keys.first else { return nil } - guard let firstElement = keyedBox.elements[firstKey].first else { return nil } + guard + let firstKey = keyedBox.elements.keys.first, + let firstElement = keyedBox.elements[firstKey].first + else { + return nil + } self.init(key: firstKey, element: firstElement) } From c00057370a342704885aead638560c02b9227cf7 Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 11:07:19 -0400 Subject: [PATCH 26/34] Tighten up SharedBox init callsite --- Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift index d43b565d..f3ae46f3 100644 --- a/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift +++ b/Sources/XMLCoder/Decoder/XMLDecoderImplementation.swift @@ -174,12 +174,7 @@ class XMLDecoderImplementation: Decoder { case let keyed as SharedBox: return XMLUnkeyedDecodingContainer( referencing: self, - wrapping: SharedBox( - keyed.withShared { $0.elements.map { key, box in - SingleKeyedBox(key: key, element: box) - } - } - ) + wrapping: SharedBox(keyed.withShared { $0.elements.map(SingleKeyedBox.init) }) ) default: throw DecodingError.typeMismatch( From d4bd9f442b191f5934e95ae5a56e7323083ac1f7 Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 11:16:50 -0400 Subject: [PATCH 27/34] Rename _converted -> converted --- .../Encoder/XMLChoiceEncodingContainer.swift | 16 ++++++++-------- .../Encoder/XMLKeyedEncodingContainer.swift | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift index 04d9a52c..a2cc8222 100644 --- a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift @@ -34,7 +34,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol // MARK: - Coding Path Operations - private func _converted(_ key: CodingKey) -> CodingKey { + private func converted(_ key: CodingKey) -> CodingKey { switch encoder.options.keyEncodingStrategy { case .useDefaultKeys: return key @@ -67,7 +67,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol public mutating func encodeNil(forKey key: Key) throws { container.withShared { - $0.key = _converted(key).stringValue + $0.key = converted(key).stringValue $0.element = NullBox() } } @@ -102,7 +102,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol let elementEncoder: (T, Key, Box) throws -> () = { _, key, box in mySelf.container.withShared { container in container.element = box - container.key = mySelf._converted(key).stringValue + container.key = mySelf.converted(key).stringValue } } @@ -132,7 +132,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol self.container.withShared { container in container.element = sharedKeyed - container.key = _converted(key).stringValue + container.key = converted(key).stringValue } codingPath.append(key) @@ -154,7 +154,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol self.container.withShared { container in container.element = sharedChoice - container.key = _converted(key).stringValue + container.key = converted(key).stringValue } codingPath.append(key) @@ -175,7 +175,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol container.withShared { container in container.element = sharedUnkeyed - container.key = _converted(key).stringValue + container.key = converted(key).stringValue } codingPath.append(key) @@ -191,7 +191,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol return XMLReferencingEncoder( referencing: encoder, key: XMLKey.super, - convertedKey: _converted(XMLKey.super), + convertedKey: converted(XMLKey.super), wrapping: container ) } @@ -200,7 +200,7 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol return XMLReferencingEncoder( referencing: encoder, key: key, - convertedKey: _converted(key), + convertedKey: converted(key), wrapping: container ) } diff --git a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift index f14ae336..415c24d7 100644 --- a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift @@ -36,7 +36,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { // MARK: - Coding Path Operations - private func _converted(_ key: CodingKey) -> CodingKey { + private func converted(_ key: CodingKey) -> CodingKey { switch encoder.options.keyEncodingStrategy { case .useDefaultKeys: return key @@ -69,7 +69,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { public mutating func encodeNil(forKey key: Key) throws { container.withShared { - $0.elements.append(NullBox(), at: _converted(key).stringValue) + $0.elements.append(NullBox(), at: converted(key).stringValue) } } @@ -113,13 +113,13 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { )) } mySelf.container.withShared { container in - container.attributes.append(attribute, at: mySelf._converted(key).stringValue) + container.attributes.append(attribute, at: mySelf.converted(key).stringValue) } } let elementEncoder: (T, Key, Box) throws -> () = { _, key, box in mySelf.container.withShared { container in - container.elements.append(box, at: mySelf._converted(key).stringValue) + container.elements.append(box, at: mySelf.converted(key).stringValue) } } @@ -156,7 +156,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { let sharedKeyed = SharedBox(KeyedBox()) self.container.withShared { container in - container.elements.append(sharedKeyed, at: _converted(key).stringValue) + container.elements.append(sharedKeyed, at: converted(key).stringValue) } codingPath.append(key) @@ -177,7 +177,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { let sharedChoice = SharedBox(ChoiceBox()) self.container.withShared { container in - container.elements.append(sharedChoice, at: _converted(key).stringValue) + container.elements.append(sharedChoice, at: converted(key).stringValue) } codingPath.append(key) @@ -197,7 +197,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { let sharedUnkeyed = SharedBox(UnkeyedBox()) container.withShared { container in - container.elements.append(sharedUnkeyed, at: _converted(key).stringValue) + container.elements.append(sharedUnkeyed, at: converted(key).stringValue) } codingPath.append(key) @@ -213,7 +213,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { return XMLReferencingEncoder( referencing: encoder, key: XMLKey.super, - convertedKey: _converted(XMLKey.super), + convertedKey: converted(XMLKey.super), wrapping: container ) } @@ -222,7 +222,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { return XMLReferencingEncoder( referencing: encoder, key: key, - convertedKey: _converted(key), + convertedKey: converted(key), wrapping: container ) } From 4a99e9511eda400039a6b3a7d4e5258cacaf5926 Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 12:08:13 -0400 Subject: [PATCH 28/34] Beef up XMLChoiceCodingKey doc comment --- .../Auxiliaries/XMLChoiceCodingKey.swift | 52 ++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift b/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift index 0ea70fd9..ce2dc1d3 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift @@ -5,6 +5,54 @@ // Created by Benjamin Wetherfield on 7/17/19. // -/// An empty marker protocol that can be used in place of `CodingKey`. It must be used when conforming a union-type–like enum with -/// associated values to `Codable` when the encoded format is `XML`. +/// An empty marker protocol that can be used in place of `CodingKey`. It must be used when +/// attempting to encode and decode union-type–like enums with associated values to and from `XML` +/// choice elements. +/// +/// - Important: In order for your `XML`-destined `Codable` type to be encoded and/or decoded +/// properly, you must conform your custom `CodingKey` type additionally to `XMLChoiceCodingKey`. +/// +/// For example, say you have defined a type which can hold _either_ an `Int` _or_ a `String`: +/// +/// enum IntOrString { +/// case int(Int) +/// case string(String) +/// } +/// +/// Implement the requirements for the `Codable` protocol like this: +/// +/// extension IntOrString: Codable { +/// enum CodingKeys: String, XMLChoiceCodingKey { +/// case int +/// case string +/// } +/// +/// func encode(to encoder: Encoder) throws { +/// var container = encoder.container(keyedBy: CodingKeys.self) +/// switch self { +/// case let .int(value): +/// try container.encode(value, forKey: .int) +/// case let .string(value): +/// try container.encode(value, forKey: .string) +/// } +/// } +/// +/// init(from decoder: Decoder) throws { +/// let container = try decoder.container(keyedBy: CodingKeys.self) +/// do { +/// self = .int(try container.decode(Int.self, forKey: .int)) +/// } catch { +/// self = .string(try container.decode(String.self, forKey: .string)) +/// } +/// } +/// } +/// +/// Retroactively conform the `CodingKeys` enum to `XMLChoiceCodingKey` when targeting `XML` as your +/// encoded format. +/// +/// extension IntOrString.CodingKeys: XMLChoiceCodingKey {} +/// +/// - Note: The `XMLChoiceCodingKey` marker protocol allows the `XMLEncoder` / `XMLDecoder` to +/// resolve ambiguities particular to the `XML` format between nested unkeyed container elements and +/// choice elements. public protocol XMLChoiceCodingKey: CodingKey {} From 7920b72b5a0d52ef47ca8e75252b133bd87c44a2 Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 12:22:24 -0400 Subject: [PATCH 29/34] Rename local variable mySelf -> oldSelf --- .../Encoder/XMLChoiceEncodingContainer.swift | 8 ++++---- .../XMLCoder/Encoder/XMLKeyedEncodingContainer.swift | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift index a2cc8222..87a07414 100644 --- a/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLChoiceEncodingContainer.swift @@ -98,16 +98,16 @@ struct XMLChoiceEncodingContainer: KeyedEncodingContainerProtocol encoder.nodeEncodings.append(nodeEncodings) let box = try encode(encoder, value) - let mySelf = self + let oldSelf = self let elementEncoder: (T, Key, Box) throws -> () = { _, key, box in - mySelf.container.withShared { container in + oldSelf.container.withShared { container in container.element = box - container.key = mySelf.converted(key).stringValue + container.key = oldSelf.converted(key).stringValue } } defer { - self = mySelf + self = oldSelf } try elementEncoder(value, key, box) diff --git a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift index 415c24d7..de04a225 100644 --- a/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift +++ b/Sources/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift @@ -104,7 +104,7 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { encoder.nodeEncodings.append(nodeEncodings) let box = try encode(encoder, value) - let mySelf = self + let oldSelf = self let attributeEncoder: (T, Key, Box) throws -> () = { value, key, box in guard let attribute = box as? SimpleBox else { throw EncodingError.invalidValue(value, EncodingError.Context( @@ -112,19 +112,19 @@ struct XMLKeyedEncodingContainer: KeyedEncodingContainerProtocol { debugDescription: "Complex values cannot be encoded as attributes." )) } - mySelf.container.withShared { container in - container.attributes.append(attribute, at: mySelf.converted(key).stringValue) + oldSelf.container.withShared { container in + container.attributes.append(attribute, at: oldSelf.converted(key).stringValue) } } let elementEncoder: (T, Key, Box) throws -> () = { _, key, box in - mySelf.container.withShared { container in - container.elements.append(box, at: mySelf.converted(key).stringValue) + oldSelf.container.withShared { container in + container.elements.append(box, at: oldSelf.converted(key).stringValue) } } defer { - self = mySelf + self = oldSelf } switch strategy(key) { From 683cb342a54e21b6db9f9593b6fa51811f7e71df Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 12:27:22 -0400 Subject: [PATCH 30/34] Wrangle long preconditionFailure messages --- .../Encoder/XMLEncoderImplementation.swift | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift b/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift index 57c146c2..f55d5098 100644 --- a/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift +++ b/Sources/XMLCoder/Encoder/XMLEncoderImplementation.swift @@ -79,7 +79,12 @@ class XMLEncoderImplementation: Encoder { topContainer = storage.pushKeyedContainer() } else { guard let container = storage.lastContainer as? SharedBox else { - preconditionFailure("Attempt to push new keyed encoding container when already previously encoded at this path.") + preconditionFailure( + """ + Attempt to push new keyed encoding container when already previously encoded \ + at this path. + """ + ) } topContainer = container @@ -96,7 +101,12 @@ class XMLEncoderImplementation: Encoder { topContainer = storage.pushChoiceContainer() } else { guard let container = storage.lastContainer as? SharedBox else { - preconditionFailure("Attempt to push new (single element) keyed encoding container when already previously encoded at this path.") + preconditionFailure( + """ + Attempt to push new (single element) keyed encoding container when already \ + previously encoded at this path. + """ + ) } topContainer = container @@ -114,7 +124,12 @@ class XMLEncoderImplementation: Encoder { topContainer = storage.pushUnkeyedContainer() } else { guard let container = storage.lastContainer as? SharedBox else { - preconditionFailure("Attempt to push new unkeyed encoding container when already previously encoded at this path.") + preconditionFailure( + """ + Attempt to push new unkeyed encoding container when already previously encoded \ + at this path. + """ + ) } topContainer = container From 7db9627626b4fde6918e78345e64c85ec0ac9581 Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 12:30:07 -0400 Subject: [PATCH 31/34] Reword Implement -> Implementing in doc comment --- Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift b/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift index ce2dc1d3..5b5e8f92 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLChoiceCodingKey.swift @@ -19,7 +19,7 @@ /// case string(String) /// } /// -/// Implement the requirements for the `Codable` protocol like this: +/// Implementing the requirements for the `Codable` protocol like this: /// /// extension IntOrString: Codable { /// enum CodingKeys: String, XMLChoiceCodingKey { From c213808034e7aad702debf6e35f09fe7ba407c8f Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 12:50:32 -0400 Subject: [PATCH 32/34] Throw errors instead of fatallyErroring --- .../Decoder/XMLChoiceDecodingContainer.swift | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift index 25a248f1..fc356e4d 100644 --- a/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift +++ b/Sources/XMLCoder/Decoder/XMLChoiceDecodingContainer.swift @@ -58,18 +58,34 @@ struct XMLChoiceDecodingContainer: KeyedDecodingContainerProtocol public func nestedContainer( keyedBy _: NestedKey.Type, forKey key: Key ) throws -> KeyedDecodingContainer { - fatalError("Choice elements cannot produce a nested container.") + throw DecodingError.typeMismatch( + at: codingPath, + expectation: NestedKey.self, + reality: container + ) } public func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { - fatalError("Choice elements cannot produce a unkeyed nested container.") + throw DecodingError.typeMismatch( + at: codingPath, + expectation: Key.self, + reality: container + ) } public func superDecoder() throws -> Decoder { - fatalError("XMLChoiceDecodingContainer cannot produce a super decoder.") + throw DecodingError.typeMismatch( + at: codingPath, + expectation: Key.self, + reality: container + ) } public func superDecoder(forKey key: Key) throws -> Decoder { - fatalError("XMLChoiceDecodingContainer cannot produce a super decoder.") + throw DecodingError.typeMismatch( + at: codingPath, + expectation: Key.self, + reality: container + ) } } From 32195c522ab3d18c832efecc682fdfa22960e036 Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 13:08:27 -0400 Subject: [PATCH 33/34] Add brief description to README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c332cedd..62c07210 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,14 @@ struct Foo: Codable, DynamicNodeEncoding { } ``` +### Choice element coding + +Starting with [version 0.8](https://github.com/MaxDesiatov/XMLCoder/releases/tag/0.8.0), you +now encode and decode union-type–like enums with associated values by conforming your +`CodingKey` type additionally to `XMLChoiceCodingKey`. + +For more information, see the [pull request](https://github.com/MaxDesiatov/XMLCoder/pull/119). + ### Preserving whitespaces in element content By default whitespaces are trimmed in element content during decoding. This From 8149ead6a3467619c7b5df64c755b285d97a08ab Mon Sep 17 00:00:00 2001 From: James Bean Date: Tue, 30 Jul 2019 13:12:32 -0400 Subject: [PATCH 34/34] Keep README in tag-ological order --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 62c07210..628d700e 100644 --- a/README.md +++ b/README.md @@ -199,14 +199,6 @@ struct Foo: Codable, DynamicNodeEncoding { } ``` -### Choice element coding - -Starting with [version 0.8](https://github.com/MaxDesiatov/XMLCoder/releases/tag/0.8.0), you -now encode and decode union-type–like enums with associated values by conforming your -`CodingKey` type additionally to `XMLChoiceCodingKey`. - -For more information, see the [pull request](https://github.com/MaxDesiatov/XMLCoder/pull/119). - ### Preserving whitespaces in element content By default whitespaces are trimmed in element content during decoding. This @@ -215,6 +207,14 @@ Starting with [version 0.5](https://github.com/MaxDesiatov/XMLCoder/releases/tag you can now set a property `trimValueWhitespaces` to `false` (the default value is `true`) on `XMLDecoder` instance to preserve all whitespaces in decoded strings. +### Choice element coding + +Starting with [version 0.8](https://github.com/MaxDesiatov/XMLCoder/releases/tag/0.8.0), you +now encode and decode union-type–like enums with associated values by conforming your +`CodingKey` type additionally to `XMLChoiceCodingKey`. + +For more information, see the [pull request](https://github.com/MaxDesiatov/XMLCoder/pull/119). + ## Installation ### Requirements