From f186e8bed78d9b2a6a2fae7136e8411550a31ba9 Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Wed, 2 Jan 2019 16:24:12 +0200 Subject: [PATCH 01/11] Add test for decoder .convertFromSnakeCase strategy --- Tests/XMLCoderTests/Minimal/KeyedTests.swift | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Tests/XMLCoderTests/Minimal/KeyedTests.swift b/Tests/XMLCoderTests/Minimal/KeyedTests.swift index 9052f30d..7a47324e 100644 --- a/Tests/XMLCoderTests/Minimal/KeyedTests.swift +++ b/Tests/XMLCoderTests/Minimal/KeyedTests.swift @@ -12,6 +12,10 @@ class KeyedTests: XCTestCase { struct Container: Codable, Equatable { let value: [String: Int] } + + struct ContainerCamelCase: Codable, Equatable { + let valUe: [String: Int] + } func testEmpty() throws { let decoder = XMLDecoder() @@ -71,11 +75,31 @@ class KeyedTests: XCTestCase { try encoder.encode(container, withRootKey: "container") ) } + + func testConvertFromSnakeCase() throws { + let decoder = XMLDecoder() + decoder.keyDecodingStrategy = .convertFromSnakeCase + + let xmlString = + """ + + + 12 + + + """ + let xmlData = xmlString.data(using: .utf8)! + + let decoded = try decoder.decode(ContainerCamelCase.self, from: xmlData) + + XCTAssertEqual(decoded.valUe, ["foO": 12]) + } static var allTests = [ ("testEmpty", testEmpty), ("testSingleElement", testSingleElement), ("testMultiElement", testMultiElement), ("testAttribute", testAttribute), + ("testConvertFromSnakeCase", testConvertFromSnakeCase) ] } From 8b9f9eb342cb02c7b6e91b02e3509ca8a6f7146c Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Wed, 2 Jan 2019 20:06:39 +0200 Subject: [PATCH 02/11] Add test to custom decode strategy --- Tests/XMLCoderTests/Minimal/KeyedTests.swift | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Tests/XMLCoderTests/Minimal/KeyedTests.swift b/Tests/XMLCoderTests/Minimal/KeyedTests.swift index 7a47324e..fce569af 100644 --- a/Tests/XMLCoderTests/Minimal/KeyedTests.swift +++ b/Tests/XMLCoderTests/Minimal/KeyedTests.swift @@ -16,6 +16,21 @@ class KeyedTests: XCTestCase { struct ContainerCamelCase: Codable, Equatable { let valUe: [String: Int] } + + struct AnyKey: CodingKey { + var stringValue: String + var intValue: Int? + + init?(stringValue: String) { + self.stringValue = stringValue + self.intValue = nil + } + + init?(intValue: Int) { + self.stringValue = String(intValue) + self.intValue = intValue + } + } func testEmpty() throws { let decoder = XMLDecoder() @@ -94,6 +109,28 @@ class KeyedTests: XCTestCase { XCTAssertEqual(decoded.valUe, ["foO": 12]) } + + func testCustomDecoderConvert() throws { + let decoder = XMLDecoder() + decoder.keyDecodingStrategy = .custom { keys in + let lastComponent = keys.last!.stringValue.split(separator: "_").last! + return AnyKey(stringValue: String(lastComponent))! + } + + let xmlString = + """ + + + 12 + + + """ + let xmlData = xmlString.data(using: .utf8)! + + let decoded = try decoder.decode(Container.self, from: xmlData) + + XCTAssertEqual(decoded.value, ["foo": 12]) + } static var allTests = [ ("testEmpty", testEmpty), From 90c4678b0a934c57fb802d5be25d5aed408022d8 Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Wed, 2 Jan 2019 21:51:43 +0200 Subject: [PATCH 03/11] Add format to KeyedTests --- Tests/XMLCoderTests/Minimal/KeyedTests.swift | 34 ++++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Tests/XMLCoderTests/Minimal/KeyedTests.swift b/Tests/XMLCoderTests/Minimal/KeyedTests.swift index fce569af..41702a5a 100644 --- a/Tests/XMLCoderTests/Minimal/KeyedTests.swift +++ b/Tests/XMLCoderTests/Minimal/KeyedTests.swift @@ -12,22 +12,22 @@ class KeyedTests: XCTestCase { struct Container: Codable, Equatable { let value: [String: Int] } - + struct ContainerCamelCase: Codable, Equatable { let valUe: [String: Int] } - + struct AnyKey: CodingKey { var stringValue: String var intValue: Int? - + init?(stringValue: String) { self.stringValue = stringValue - self.intValue = nil + intValue = nil } - + init?(intValue: Int) { - self.stringValue = String(intValue) + stringValue = String(intValue) self.intValue = intValue } } @@ -90,13 +90,13 @@ class KeyedTests: XCTestCase { try encoder.encode(container, withRootKey: "container") ) } - + func testConvertFromSnakeCase() throws { let decoder = XMLDecoder() decoder.keyDecodingStrategy = .convertFromSnakeCase - + let xmlString = - """ + """ 12 @@ -104,21 +104,21 @@ class KeyedTests: XCTestCase { """ let xmlData = xmlString.data(using: .utf8)! - + let decoded = try decoder.decode(ContainerCamelCase.self, from: xmlData) - + XCTAssertEqual(decoded.valUe, ["foO": 12]) } - + func testCustomDecoderConvert() throws { let decoder = XMLDecoder() decoder.keyDecodingStrategy = .custom { keys in let lastComponent = keys.last!.stringValue.split(separator: "_").last! return AnyKey(stringValue: String(lastComponent))! } - + let xmlString = - """ + """ 12 @@ -126,9 +126,9 @@ class KeyedTests: XCTestCase { """ let xmlData = xmlString.data(using: .utf8)! - + let decoded = try decoder.decode(Container.self, from: xmlData) - + XCTAssertEqual(decoded.value, ["foo": 12]) } @@ -137,6 +137,6 @@ class KeyedTests: XCTestCase { ("testSingleElement", testSingleElement), ("testMultiElement", testMultiElement), ("testAttribute", testAttribute), - ("testConvertFromSnakeCase", testConvertFromSnakeCase) + ("testConvertFromSnakeCase", testConvertFromSnakeCase), ] } From 297d0715151bdb24bb5b0144d4e949329bd614ca Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Thu, 3 Jan 2019 11:40:29 +0200 Subject: [PATCH 04/11] Add attribute test to custom and snakeCase decode strategy --- Tests/XMLCoderTests/Minimal/KeyedTests.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Tests/XMLCoderTests/Minimal/KeyedTests.swift b/Tests/XMLCoderTests/Minimal/KeyedTests.swift index 41702a5a..e269bb2b 100644 --- a/Tests/XMLCoderTests/Minimal/KeyedTests.swift +++ b/Tests/XMLCoderTests/Minimal/KeyedTests.swift @@ -15,6 +15,7 @@ class KeyedTests: XCTestCase { struct ContainerCamelCase: Codable, Equatable { let valUe: [String: Int] + let testAttribute: String } struct AnyKey: CodingKey { @@ -97,7 +98,7 @@ class KeyedTests: XCTestCase { let xmlString = """ - + 12 @@ -119,17 +120,17 @@ class KeyedTests: XCTestCase { let xmlString = """ - - + + 12 - + """ let xmlData = xmlString.data(using: .utf8)! - let decoded = try decoder.decode(Container.self, from: xmlData) + let decoded = try decoder.decode(ContainerCamelCase.self, from: xmlData) - XCTAssertEqual(decoded.value, ["foo": 12]) + XCTAssertEqual(decoded.valUe, ["foo": 12]) } static var allTests = [ From ba4a1c623dd809f3e9fb2422626664686bf8ded8 Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Thu, 3 Jan 2019 13:11:21 +0200 Subject: [PATCH 05/11] Add test to error description of convertFromSnakeCase --- Tests/XMLCoderTests/Minimal/KeyedTests.swift | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Tests/XMLCoderTests/Minimal/KeyedTests.swift b/Tests/XMLCoderTests/Minimal/KeyedTests.swift index e269bb2b..654832ad 100644 --- a/Tests/XMLCoderTests/Minimal/KeyedTests.swift +++ b/Tests/XMLCoderTests/Minimal/KeyedTests.swift @@ -111,6 +111,23 @@ class KeyedTests: XCTestCase { XCTAssertEqual(decoded.valUe, ["foO": 12]) } + func testErrorDescriptionConvertFromSnakeCase() throws { + let decoder = XMLDecoder() + decoder.keyDecodingStrategy = .convertFromSnakeCase + + let xmlString = + """ + + + 12 + + + """ + let xmlData = xmlString.data(using: .utf8)! + + XCTAssertThrowsError(try decoder.decode(ContainerCamelCase.self, from: xmlData)) + } + func testCustomDecoderConvert() throws { let decoder = XMLDecoder() decoder.keyDecodingStrategy = .custom { keys in From 35b8cc23dc23469645a05297872342488010a422 Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Thu, 3 Jan 2019 17:07:58 +0200 Subject: [PATCH 06/11] Add all Int test --- Tests/XMLCoderTests/Minimal/IntTests.swift | 57 ++++++++++++++++------ 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/Tests/XMLCoderTests/Minimal/IntTests.swift b/Tests/XMLCoderTests/Minimal/IntTests.swift index ff778736..a34fb943 100644 --- a/Tests/XMLCoderTests/Minimal/IntTests.swift +++ b/Tests/XMLCoderTests/Minimal/IntTests.swift @@ -8,11 +8,23 @@ import XCTest @testable import XMLCoder +protocol IntegerContainer { + associatedtype Integer: BinaryInteger + + var value: Integer { get } +} + +extension IntegerContainer { + var intValue: Int { + return Int(value) + } +} + class IntTests: XCTestCase { typealias Value = Int - struct Container: Codable, Equatable { - let value: Value + struct Container: Codable, Equatable, IntegerContainer where T: Codable & Equatable & BinaryInteger { + let value: T } let values: [(Value, String)] = [ @@ -21,16 +33,14 @@ class IntTests: XCTestCase { (42, "42"), ] - func testMissing() { + func testMissing(_ type: T.Type) throws { let decoder = XMLDecoder() - let xmlString = "" let xmlData = xmlString.data(using: .utf8)! - - XCTAssertThrowsError(try decoder.decode(Container.self, from: xmlData)) + XCTAssertThrowsError(try decoder.decode(type, from: xmlData)) } - func testAttribute() throws { + func testAttribute(_ type: T.Type) throws { let decoder = XMLDecoder() let encoder = XMLEncoder() @@ -45,15 +55,15 @@ class IntTests: XCTestCase { """ let xmlData = xmlString.data(using: .utf8)! - let decoded = try decoder.decode(Container.self, from: xmlData) - XCTAssertEqual(decoded.value, value) + let decoded = try decoder.decode(type, from: xmlData) + XCTAssertEqual(decoded.intValue, value) - let encoded = try encoder.encode(decoded, withRootKey: "container") + let encoded = try encoder.encode(decoded as type, withRootKey: "container") XCTAssertEqual(String(data: encoded, encoding: .utf8)!, xmlString) } } - func testElement() throws { + func testElement(_ type: T.Type) throws { let decoder = XMLDecoder() let encoder = XMLEncoder() @@ -68,7 +78,7 @@ class IntTests: XCTestCase { """ let xmlData = xmlString.data(using: .utf8)! - let decoded = try decoder.decode(Container.self, from: xmlData) + let decoded = try decoder.decode(type, from: xmlData) XCTAssertEqual(decoded.value, value) let encoded = try encoder.encode(decoded, withRootKey: "container") @@ -76,8 +86,27 @@ class IntTests: XCTestCase { } } + func differentTypeTestMissing() throws { + try testMissing(Container.self) + try testMissing(Container.self) + try testMissing(Container.self) + } + + func differentTypeTestAttribute() throws { + try testAttribute(Container.self) + try testAttribute(Container.self) + try testAttribute(Container.self) + } + + func differentTypeTestElement() throws { + try testElement(Container.self) + try testElement(Container.self) + try testElement(Container.self) + } + static var allTests = [ - ("testAttribute", testAttribute), - ("testElement", testElement), + ("differentTypeTestMissing", differentTypeTestMissing), + ("differentTypeTestAttribute", differentTypeTestAttribute), + ("differentTypeTestElement", differentTypeTestElement), ] } From 235fd30f6cdbd9e4d65fdf453708c910c8a4ceaa Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Thu, 3 Jan 2019 18:11:12 +0200 Subject: [PATCH 07/11] Fix all Int types test --- Tests/XMLCoderTests/Minimal/IntTests.swift | 42 ++++++++++++++++------ 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/Tests/XMLCoderTests/Minimal/IntTests.swift b/Tests/XMLCoderTests/Minimal/IntTests.swift index a34fb943..ae99c471 100644 --- a/Tests/XMLCoderTests/Minimal/IntTests.swift +++ b/Tests/XMLCoderTests/Minimal/IntTests.swift @@ -28,7 +28,6 @@ class IntTests: XCTestCase { } let values: [(Value, String)] = [ - (-42, "-42"), (0, "0"), (42, "42"), ] @@ -40,7 +39,7 @@ class IntTests: XCTestCase { XCTAssertThrowsError(try decoder.decode(type, from: xmlData)) } - func testAttribute(_ type: T.Type) throws { + func testAttribute(_ type: T.Type) throws { let decoder = XMLDecoder() let encoder = XMLEncoder() @@ -58,12 +57,12 @@ class IntTests: XCTestCase { let decoded = try decoder.decode(type, from: xmlData) XCTAssertEqual(decoded.intValue, value) - let encoded = try encoder.encode(decoded as type, withRootKey: "container") + let encoded = try encoder.encode(decoded, withRootKey: "container") XCTAssertEqual(String(data: encoded, encoding: .utf8)!, xmlString) } } - func testElement(_ type: T.Type) throws { + func testElement(_ type: T.Type) throws { let decoder = XMLDecoder() let encoder = XMLEncoder() @@ -79,34 +78,55 @@ class IntTests: XCTestCase { let xmlData = xmlString.data(using: .utf8)! let decoded = try decoder.decode(type, from: xmlData) - XCTAssertEqual(decoded.value, value) + XCTAssertEqual(decoded.intValue, value) let encoded = try encoder.encode(decoded, withRootKey: "container") XCTAssertEqual(String(data: encoded, encoding: .utf8)!, xmlString) } } - func differentTypeTestMissing() throws { + func testIntegerTypeMissing() throws { try testMissing(Container.self) try testMissing(Container.self) try testMissing(Container.self) + try testMissing(Container.self) + try testMissing(Container.self) + try testMissing(Container.self) + try testMissing(Container.self) + try testMissing(Container.self) + try testMissing(Container.self) + try testMissing(Container.self) } - func differentTypeTestAttribute() throws { + func testIntegerTypeAttribute() throws { try testAttribute(Container.self) try testAttribute(Container.self) try testAttribute(Container.self) + try testAttribute(Container.self) + try testAttribute(Container.self) + try testAttribute(Container.self) + try testAttribute(Container.self) + try testAttribute(Container.self) + try testAttribute(Container.self) + try testAttribute(Container.self) } - func differentTypeTestElement() throws { + func testIntegerTypeElement() throws { try testElement(Container.self) try testElement(Container.self) try testElement(Container.self) + try testElement(Container.self) + try testElement(Container.self) + try testElement(Container.self) + try testElement(Container.self) + try testElement(Container.self) + try testElement(Container.self) + try testElement(Container.self) } static var allTests = [ - ("differentTypeTestMissing", differentTypeTestMissing), - ("differentTypeTestAttribute", differentTypeTestAttribute), - ("differentTypeTestElement", differentTypeTestElement), + ("testIntegerTypeMissing", testIntegerTypeMissing), + ("testIntegerTypeAttribute", testIntegerTypeAttribute), + ("testIntegerTypeElement", testIntegerTypeElement), ] } From 818e4395446685ee82f747c1fa9d9223982075fa Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Fri, 4 Jan 2019 17:12:54 +0200 Subject: [PATCH 08/11] Add test for Class --- Tests/XMLCoderTests/ClassTests.swift | 98 ++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 Tests/XMLCoderTests/ClassTests.swift diff --git a/Tests/XMLCoderTests/ClassTests.swift b/Tests/XMLCoderTests/ClassTests.swift new file mode 100644 index 00000000..389fcb76 --- /dev/null +++ b/Tests/XMLCoderTests/ClassTests.swift @@ -0,0 +1,98 @@ +// +// ClassTest.swift +// XMLCoder +// +// Created by Matvii Hodovaniuk on 1/4/19. +// + +import Foundation +import XCTest +@testable import XMLCoder + +class A: Codable { + let x: String +} + +class B: A { + let y: Double + + private enum CodingKeys: CodingKey { + case y + case x + } + + required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + y = try container.decode(Double.self, forKey: .y) + let superDecoder = try container.superDecoder() + try super.init(from: superDecoder) + } +} + +class C: B { + let z: Int + + private enum CodingKeys: CodingKey { + case z + case y + case x + } + + required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + z = try container.decode(Int.self, forKey: .z) + let superDecoder = try container.superDecoder() + try super.init(from: superDecoder) + } +} + +struct S: Codable { + let a: A + let b: B + let c: C +} + +let str = "test_string" +let int = 42 +let double = 4.2 + +let xmlData = """ + + + \(str) + + + \(double) + \(str) + + + + \(int) + \(str) + \(double) + + +""".data(using: .utf8)! + +class ClassTests: XCTestCase { + func testEmpty() throws { + let decoder = XMLDecoder() + let encoder = XMLEncoder() + + let decoded = try decoder.decode(S.self, from: xmlData) + XCTAssertEqual(decoded.a.x, str) + XCTAssertEqual(decoded.b.x, str) + XCTAssertEqual(decoded.b.y, double) + XCTAssertEqual(decoded.c.z, int) + XCTAssertEqual(decoded.c.x, str) + XCTAssertEqual(decoded.c.y, double) + + let encoded = try encoder.encode(decoded, withRootKey: "s") + print(encoded) + XCTAssertEqual(encoded, xmlData) + } + + static var allTests = [ + ("testEmpty", testEmpty), + ] +} From 20dbff4993b4f9f7d307c23ba1660f0ad83bdd0c Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Fri, 4 Jan 2019 20:15:09 +0200 Subject: [PATCH 09/11] Fix xml item order --- Tests/XMLCoderTests/ClassTests.swift | 52 +++++++++++++++++++--------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/Tests/XMLCoderTests/ClassTests.swift b/Tests/XMLCoderTests/ClassTests.swift index 389fcb76..0dbec895 100644 --- a/Tests/XMLCoderTests/ClassTests.swift +++ b/Tests/XMLCoderTests/ClassTests.swift @@ -18,7 +18,6 @@ class B: A { private enum CodingKeys: CodingKey { case y - case x } required init(from decoder: Decoder) throws { @@ -27,6 +26,13 @@ class B: A { let superDecoder = try container.superDecoder() try super.init(from: superDecoder) } + + override func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(y, forKey: .y) + let superEncoder = container.superEncoder() + try super.encode(to: superEncoder) + } } class C: B { @@ -34,8 +40,6 @@ class C: B { private enum CodingKeys: CodingKey { case z - case y - case x } required init(from decoder: Decoder) throws { @@ -44,6 +48,13 @@ class C: B { let superDecoder = try container.superDecoder() try super.init(from: superDecoder) } + + override func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(z, forKey: .z) + let superEncoder = container.superEncoder() + try super.encode(to: superEncoder) + } } struct S: Codable { @@ -57,27 +68,33 @@ let int = 42 let double = 4.2 let xmlData = """ - - - \(str) - - - \(double) - \(str) - - - - \(int) + + + \(str) + + + \(str) + + \(double) + + + + + \(str) + \(double) - - + + \(int) + + """.data(using: .utf8)! class ClassTests: XCTestCase { func testEmpty() throws { let decoder = XMLDecoder() let encoder = XMLEncoder() + encoder.outputFormatting = [.prettyPrinted, .sortedKeys] let decoded = try decoder.decode(S.self, from: xmlData) XCTAssertEqual(decoded.a.x, str) @@ -88,7 +105,8 @@ class ClassTests: XCTestCase { XCTAssertEqual(decoded.c.y, double) let encoded = try encoder.encode(decoded, withRootKey: "s") - print(encoded) + + print(NSString(data: encoded, encoding: String.Encoding.utf8.rawValue)) XCTAssertEqual(encoded, xmlData) } From 7021e17aac5093afe2e1b02663860974fb1d5ffe Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Fri, 4 Jan 2019 20:31:43 +0200 Subject: [PATCH 10/11] Add ClassTest to project --- XMLCoder.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/XMLCoder.xcodeproj/project.pbxproj b/XMLCoder.xcodeproj/project.pbxproj index 5c8bb7f2..fcd21e54 100644 --- a/XMLCoder.xcodeproj/project.pbxproj +++ b/XMLCoder.xcodeproj/project.pbxproj @@ -21,6 +21,7 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + A61DCCD821DF9CA200C0A19D /* ClassTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A61DCCD621DF8DB300C0A19D /* ClassTests.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 */; }; @@ -115,6 +116,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + A61DCCD621DF8DB300C0A19D /* ClassTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassTests.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 = ""; }; @@ -335,6 +337,7 @@ OBJ_37 /* RJITest.swift */, OBJ_38 /* RelationshipsTest.swift */, D1FC040421C7EF8200065B43 /* RJISample.swift */, + A61DCCD621DF8DB300C0A19D /* ClassTests.swift */, ); name = XMLCoderTests; path = Tests/XMLCoderTests; @@ -555,6 +558,7 @@ OBJ_88 /* PlantTest.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 */, From b7ca3bc14828a37ddaec9d97658785b15acf1bd8 Mon Sep 17 00:00:00 2001 From: Hodovaniuk Matvii Date: Fri, 4 Jan 2019 20:42:47 +0200 Subject: [PATCH 11/11] Remove print from ClassTest --- Tests/XMLCoderTests/ClassTests.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/XMLCoderTests/ClassTests.swift b/Tests/XMLCoderTests/ClassTests.swift index 0dbec895..b6ed39fa 100644 --- a/Tests/XMLCoderTests/ClassTests.swift +++ b/Tests/XMLCoderTests/ClassTests.swift @@ -106,7 +106,6 @@ class ClassTests: XCTestCase { let encoded = try encoder.encode(decoded, withRootKey: "s") - print(NSString(data: encoded, encoding: String.Encoding.utf8.rawValue)) XCTAssertEqual(encoded, xmlData) }