Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ jobs:
name: tests
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
with:
# Runners aren't set up for this currently in GitHub/PassiveLogic
enable_macos_checks: false

linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"5.10.1\"}, {\"swift_version\": \"6.0\"}]"
enable_windows_checks: false
enable_wasm_sdk_build: true

# TODO: Fix swift embedded, see https://github.com/PassiveLogic/swift-dispatch-async/issues/4
enable_embedded_wasm_sdk_build: false

wasm-sdk:
name: WebAssembly SDK
Expand Down
16 changes: 8 additions & 8 deletions Tests/DispatchAsyncTests/DispatchGroupTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ private typealias DispatchQueue = DispatchAsync.DispatchQueue
@Suite("DispatchGroup Tests")
struct DispatchGroupTests {
@Test(arguments: [1000])
@available(macOS 13, iOS 16, tvOS 16, watchOS 9, *)
func dispatchGroupOrderCleanliness(repetitions: Int) async throws {
// Repeating this `repetitions` number of times to help rule out
// edge cases that only show up some of the time
for index in 0 ..< repetitions {
@available(macOS 13, iOS 16, tvOS 16, watchOS 9, *)
func dispatchGroupOrderCleanliness(repetitions: Int) async throws {
// Repeating this `repetitions` number of times to help rule out
// edge cases that only show up some of the time
for index in 0 ..< repetitions {
Task {
actor Result {
private(set) var value = ""
Expand All @@ -44,7 +44,7 @@ struct DispatchGroupTests {
let result = Result()

let group = DispatchGroup()
await result.append(value: "|🔵\(iteration)")
await result.append(value: "|🔵\(index)")

group.enter()
Task {
Expand All @@ -67,7 +67,7 @@ struct DispatchGroupTests {
await withCheckedContinuation { continuation in
group.notify(queue: .main) {
Task {
await result.append(value: "🟢\(iteration)=")
await result.append(value: "🟢\(index)=")
continuation.resume()
}
}
Expand Down Expand Up @@ -115,7 +115,7 @@ struct DispatchGroupTests {
/// ```
///
/// ```
/// // BAD! (green globe comes before a purle one)
/// // BAD! (green globe comes before a purple one)
/// |🔵42🟣/🟣^🟢42🟣\=
/// ```
///
Expand Down