Skip to content

Commit

Permalink
Replace usage of XCTUnrwap (CoreOffice#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbean authored Jul 16, 2019
1 parent 5357b07 commit 0a8bbe6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Tests/XMLCoderTests/Minimal/BoxTreeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ class BoxTreeTests: XCTestCase {
elements: [e1, e2],
attributes: []
)

let boxTree = try XCTUnwrap(root.transformToBoxTree() as? KeyedBox)
let foo = try XCTUnwrap(boxTree.elements["foo"])

// FIXME: Use `XCTUnwrap` when commonly available
guard let boxTree = root.transformToBoxTree() as? KeyedBox else {
XCTFail("boxtTree is not a KeyedBox");
return
}
let foo = boxTree.elements["foo"]
XCTAssertEqual(foo.count, 2)
}
}

0 comments on commit 0a8bbe6

Please sign in to comment.