Skip to content

Commit 376a9a8

Browse files
committed
unlock test: async_taskgroup_asynciterator_semantics
1 parent 383c62f commit 376a9a8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/Concurrency/Runtime/async_taskgroup_asynciterator_semantics.swift

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// UNSUPPORTED: back_deployment_runtime
77
// UNSUPPORTED: OS=linux-gnu
88

9-
// REQUIRES: rdar86028226
10-
119
struct Boom: Error {}
1210

1311
func boom() async throws -> Int {
@@ -18,7 +16,7 @@ func boom() async throws -> Int {
1816
func test_taskGroup_next() async {
1917
let sum = await withThrowingTaskGroup(of: Int.self, returning: Int.self) { group in
2018
for n in 1...10 {
21-
group.spawn {
19+
group.addTask {
2220
return n.isMultiple(of: 3) ? try await boom() : n
2321
}
2422
}
@@ -51,7 +49,7 @@ func test_taskGroup_next() async {
5149
func test_taskGroup_for_in() async {
5250
let sum = await withThrowingTaskGroup(of: Int.self, returning: Int.self) { group in
5351
for n in 1...10 {
54-
group.spawn {
52+
group.addTask {
5553
return n.isMultiple(of: 3) ? try await boom() : n
5654
}
5755
}
@@ -82,7 +80,7 @@ func test_taskGroup_for_in() async {
8280
func test_taskGroup_asyncIterator() async {
8381
let sum = await withThrowingTaskGroup(of: Int.self, returning: Int.self) { group in
8482
for n in 1...10 {
85-
group.spawn {
83+
group.addTask {
8684
return n.isMultiple(of: 3) ? try await boom() : n
8785
}
8886
}
@@ -120,7 +118,7 @@ func test_taskGroup_asyncIterator() async {
120118
func test_taskGroup_contains() async {
121119
let sum = await withTaskGroup(of: Int.self, returning: Int.self) { group in
122120
for n in 1...4 {
123-
group.spawn {
121+
group.addTask {
124122
return n
125123
}
126124
}
@@ -129,7 +127,7 @@ func test_taskGroup_contains() async {
129127
print("three = \(three)") // CHECK: three = true
130128

131129
for n in 5...7 {
132-
group.spawn {
130+
group.addTask {
133131
return n
134132
}
135133
}

0 commit comments

Comments
 (0)