@@ -1213,16 +1213,16 @@ class TestNSString : XCTestCase {
1213
1213
struct ComparisonTest {
1214
1214
enum TestBehavior {
1215
1215
case run
1216
- case xfail ( String )
1216
+ case expectedFailure ( String )
1217
1217
case skip( String )
1218
1218
}
1219
1219
let lhs : String
1220
1220
let rhs : String
1221
1221
let loc : UInt
1222
1222
let behavior : TestBehavior
1223
1223
1224
- var xfail : Bool {
1225
- if case . xfail = behavior {
1224
+ var expectedFailure : Bool {
1225
+ if case . expectedFailure = behavior {
1226
1226
return true
1227
1227
} else {
1228
1228
return false
@@ -1231,11 +1231,11 @@ struct ComparisonTest {
1231
1231
1232
1232
init (
1233
1233
_ lhs: String , _ rhs: String ,
1234
- xfail reason: String = " " , line: UInt = #line
1234
+ expectedFailure reason: String = " " , line: UInt = #line
1235
1235
) {
1236
1236
self . lhs = lhs
1237
1237
self . rhs = rhs
1238
- self . behavior = xfail . isEmpty ? . run : . xfail ( reason)
1238
+ self . behavior = expectedFailure . isEmpty ? . run : . expectedFailure ( reason)
1239
1239
self . loc = line
1240
1240
}
1241
1241
@@ -1260,12 +1260,12 @@ let comparisonTests = [
1260
1260
ComparisonTest ( " \u{0} " , " " ,
1261
1261
skip: " rdar://problem/37686816 " ) ,
1262
1262
ComparisonTest ( " \u{0} " , " \u{0} " ,
1263
- xfail : " https://bugs.swift.org/browse/SR-332 " ) ,
1263
+ expectedFailure : " https://bugs.swift.org/browse/SR-332 " ) ,
1264
1264
ComparisonTest ( " \r \n " , " t " ) ,
1265
1265
ComparisonTest ( " \r \n " , " \n " ,
1266
- xfail : " blocked on rdar://problem/19036555 " ) ,
1266
+ expectedFailure : " blocked on rdar://problem/19036555 " ) ,
1267
1267
ComparisonTest ( " \u{0} " , " \u{0} \u{0} " ,
1268
- xfail : " rdar://problem/19034601 " ) ,
1268
+ expectedFailure : " rdar://problem/19034601 " ) ,
1269
1269
1270
1270
// Whitespace
1271
1271
// U+000A LINE FEED (LF)
@@ -1329,7 +1329,7 @@ let comparisonTests = [
1329
1329
// U+1F1E7 REGIONAL INDICATOR SYMBOL LETTER B
1330
1330
// \u{1F1E7}\u{1F1E7} Flag of Barbados
1331
1331
ComparisonTest ( " \u{1F1E7} " , " \u{1F1E7} \u{1F1E7} " ,
1332
- xfail : " https://bugs.swift.org/browse/SR-367 " ) ,
1332
+ expectedFailure : " https://bugs.swift.org/browse/SR-367 " ) ,
1333
1333
1334
1334
// Test that Unicode collation is performed in deterministic mode.
1335
1335
//
@@ -1345,7 +1345,7 @@ let comparisonTests = [
1345
1345
// U+0301 and U+0954 don't decompose in the canonical decomposition mapping.
1346
1346
// U+0341 has a canonical decomposition mapping of U+0301.
1347
1347
ComparisonTest ( " \u{0301} " , " \u{0341} " ,
1348
- xfail : " https://bugs.swift.org/browse/SR-243 " ) ,
1348
+ expectedFailure : " https://bugs.swift.org/browse/SR-243 " ) ,
1349
1349
ComparisonTest ( " \u{0301} " , " \u{0954} " ) ,
1350
1350
ComparisonTest ( " \u{0341} " , " \u{0954} " ) ,
1351
1351
]
@@ -1424,9 +1424,9 @@ extension TestNSString {
1424
1424
let fail = ( failures > 0 )
1425
1425
if fail {
1426
1426
// print("Prefix/Suffix case \(test.loc): \(failures) failures")
1427
- // print("Failures were\(test.xfail ? "" : " not") expected")
1427
+ // print("Failures were\(test.expectedFailure ? "" : " not") expected")
1428
1428
}
1429
- XCTAssert ( test. xfail == fail, " Unexpected \( test. xfail ? " success " : " failure " ) : \( test. loc) " )
1429
+ XCTAssert ( test. expectedFailure == fail, " Unexpected \( test. expectedFailure ? " success " : " failure " ) : \( test. loc) " )
1430
1430
}
1431
1431
}
1432
1432
}
0 commit comments