@@ -71,9 +71,7 @@ class TestURL : XCTestCase {
71
71
72
72
func test_fileURLWithPath_relativeTo( ) {
73
73
let homeDirectory = NSHomeDirectory ( )
74
- XCTAssertNotNil ( homeDirectory, " Failed to find home directory " )
75
74
let homeURL = URL ( fileURLWithPath: homeDirectory, isDirectory: true )
76
- XCTAssertNotNil ( homeURL, " fileURLWithPath:isDirectory: failed " )
77
75
XCTAssertEqual ( homeDirectory, homeURL. path)
78
76
79
77
#if os(macOS)
@@ -88,14 +86,11 @@ class TestURL : XCTestCase {
88
86
#endif
89
87
// we're telling fileURLWithPath:isDirectory:relativeTo: Documents is a directory
90
88
let url1 = URL ( fileURLWithFileSystemRepresentation: relativePath, isDirectory: true , relativeTo: baseURL)
91
- XCTAssertNotNil ( url1, " fileURLWithPath:isDirectory:relativeTo: failed " )
92
89
// we're letting fileURLWithPath:relativeTo: determine Documents is a directory with I/O
93
90
let url2 = URL ( fileURLWithPath: relativePath, relativeTo: baseURL)
94
- XCTAssertNotNil ( url2, " fileURLWithPath:relativeTo: failed " )
95
91
XCTAssertEqual ( url1, url2, " \( url1) was not equal to \( url2) " )
96
92
// we're telling fileURLWithPath:relativeTo: Documents is a directory with a trailing slash
97
93
let url3 = URL ( fileURLWithPath: relativePath + " / " , relativeTo: baseURL)
98
- XCTAssertNotNil ( url3, " fileURLWithPath:relativeTo: failed " )
99
94
XCTAssertEqual ( url1, url3, " \( url1) was not equal to \( url3) " )
100
95
}
101
96
0 commit comments