File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking -parse-as-library) | %FileCheck %s
2
2
// TODO: move to target-run-simple-leaks-swift once CI is using at least Xcode 14.3
3
3
4
- // This test uses `leaks` which is only available on apple platforms; limit it to macOS:
5
- // REQUIRES: OS=macosx
4
+ // Task group addTask is not supported in freestanding mode
5
+ // UNSUPPORTED: freestanding
6
6
7
7
// REQUIRES: executable_test
8
8
// REQUIRES: concurrency
9
9
10
10
// REQUIRES: concurrency_runtime
11
11
// UNSUPPORTED: back_deployment_runtime
12
12
13
- import Darwin
14
-
15
13
final class Something {
16
14
let int : Int
17
15
init ( int: Int ) {
18
16
self . int = int
19
17
}
20
18
21
19
deinit {
22
- print ( " deinit, Something, int: \( int) " )
20
+ print ( " deinit, Something, int: \( self . int) " )
23
21
}
24
22
}
25
23
26
24
func test_taskGroup_next( ) async {
27
25
let tasks = 5
28
26
_ = await withTaskGroup ( of: Something . self, returning: Int . self) { group in
29
27
for n in 0 ..< tasks {
30
- group. spawn {
28
+ group. addTask {
31
29
Something ( int: n)
32
30
}
33
31
}
You can’t perform that action at this time.
0 commit comments