File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -483,13 +483,12 @@ class TestNSArray : XCTestCase {
483
483
if isWritten {
484
484
do {
485
485
let plistDoc = try XMLDocument ( contentsOf: URL ( fileURLWithPath: testFilePath!, isDirectory: false ) , options: [ ] )
486
- try plistDoc. validate ( )
487
486
XCTAssert ( plistDoc. rootElement ( ) ? . name == " plist " )
488
487
let plist = try PropertyListSerialization . propertyList ( from: plistDoc. xmlData, options: [ ] , format: nil ) as! [ Any ]
489
488
XCTAssert ( ( plist [ 0 ] as? String ) == d1 [ 0 ] as? String )
490
489
XCTAssert ( ( plist [ 1 ] as? String ) == d1 [ 1 ] as? String )
491
490
} catch {
492
- XCTFail ( " XMLDocument failes to read / validate contenets " )
491
+ XCTFail ( " Failed to read and parse XMLDocument " )
493
492
}
494
493
} else {
495
494
XCTFail ( " Write to file failed " )
Original file line number Diff line number Diff line change @@ -168,16 +168,15 @@ class TestNSDictionary : XCTestCase {
168
168
if let _ = testFilePath {
169
169
let d1 : NSDictionary = [ " foo " : " bar " , " baz " : " qux " ]
170
170
let isWritten = d1. write ( toFile: testFilePath!, atomically: true )
171
- if ( isWritten) {
172
- do {
171
+ if isWritten {
172
+ do {
173
173
let plistDoc = try XMLDocument ( contentsOf: URL ( fileURLWithPath: testFilePath!, isDirectory: false ) , options: [ ] )
174
- try plistDoc. validate ( )
175
174
XCTAssert ( plistDoc. rootElement ( ) ? . name == " plist " )
176
175
let plist = try PropertyListSerialization . propertyList ( from: plistDoc. xmlData, options: [ ] , format: nil ) as! [ String : Any ]
177
176
XCTAssert ( ( plist [ " foo " ] as? String ) == d1 [ " foo " ] as? String )
178
177
XCTAssert ( ( plist [ " baz " ] as? String ) == d1 [ " baz " ] as? String )
179
178
} catch {
180
- XCTFail ( " XMLDocument failes to read / validate contenets " )
179
+ XCTFail ( " Failed to read and parse XMLDocument " )
181
180
}
182
181
} else {
183
182
XCTFail ( " Write to file failed " )
You can’t perform that action at this time.
0 commit comments