@@ -96,7 +96,6 @@ class TestNSString : XCTestCase {
96
96
( " test_mutableStringConstructor " , test_mutableStringConstructor) ,
97
97
( " test_emptyStringPrefixAndSuffix " , test_emptyStringPrefixAndSuffix) ,
98
98
( " test_PrefixSuffix " , test_PrefixSuffix) ,
99
- ( " test_utf16StringRangeCount " , test_StringUTF16ViewIndexStrideableRange) ,
100
99
( " test_reflection " , { _ in test_reflection } ) ,
101
100
( " test_replacingOccurrences " , test_replacingOccurrences) ,
102
101
( " test_getLineStart " , test_getLineStart) ,
@@ -1070,34 +1069,6 @@ class TestNSString : XCTestCase {
1070
1069
}
1071
1070
}
1072
1071
1073
- //[SR-1988] Ranges of String.UTF16View.Index have negative count
1074
- func test_StringUTF16ViewIndexStrideableRange( ) {
1075
- let testStrings = [ " " , " \u{0000} " , " a " , " aa " , " ab " , " \u{007f} " , " \u{0430} " , " \u{0430} \u{0431} \u{0432} " , " \u{1f425} " ]
1076
-
1077
- func checkStrideable< S : Strideable > (
1078
- instances: [ S ] ,
1079
- distances: [ S . Stride ] ,
1080
- distanceOracle: ( Int , Int ) -> S . Stride
1081
- ) {
1082
- for i in instances. indices {
1083
- let first = instances [ i]
1084
- for j in instances. indices {
1085
- let second = instances [ j]
1086
- XCTAssertTrue ( distanceOracle ( i, j) == first. distance ( to: second) )
1087
- XCTAssertTrue ( second == first. advanced ( by: distanceOracle ( i, j) ) )
1088
- }
1089
- }
1090
- }
1091
- testStrings. forEach {
1092
- let utf16 = $0. utf16
1093
- var indicies = Array ( utf16. indices)
1094
- indicies. append ( utf16. indices. endIndex)
1095
- checkStrideable ( instances: indicies,
1096
- distances: Array ( 0 ..< utf16. count) ,
1097
- distanceOracle: { $1 - $0} )
1098
- }
1099
- }
1100
-
1101
1072
func test_mutableStringConstructor( ) {
1102
1073
let mutableString = NSMutableString ( string: " Test " )
1103
1074
XCTAssertEqual ( mutableString, " Test " )
0 commit comments