@@ -348,7 +348,6 @@ class TestFileManager : XCTestCase {
348
348
}
349
349
350
350
func test_fileSystemAttributes( ) {
351
- #if !os(Android)
352
351
let fm = FileManager . default
353
352
let path = NSTemporaryDirectory ( )
354
353
@@ -379,7 +378,6 @@ class TestFileManager : XCTestCase {
379
378
} catch {
380
379
XCTFail ( " \( error) " )
381
380
}
382
- #endif
383
381
}
384
382
385
383
func test_setFileAttributes( ) {
@@ -1084,7 +1082,7 @@ class TestFileManager : XCTestCase {
1084
1082
try testCopy ( )
1085
1083
}
1086
1084
1087
- #if !DEPLOYMENT_RUNTIME_OBJC // XDG tests require swift-corelibs-foundation
1085
+ #if !DEPLOYMENT_RUNTIME_OBJC && !os(Android) // XDG tests require swift-corelibs-foundation
1088
1086
1089
1087
#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT // These are white box tests for the internals of XDG parsing:
1090
1088
func test_xdgStopgapsCoverAllConstants( ) {
@@ -1201,16 +1199,9 @@ VIDEOS=StopgapVideos
1201
1199
#endif // NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
1202
1200
1203
1201
// This test below is a black box test, and does not require @testable import.
1204
-
1205
- enum TestError : Error {
1206
- case notImplementedOnThisPlatform
1207
- }
1208
-
1202
+
1203
+ #if !os(Android)
1209
1204
func printPathByRunningHelper( withConfiguration config: String , method: String , identifier: String ) throws -> String {
1210
- #if os(Android)
1211
- throw TestError . notImplementedOnThisPlatform
1212
- #endif
1213
-
1214
1205
let uuid = UUID ( ) . uuidString
1215
1206
let path = URL ( fileURLWithPath: NSTemporaryDirectory ( ) ) . appendingPathComponent ( " org.swift.Foundation.XDGTestHelper " ) . appendingPathComponent ( uuid)
1216
1207
try FileManager . default. createDirectory ( at: path, withIntermediateDirectories: true )
@@ -1268,6 +1259,7 @@ VIDEOS=StopgapVideos
1268
1259
assertFetchingPath ( withConfiguration: configuration, identifier: " pictures " , yields: " \( prefix) /Pictures " )
1269
1260
assertFetchingPath ( withConfiguration: configuration, identifier: " videos " , yields: " \( prefix) /Videos " )
1270
1261
}
1262
+ #endif // !os(Android)
1271
1263
#endif // !DEPLOYMENT_RUNTIME_OBJC
1272
1264
1273
1265
func test_emptyFilename( ) {
@@ -1565,15 +1557,15 @@ VIDEOS=StopgapVideos
1565
1557
( " test_displayNames " , test_displayNames) ,
1566
1558
]
1567
1559
1568
- #if !DEPLOYMENT_RUNTIME_OBJC && NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
1560
+ #if !DEPLOYMENT_RUNTIME_OBJC && NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT && !os(Android)
1569
1561
tests. append ( contentsOf: [
1570
1562
( " test_xdgStopgapsCoverAllConstants " , test_xdgStopgapsCoverAllConstants) ,
1571
1563
( " test_parseXDGConfiguration " , test_parseXDGConfiguration) ,
1572
1564
( " test_xdgURLSelection " , test_xdgURLSelection) ,
1573
1565
] )
1574
1566
#endif
1575
1567
1576
- #if !DEPLOYMENT_RUNTIME_OBJC
1568
+ #if !DEPLOYMENT_RUNTIME_OBJC && !os(Android)
1577
1569
tests. append ( contentsOf: [
1578
1570
( " test_fetchXDGPathsFromHelper " , test_fetchXDGPathsFromHelper) ,
1579
1571
] )
0 commit comments