File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-concurrency -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s --dump-input always
2
2
// REQUIRES: executable_test
3
3
// REQUIRES: concurrency
4
- // REQUIRES: libdispatch
5
4
6
5
// rdar://76038845
7
6
// REQUIRES: concurrency_runtime
8
7
// UNSUPPORTED: back_deployment_runtime
9
8
10
9
import _Concurrency
10
+ #if canImport(Dispatch)
11
11
// FIXME: should not depend on Dispatch
12
12
import Dispatch
13
+ #endif
13
14
14
15
@available ( SwiftStdlib 5 . 5 , * )
15
16
@main struct Main {
@@ -21,6 +22,7 @@ import Dispatch
21
22
}
22
23
23
24
static func testSleepDuration( ) async {
25
+ #if canImport(Dispatch)
24
26
let start = DispatchTime . now ( )
25
27
26
28
await Task . sleep ( UInt64 ( pause) )
@@ -29,6 +31,7 @@ import Dispatch
29
31
30
32
// assert that at least the specified time passed since calling `sleep`
31
33
assert ( stop >= ( start + . nanoseconds( pause) ) )
34
+ #endif
32
35
}
33
36
34
37
static func testSleepDoesNotBlock( ) async {
You can’t perform that action at this time.
0 commit comments