Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove stray print statement
  • Loading branch information
bwetherfield committed Jul 16, 2019
commit b0e6ddfae90ee28b3eb2d56369135faef48103ea
2 changes: 1 addition & 1 deletion Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ extension XMLCoderElement {
XMLCoderElement(key: "", box: $0)
})
}

init(key: String, box: UnkeyedBox) {
self.init(key: key, elements: box.map {
XMLCoderElement(key: key, box: $0)
Expand Down
4 changes: 1 addition & 3 deletions Tests/XMLCoderTests/CompositeChoiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ private enum IntOrStringWrapper: Equatable {
}

extension IntOrStringWrapper: XMLChoiceCodable {

enum CodingKeys: String, CodingKey {
case int
case string
Expand All @@ -38,7 +37,7 @@ extension IntOrStringWrapper: XMLChoiceCodable {
}

func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
var container = encoder.container(keyedBy: CodingKeys.self)
switch self {
case let .int(value):
try container.encode(value, forKey: .int)
Expand All @@ -49,7 +48,6 @@ extension IntOrStringWrapper: XMLChoiceCodable {
}

class CompositeChoiceTests: XCTestCase {

func testIntOrStringWrapper() throws {
let xml = """
<container>
Expand Down
3 changes: 0 additions & 3 deletions Tests/XMLCoderTests/SimpleChoiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ private enum IntOrString: Equatable {
}

extension IntOrString: XMLChoiceCodable {

enum CodingKeys: String, CodingKey {
case int
case string
Expand All @@ -41,7 +40,6 @@ extension IntOrString: XMLChoiceCodable {
}

class SimpleChoiceTests: XCTestCase {

func testIntOrStringIntDecoding() throws {
let xml = "<int>42</int>"
let result = try XMLDecoder().decode(IntOrString.self, from: xml.data(using: .utf8)!)
Expand Down Expand Up @@ -93,7 +91,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)
}
Expand Down