Skip to content

Commit 6a87399

Browse files
committed
Merge pull request #1210 from glessard/string-validation-test-predicates
[test] more accurate skip conditions in String validation tests
2 parents 2b55fc8 + 99b703e commit 6a87399

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

validation-test/stdlib/String.swift

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ StringTests.test("ForeignIndexes/Valid") {
122122

123123
StringTests.test("ForeignIndexes/UnexpectedCrash")
124124
.xfail(
125-
.Custom({ true },
126-
reason: "<rdar://problem/18029290> String.Index caches the grapheme " +
125+
.Always("<rdar://problem/18029290> String.Index caches the grapheme " +
127126
"cluster size, but it is not always correct to use"))
128127
.code {
129128

@@ -243,7 +242,7 @@ StringTests.test("_splitFirst") {
243242
}
244243

245244
StringTests.test("hasPrefix")
246-
.skip(.LinuxAny(reason: "hasPrefix unavailable"))
245+
.skip(.NativeRuntime("String.hasPrefix undefined without _runtime(_ObjC)"))
247246
.code {
248247
#if _runtime(_ObjC)
249248
expectFalse("".hasPrefix(""))
@@ -614,7 +613,7 @@ func asciiString<
614613
}
615614

616615
StringTests.test("stringCoreExtensibility")
617-
.skip(.LinuxAny(reason: "Foundation dependency"))
616+
.skip(.NativeRuntime("Foundation dependency"))
618617
.code {
619618
#if _runtime(_ObjC)
620619
let ascii = UTF16.CodeUnit(UnicodeScalar("X").value)
@@ -655,7 +654,7 @@ StringTests.test("stringCoreExtensibility")
655654
}
656655

657656
StringTests.test("stringCoreReserve")
658-
.skip(.LinuxAny(reason: "Foundation dependency"))
657+
.skip(.NativeRuntime("Foundation dependency"))
659658
.code {
660659
#if _runtime(_ObjC)
661660
for k in 0...5 {
@@ -912,7 +911,7 @@ StringTests.test("Conversions") {
912911
// Check the internal functions are correct for ASCII values
913912
StringTests.test(
914913
"forall x: Int8, y: Int8 . x < 128 ==> x <ascii y == x <unicode y")
915-
.skip(.LinuxAny(reason: "String._compareASCII defined when _runtime(_ObjC)"))
914+
.skip(.NativeRuntime("String._compareASCII undefined without _runtime(_ObjC)"))
916915
.code {
917916
#if _runtime(_ObjC)
918917
let asciiDomain = (0..<128).map({ String(UnicodeScalar($0)) })
@@ -1065,7 +1064,7 @@ StringTests.test("unicodeViews") {
10651064
// Validate that index conversion does something useful for Cocoa
10661065
// programmers.
10671066
StringTests.test("indexConversion")
1068-
.skip(.LinuxAny(reason: "Foundation dependency"))
1067+
.skip(.NativeRuntime("Foundation dependency"))
10691068
.code {
10701069
#if _runtime(_ObjC)
10711070
let re : NSRegularExpression

0 commit comments

Comments
 (0)