mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-29 04:54:21 +00:00
Clear up CI issues and testing failures (#365)
* Conditionalize the testing targets for non-windows targets to avoid the TaskDriver requirements * Some driveby formatting fixes and remove the freebsd target since that is not supported in swiftpm yet * Rework validation import conditions to dependency conditionals * Exclude 5.9 workflows and enable macOS testing scheme for CI * Additional ifdefing out non windows targets for sequence diagram testing and more formatting fixes
This commit is contained in:
1 parent
18e2398481
commit
ca38935fc0
12 files changed
+110
-12
No files matched your search
@@ -108,6 +108,7 @@ final class TestBuffer: XCTestCase {
|
||||
XCTAssertNil(pastFailure)
|
||||
}
|
||||
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
func test_given_a_base_sequence_when_bufferingOldest_then_the_policy_is_applied() async {
|
||||
validate {
|
||||
"X-12- 34- 5 |"
|
||||
@@ -171,6 +172,7 @@ final class TestBuffer: XCTestCase {
|
||||
"X,,,,,,[45^]"
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
func
|
||||
test_given_a_buffered_with_unbounded_sequence_when_cancelling_consumer_then_the_iteration_finishes_and_the_base_is_cancelled()
|
||||
@@ -325,6 +327,7 @@ final class TestBuffer: XCTestCase {
|
||||
await fulfillment(of: [finished], timeout: 1.0)
|
||||
}
|
||||
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
func test_given_a_base_sequence_when_bounded_with_limit_0_then_the_policy_is_transparent() async {
|
||||
validate {
|
||||
"X-12- 34 -5|"
|
||||
@@ -332,4 +335,5 @@ final class TestBuffer: XCTestCase {
|
||||
"X-12- 34 -5|"
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -10,6 +10,9 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import XCTest
|
||||
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
|
||||
import AsyncSequenceValidation
|
||||
import AsyncAlgorithms
|
||||
|
||||
@@ -334,3 +337,5 @@ final class TestChunk: XCTestCase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -13,6 +13,7 @@ import XCTest
|
||||
import AsyncAlgorithms
|
||||
|
||||
final class TestDebounce: XCTestCase {
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
func test_delayingValues() throws {
|
||||
guard #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) else {
|
||||
throw XCTSkip("Skipped due to Clock/Instant/Duration availability")
|
||||
@@ -67,6 +68,7 @@ final class TestDebounce: XCTestCase {
|
||||
"----|"
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
func test_Rethrows() async throws {
|
||||
guard #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) else {
|
||||
|
||||
@@ -170,6 +170,7 @@ final class TestMerge2: XCTestCase {
|
||||
XCTAssertEqual(collected.intersection(expected), expected)
|
||||
}
|
||||
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
func test_merge_makes_sequence_with_ordered_elements_when_sources_follow_a_timeline() {
|
||||
validate {
|
||||
"a-c-e-g-|"
|
||||
@@ -178,6 +179,7 @@ final class TestMerge2: XCTestCase {
|
||||
"abcdefgh|"
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
func test_merge_finishes_when_iteration_task_is_cancelled() async {
|
||||
let source1 = Indefinite(value: "test1")
|
||||
@@ -508,6 +510,7 @@ final class TestMerge3: XCTestCase {
|
||||
XCTAssertEqual(collected.intersection(expected), expected)
|
||||
}
|
||||
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
func test_merge_makes_sequence_with_ordered_elements_when_sources_follow_a_timeline() {
|
||||
validate {
|
||||
"a---e---|"
|
||||
@@ -517,6 +520,7 @@ final class TestMerge3: XCTestCase {
|
||||
"abcdefgh|"
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
func test_merge_finishes_when_iteration_task_is_cancelled() async {
|
||||
let source1 = Indefinite(value: "test1")
|
||||
|
||||
@@ -13,6 +13,7 @@ import XCTest
|
||||
import AsyncAlgorithms
|
||||
|
||||
final class TestThrottle: XCTestCase {
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
func test_rate_0() throws {
|
||||
guard #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) else {
|
||||
throw XCTSkip("Skipped due to Clock/Instant/Duration availability")
|
||||
@@ -188,4 +189,5 @@ final class TestThrottle: XCTestCase {
|
||||
"a--d--g--j--[l|]"
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -10,6 +10,9 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import XCTest
|
||||
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
|
||||
import AsyncAlgorithms
|
||||
import AsyncSequenceValidation
|
||||
|
||||
@@ -57,3 +60,5 @@ final class TestTimer: XCTestCase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -10,6 +10,9 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import XCTest
|
||||
|
||||
#if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) || canImport(wasi_pthread)
|
||||
|
||||
import AsyncAlgorithms
|
||||
import AsyncSequenceValidation
|
||||
@testable import AsyncAlgorithms_XCTest
|
||||
@@ -354,3 +357,5 @@ struct LaggingAsyncSequence<Base: AsyncSequence, C: Clock>: AsyncSequence {
|
||||
self.clock = clock
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user