diff --git a/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift b/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift index a72189ac..cbd2c3eb 100644 --- a/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift +++ b/Tests/XMLCoderTests/Minimal/BoxTreeTests.swift @@ -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) } }