Skip to content

[test] more accurate skip conditions in String validation tests #1210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions validation-test/stdlib/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ StringTests.test("ForeignIndexes/Valid") {

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

Expand Down Expand Up @@ -243,7 +242,7 @@ StringTests.test("_splitFirst") {
}

StringTests.test("hasPrefix")
.skip(.LinuxAny(reason: "hasPrefix unavailable"))
.skip(.NativeRuntime("String.hasPrefix undefined without _runtime(_ObjC)"))
.code {
#if _runtime(_ObjC)
expectFalse("".hasPrefix(""))
Expand Down Expand Up @@ -614,7 +613,7 @@ func asciiString<
}

StringTests.test("stringCoreExtensibility")
.skip(.LinuxAny(reason: "Foundation dependency"))
.skip(.NativeRuntime("Foundation dependency"))
.code {
#if _runtime(_ObjC)
let ascii = UTF16.CodeUnit(UnicodeScalar("X").value)
Expand Down Expand Up @@ -655,7 +654,7 @@ StringTests.test("stringCoreExtensibility")
}

StringTests.test("stringCoreReserve")
.skip(.LinuxAny(reason: "Foundation dependency"))
.skip(.NativeRuntime("Foundation dependency"))
.code {
#if _runtime(_ObjC)
for k in 0...5 {
Expand Down Expand Up @@ -912,7 +911,7 @@ StringTests.test("Conversions") {
// Check the internal functions are correct for ASCII values
StringTests.test(
"forall x: Int8, y: Int8 . x < 128 ==> x <ascii y == x <unicode y")
.skip(.LinuxAny(reason: "String._compareASCII defined when _runtime(_ObjC)"))
.skip(.NativeRuntime("String._compareASCII undefined without _runtime(_ObjC)"))
.code {
#if _runtime(_ObjC)
let asciiDomain = (0..<128).map({ String(UnicodeScalar($0)) })
Expand Down Expand Up @@ -1065,7 +1064,7 @@ StringTests.test("unicodeViews") {
// Validate that index conversion does something useful for Cocoa
// programmers.
StringTests.test("indexConversion")
.skip(.LinuxAny(reason: "Foundation dependency"))
.skip(.NativeRuntime("Foundation dependency"))
.code {
#if _runtime(_ObjC)
let re : NSRegularExpression
Expand Down