Skip to content

Commit

Permalink
Fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuniwak committed Jul 8, 2024
1 parent 394b971 commit fd296ce
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions Tests/AsyncChannelsTests/AsyncChannelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,32 +240,32 @@ final class AsyncTest: XCTestCase {
XCTAssertEqual(["foo", "bar"].sorted(), r.sorted())
}

func testDynamicVariadicSelect() async {
let a = Channel<String>()
let b = Channel<String>()
let result = Channel<String>(capacity: 2)

Task {
await a <- "foo"
await b <- "bar"
}

await select {
any(a, b) {
receive($0) { await result <- $0! }
func testDynamicVariadicSelect() async {
let a = Channel<String>()
let b = Channel<String>()
let result = Channel<String>(capacity: 2)

Task {
await a <- "foo"
await b <- "bar"
}
}

await select {
any(a, b) {
receive($0) { await result <- $0! }

await select {
any(a, b) {
receive($0) { await result <- $0! }
}
}

await select {
any(a, b) {
receive($0) { await result <- $0! }
}
}
result.close()

let r = await result.reduce(into: []) { $0.append($1) }
XCTAssertEqual(["foo", "bar"].sorted(), r.sorted())
}
result.close()

let r = await result.reduce(into: []) { $0.append($1) }
XCTAssertEqual(["foo", "bar"].sorted(), r.sorted())
}

func testBufferSelect() async {
let c = Channel<String>(capacity: 3)
Expand Down

0 comments on commit fd296ce

Please sign in to comment.