Skip to content

Commit 3bbbc09

Browse files
bob-wilsontkremenek
authored andcommitted
[overlay] adding if #available(...) to Intents test (#3748)
1 parent fe0ca8c commit 3bbbc09

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

test/1_stdlib/Intents.swift

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,20 @@
55
// UNSUPPORTED: OS=watchos
66
// UNSUPPORTED: OS=tvos
77

8-
// FIXME: due to the lack of availability attributes in the SDK this test does
9-
// not fail on macOS Sierra, but does fail on El Capitan. Marking macOS
10-
// as unsupported for now.
11-
// UNSUPPORTED: OS=macosx
12-
138
import Intents
149
import StdlibUnittest
1510

1611
let IntentsTestSuite = TestSuite("Intents")
1712

18-
IntentsTestSuite.test("ErrorDomain") {
19-
expectEqual("IntentsErrorDomain", INIntentErrorDomain)
20-
}
13+
if #available(OSX 10.12, iOS 10.0, *) {
14+
15+
IntentsTestSuite.test("ErrorDomain") {
16+
expectEqual("IntentsErrorDomain", INIntentErrorDomain)
17+
}
2118

22-
IntentsTestSuite.test("extension") {
23-
expectEqual("IntentsErrorDomain", INIntentError._nsErrorDomain)
19+
IntentsTestSuite.test("extension") {
20+
expectEqual("IntentsErrorDomain", INIntentError._nsErrorDomain)
21+
}
2422
}
2523

2624
runAllTests()

0 commit comments

Comments
 (0)