File tree Expand file tree Collapse file tree
Sources/XMLCoder/Auxiliaries
Tests/XMLCoderTests/Minimal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ struct XMLCoderElement: Equatable {
5151 elements. append ( element)
5252 }
5353
54- func transformToBoxTree( ) -> Box {
54+ func transformToBoxTree( ) -> KeyedBox {
5555 let attributes = KeyedStorage ( self . attributes. map { attribute in
5656 ( key: attribute. key, value: StringBox ( attribute. value) as SimpleBox )
5757 } )
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class XMLStackParser: NSObject {
2323 errorContextLength length: UInt ,
2424 shouldProcessNamespaces: Bool ,
2525 trimValueWhitespaces: Bool
26- ) throws -> Box {
26+ ) throws -> KeyedBox {
2727 let parser = XMLStackParser ( trimValueWhitespaces: trimValueWhitespaces)
2828
2929 let node = try parser. parse (
Original file line number Diff line number Diff line change @@ -29,10 +29,7 @@ class BoxTreeTests: XCTestCase {
2929 attributes: [ ]
3030 )
3131
32- guard let boxTree = root. transformToBoxTree ( ) as? KeyedBox else {
33- XCTFail ( " boxtTree is not a KeyedBox " )
34- return
35- }
32+ let boxTree = root. transformToBoxTree ( )
3633 let foo = boxTree. elements [ " foo " ]
3734 XCTAssertEqual ( foo. count, 2 )
3835 }
You can’t perform that action at this time.
0 commit comments