Files
swift-mirror/test/Concurrency/Runtime/async_taskgroup_is_asyncsequence.swift
Konrad `ktoso` Malawski eb8fc8c70f [Concurrency] disable async_taskgroup_is_asyncsequence on windows
It seems this test not only has issues on Linux but also windows.
https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019/4488/console


Disable for now, until we're able to fix it.
2021-02-27 11:13:20 +09:00

44 lines
803 B
Swift

// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-concurrency -parse-as-library) | %FileCheck %s --dump-input=always
// REQUIRES: executable_test
// REQUIRES: concurrency
// XFAIL: linux
// XFAIL: windows
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import Glibc
#endif
func test_taskGroup_is_asyncSequence() async {
let sum: Int = try! await Task.withGroup(resultType: Int.self) { group in
for n in 1...10 {
await group.add {
print("add \(n)")
return n
}
}
var sum = 0
for try await r in group { // here
print("next: \(r)")
sum += r
}
return sum
}
// CHECK: result: 55
print("result: \(sum)")
}
@main struct Main {
static func main()
async {
await test_taskGroup_is_asyncSequence()
}
}