@@ -1273,81 +1273,81 @@ VIDEOS=StopgapVideos
1273
1273
XCTAssertNil ( NSHomeDirectoryForUser ( " " ) )
1274
1274
1275
1275
XCTAssertThrowsError ( try fm. contentsOfDirectory ( atPath: " " ) ) {
1276
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1276
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1277
1277
XCTAssertEqual ( code, . fileReadInvalidFileName)
1278
1278
}
1279
1279
1280
1280
XCTAssertNil ( fm. enumerator ( atPath: " " ) )
1281
1281
XCTAssertNil ( fm. subpaths ( atPath: " " ) )
1282
1282
XCTAssertThrowsError ( try fm. subpathsOfDirectory ( atPath: " " ) ) {
1283
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1283
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1284
1284
XCTAssertEqual ( code, . fileReadInvalidFileName)
1285
1285
}
1286
1286
1287
1287
XCTAssertThrowsError ( try fm. createDirectory ( atPath: " " , withIntermediateDirectories: true ) ) {
1288
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1288
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1289
1289
XCTAssertEqual ( code, . fileReadInvalidFileName)
1290
1290
}
1291
1291
XCTAssertFalse ( fm. createFile ( atPath: " " , contents: Data ( ) ) )
1292
1292
XCTAssertThrowsError ( try fm. removeItem ( atPath: " " ) ) {
1293
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1293
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1294
1294
XCTAssertEqual ( code, . fileReadInvalidFileName)
1295
1295
}
1296
1296
1297
1297
XCTAssertThrowsError ( try fm. copyItem ( atPath: " " , toPath: " /tmp/t " ) ) {
1298
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1298
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1299
1299
XCTAssertEqual ( code, . fileReadInvalidFileName)
1300
1300
}
1301
1301
XCTAssertThrowsError ( try fm. copyItem ( atPath: " " , toPath: " " ) ) {
1302
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1302
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1303
1303
XCTAssertEqual ( code, . fileReadInvalidFileName)
1304
1304
}
1305
1305
XCTAssertThrowsError ( try fm. copyItem ( atPath: " /tmp/t " , toPath: " " ) ) {
1306
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1306
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1307
1307
XCTAssertEqual ( code, . fileReadNoSuchFile)
1308
1308
}
1309
1309
1310
1310
XCTAssertThrowsError ( try fm. moveItem ( atPath: " " , toPath: " /tmp/t " ) ) {
1311
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1311
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1312
1312
XCTAssertEqual ( code, . fileReadInvalidFileName)
1313
1313
}
1314
1314
XCTAssertThrowsError ( try fm. moveItem ( atPath: " " , toPath: " " ) ) {
1315
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1315
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1316
1316
XCTAssertEqual ( code, . fileReadInvalidFileName)
1317
1317
}
1318
1318
XCTAssertThrowsError ( try fm. moveItem ( atPath: " /tmp/t " , toPath: " " ) ) {
1319
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1319
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1320
1320
XCTAssertEqual ( code, . fileReadInvalidFileName)
1321
1321
}
1322
1322
1323
1323
XCTAssertThrowsError ( try fm. linkItem ( atPath: " " , toPath: " /tmp/t " ) ) {
1324
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1324
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1325
1325
XCTAssertEqual ( code, . fileReadInvalidFileName)
1326
1326
}
1327
1327
XCTAssertThrowsError ( try fm. linkItem ( atPath: " " , toPath: " " ) ) {
1328
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1328
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1329
1329
XCTAssertEqual ( code, . fileReadInvalidFileName)
1330
1330
}
1331
1331
XCTAssertThrowsError ( try fm. linkItem ( atPath: " /tmp/t " , toPath: " " ) ) {
1332
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1332
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1333
1333
XCTAssertEqual ( code, . fileReadNoSuchFile)
1334
1334
}
1335
1335
1336
1336
XCTAssertThrowsError ( try fm. createSymbolicLink ( atPath: " " , withDestinationPath: " " ) ) {
1337
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1337
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1338
1338
XCTAssertEqual ( code, . fileReadInvalidFileName)
1339
1339
}
1340
1340
XCTAssertThrowsError ( try fm. createSymbolicLink ( atPath: " " , withDestinationPath: " /tmp/t " ) ) {
1341
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1341
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1342
1342
XCTAssertEqual ( code, . fileReadInvalidFileName)
1343
1343
}
1344
1344
XCTAssertThrowsError ( try fm. createSymbolicLink ( atPath: " /tmp/t " , withDestinationPath: " " ) ) {
1345
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1345
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1346
1346
XCTAssertEqual ( code, . fileReadInvalidFileName)
1347
1347
}
1348
1348
1349
1349
XCTAssertThrowsError ( try fm. destinationOfSymbolicLink ( atPath: " " ) ) {
1350
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1350
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1351
1351
XCTAssertEqual ( code, . fileReadInvalidFileName)
1352
1352
}
1353
1353
XCTAssertFalse ( fm. fileExists ( atPath: " " ) )
@@ -1358,15 +1358,15 @@ VIDEOS=StopgapVideos
1358
1358
XCTAssertTrue ( fm. isDeletableFile ( atPath: " " ) )
1359
1359
1360
1360
XCTAssertThrowsError ( try fm. attributesOfItem ( atPath: " " ) ) {
1361
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1361
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1362
1362
XCTAssertEqual ( code, . fileReadInvalidFileName)
1363
1363
}
1364
1364
XCTAssertThrowsError ( try fm. attributesOfFileSystem ( forPath: " " ) ) {
1365
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1365
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1366
1366
XCTAssertEqual ( code, . fileReadInvalidFileName)
1367
1367
}
1368
1368
XCTAssertThrowsError ( try fm. setAttributes ( [ : ] , ofItemAtPath: " " ) ) {
1369
- let code = CocoaError . Code ( rawValue: ( $0 as? NSError ) ! . code)
1369
+ let code = CocoaError . Code ( rawValue: ( $0 as NSError ) . code)
1370
1370
XCTAssertEqual ( code, . fileReadInvalidFileName)
1371
1371
}
1372
1372
0 commit comments