@@ -1213,16 +1213,16 @@ class TestNSString : XCTestCase {
12131213struct ComparisonTest {
12141214 enum TestBehavior {
12151215 case run
1216- case xfail ( String )
1216+ case expectedFailure ( String )
12171217 case skip( String )
12181218 }
12191219 let lhs : String
12201220 let rhs : String
12211221 let loc : UInt
12221222 let behavior : TestBehavior
12231223
1224- var xfail : Bool {
1225- if case . xfail = behavior {
1224+ var expectedFailure : Bool {
1225+ if case . expectedFailure = behavior {
12261226 return true
12271227 } else {
12281228 return false
@@ -1231,11 +1231,11 @@ struct ComparisonTest {
12311231
12321232 init (
12331233 _ lhs: String , _ rhs: String ,
1234- xfail reason: String = " " , line: UInt = #line
1234+ expectedFailure reason: String = " " , line: UInt = #line
12351235 ) {
12361236 self . lhs = lhs
12371237 self . rhs = rhs
1238- self . behavior = xfail . isEmpty ? . run : . xfail ( reason)
1238+ self . behavior = expectedFailure . isEmpty ? . run : . expectedFailure ( reason)
12391239 self . loc = line
12401240 }
12411241
@@ -1260,12 +1260,12 @@ let comparisonTests = [
12601260 ComparisonTest ( " \u{0} " , " " ,
12611261 skip: " rdar://problem/37686816 " ) ,
12621262 ComparisonTest ( " \u{0} " , " \u{0} " ,
1263- xfail : " https://bugs.swift.org/browse/SR-332 " ) ,
1263+ expectedFailure : " https://bugs.swift.org/browse/SR-332 " ) ,
12641264 ComparisonTest ( " \r \n " , " t " ) ,
12651265 ComparisonTest ( " \r \n " , " \n " ,
1266- xfail : " blocked on rdar://problem/19036555 " ) ,
1266+ expectedFailure : " blocked on rdar://problem/19036555 " ) ,
12671267 ComparisonTest ( " \u{0} " , " \u{0} \u{0} " ,
1268- xfail : " rdar://problem/19034601 " ) ,
1268+ expectedFailure : " rdar://problem/19034601 " ) ,
12691269
12701270 // Whitespace
12711271 // U+000A LINE FEED (LF)
@@ -1329,7 +1329,7 @@ let comparisonTests = [
13291329 // U+1F1E7 REGIONAL INDICATOR SYMBOL LETTER B
13301330 // \u{1F1E7}\u{1F1E7} Flag of Barbados
13311331 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 " ) ,
13331333
13341334 // Test that Unicode collation is performed in deterministic mode.
13351335 //
@@ -1345,7 +1345,7 @@ let comparisonTests = [
13451345 // U+0301 and U+0954 don't decompose in the canonical decomposition mapping.
13461346 // U+0341 has a canonical decomposition mapping of U+0301.
13471347 ComparisonTest ( " \u{0301} " , " \u{0341} " ,
1348- xfail : " https://bugs.swift.org/browse/SR-243 " ) ,
1348+ expectedFailure : " https://bugs.swift.org/browse/SR-243 " ) ,
13491349 ComparisonTest ( " \u{0301} " , " \u{0954} " ) ,
13501350 ComparisonTest ( " \u{0341} " , " \u{0954} " ) ,
13511351]
@@ -1424,9 +1424,9 @@ extension TestNSString {
14241424 let fail = ( failures > 0 )
14251425 if fail {
14261426 // print("Prefix/Suffix case \(test.loc): \(failures) failures")
1427- // print("Failures were\(test.xfail ? "" : " not") expected")
1427+ // print("Failures were\(test.expectedFailure ? "" : " not") expected")
14281428 }
1429- XCTAssert ( test. xfail == fail, " Unexpected \( test. xfail ? " success " : " failure " ) : \( test. loc) " )
1429+ XCTAssert ( test. expectedFailure == fail, " Unexpected \( test. expectedFailure ? " success " : " failure " ) : \( test. loc) " )
14301430 }
14311431 }
14321432}
0 commit comments