From 365da17b2e871d80024bc076f68be690448625af Mon Sep 17 00:00:00 2001 From: Kyle Date: Wed, 27 Dec 2023 12:19:50 +0800 Subject: [PATCH] Fix watchOS and tvOS CI build issue --- Package@swift-5.9.swift | 114 ++++++++++++++++++ .../AnyCancellableTests.swift | 2 +- .../OpenCombineTests/AnyPublisherTests.swift | 4 +- .../OpenCombineTests/AnySubscriberTests.swift | 16 +-- .../CombineIdentifierTests.swift | 2 +- .../CurrentValueSubjectTests.swift | 2 +- .../DispatchQueueSchedulerTests.swift | 6 +- .../FoundationTests/JSONDecoderTests.swift | 2 +- .../FoundationTests/JSONEncoderTests.swift | 2 +- .../NotificationCenterTests.swift | 4 +- .../OperationQueueSchedulerTests.swift | 12 +- .../PropertyListDecoderTests.swift | 2 +- .../PropertyListEncoderTests.swift | 2 +- .../RunLoopSchedulerTests.swift | 14 +-- .../FoundationTests/TimerPublisherTests.swift | 4 +- .../FoundationTests/URLSessionTests.swift | 22 ++-- .../Helpers/AutomaticallyFinish.swift | 6 +- .../Helpers/CleaningUpSubscriber.swift | 2 +- .../Helpers/CommonTests.swift | 6 +- .../Helpers/CustomPublisher.swift | 10 +- .../Helpers/CustomSubscription.swift | 4 +- .../Helpers/OperatorTestHelper.swift | 2 +- .../Helpers/TestLifecycle.swift | 2 +- .../Helpers/TestReflection.swift | 4 +- .../Helpers/TrackingCollection.swift | 2 +- .../Helpers/TrackingIntrospection.swift | 18 +-- .../Helpers/TrackingSubscriber.swift | 24 ++-- .../Helpers/VirtualTimeScheduler.swift | 4 +- .../ImmediateSchedulerTests.swift | 2 +- .../OpenCombineTests/IntrospectionTests.swift | 6 +- .../ObservableObjectPublisherTests.swift | 2 +- .../ObservableObjectTests.swift | 40 +++--- .../PassthroughSubjectTests.swift | 2 +- Tests/OpenCombineTests/PublishedTests.swift | 14 +-- Tests/OpenCombineTests/PublisherTests.swift | 2 +- .../PublisherTests/AllSatisfyTests.swift | 2 +- .../PublisherTests/AssertNoFailureTests.swift | 2 +- .../PublisherTests/AutoconnectTests.swift | 2 +- .../PublisherTests/BreakpointTests.swift | 2 +- .../PublisherTests/BufferTests.swift | 2 +- .../PublisherTests/CatchTests.swift | 2 +- .../PublisherTests/CollectByCountTests.swift | 2 +- .../PublisherTests/CollectTests.swift | 2 +- .../PublisherTests/CompactMapTests.swift | 2 +- .../PublisherTests/ComparisonTests.swift | 2 +- .../PublisherTests/ConcatenateTests.swift | 2 +- .../PublisherTests/ContainsTests.swift | 2 +- .../PublisherTests/CountTests.swift | 2 +- .../PublisherTests/DebounceTests.swift | 2 +- .../PublisherTests/DeferredTests.swift | 2 +- .../PublisherTests/DelayTests.swift | 2 +- .../PublisherTests/DropTests.swift | 2 +- .../PublisherTests/DropUntilOutputTests.swift | 2 +- .../PublisherTests/DropWhileTests.swift | 2 +- .../PublisherTests/EmptyTests.swift | 2 +- .../PublisherTests/EncodeTests.swift | 2 +- .../PublisherTests/FailTests.swift | 2 +- .../PublisherTests/FilterTests.swift | 2 +- .../PublisherTests/FirstTests.swift | 2 +- .../PublisherTests/FlatMapTests.swift | 6 +- .../PublisherTests/FutureTests.swift | 2 +- .../PublisherTests/HandleEventsTests.swift | 6 +- .../PublisherTests/IgnoreOutputTests.swift | 2 +- .../PublisherTests/JustTests.swift | 2 +- .../PublisherTests/LastTests.swift | 2 +- .../PublisherTests/MakeConnectableTests.swift | 2 +- .../PublisherTests/MapErrorTests.swift | 2 +- .../PublisherTests/MapKeyPathTests.swift | 2 +- .../PublisherTests/MapTests.swift | 2 +- .../PublisherTests/MeasureIntervalTests.swift | 2 +- .../PublisherTests/MergeTests.swift | 2 +- .../PublisherTests/MulticastTests.swift | 4 +- .../OptionalPublisherTests.swift | 6 +- .../PublisherTests/OutputTests.swift | 2 +- .../PrefixUntilOutputTests.swift | 2 +- .../PublisherTests/PrefixWhileTests.swift | 2 +- .../PublisherTests/PrintTests.swift | 2 +- .../PublisherTests/ReceiveOnTests.swift | 2 +- .../PublisherTests/RecordTests.swift | 2 +- .../PublisherTests/ReduceTests.swift | 2 +- .../RemoveDuplicatesTests.swift | 2 +- .../PublisherTests/ReplaceEmptyTests.swift | 2 +- .../PublisherTests/ReplaceErrorTests.swift | 2 +- .../PublisherTests/ReplaceNilTests.swift | 2 +- .../PublisherTests/ResultPublisherTests.swift | 8 +- .../PublisherTests/RetryTests.swift | 2 +- .../PublisherTests/ScanTests.swift | 2 +- .../PublisherTests/SequenceTests.swift | 4 +- .../PublisherTests/SetFailureTypeTests.swift | 2 +- .../PublisherTests/ShareTests.swift | 2 +- .../PublisherTests/SubscribeOnTests.swift | 2 +- .../PublisherTests/SwitchToLatestTests.swift | 6 +- .../PublisherTests/ThrottleTests.swift | 2 +- .../PublisherTests/TimeoutTests.swift | 2 +- .../PublisherTests/ZipTests.swift | 2 +- .../SubscribersTests/AssignTests.swift | 4 +- .../SubscribersTests/CompletionTests.swift | 2 +- .../SubscribersTests/SinkTests.swift | 2 +- .../SubscribersDemandTests.swift | 4 +- .../EmptySubscriptionTests.swift | 2 +- .../VirtualTimeSchedulerTests.swift | 2 +- 101 files changed, 318 insertions(+), 206 deletions(-) create mode 100644 Package@swift-5.9.swift diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift new file mode 100644 index 000000000..92ce4cda1 --- /dev/null +++ b/Package@swift-5.9.swift @@ -0,0 +1,114 @@ +// swift-tools-version:5.9 + +import Foundation +import PackageDescription + +// This list should be updated whenever SwiftPM adds support for a new platform. +// See: https://bugs.swift.org/browse/SR-13814 +let supportedPlatforms: [Platform] = [ + .macOS, + .macCatalyst, + .iOS, + .watchOS, + .tvOS, + .driverKit, + .linux, + .android, + .windows, + .wasi, + .visionOS, +] + +let openCombineTarget: Target = .target( + name: "OpenCombine", + dependencies: [ + .target( + name: "COpenCombineHelpers", + condition: .when(platforms: supportedPlatforms.except([.wasi])) + ) + ], + exclude: [ + "Concurrency/Publisher+Concurrency.swift.gyb", + "Publishers/Publishers.Encode.swift.gyb", + "Publishers/Publishers.MapKeyPath.swift.gyb", + "Publishers/Publishers.Catch.swift.gyb" + ] +) +let openCombineFoundationTarget: Target = .target( + name: "OpenCombineFoundation", + dependencies: [ + "OpenCombine", + .target( + name: "COpenCombineHelpers", + condition: .when(platforms: supportedPlatforms.except([.wasi])) + ) + ] +) +let openCombineDispatchTarget: Target = .target( + name: "OpenCombineDispatch", + dependencies: ["OpenCombine"] +) + +let openCombineTestsTarget: Target = .testTarget( + name: "OpenCombineTests", + dependencies: [ + "OpenCombine", + .target(name: "OpenCombineDispatch", + condition: .when(platforms: supportedPlatforms.except([.wasi]))), + .target(name: "OpenCombineFoundation", + condition: .when(platforms: supportedPlatforms.except([.wasi]))), + ], + swiftSettings: [ + .unsafeFlags(["-enable-testing"]), + ] +) + +let package = Package( + name: "OpenCombine", + products: [ + .library(name: "OpenCombine", targets: ["OpenCombine"]), + .library(name: "OpenCombineDispatch", targets: ["OpenCombineDispatch"]), + .library(name: "OpenCombineFoundation", targets: ["OpenCombineFoundation"]), + .library(name: "OpenCombineShim", targets: ["OpenCombineShim"]), + ], + targets: [ + .target(name: "COpenCombineHelpers"), + .target( + name: "OpenCombineShim", + dependencies: [ + "OpenCombine", + .target(name: "OpenCombineDispatch", + condition: .when(platforms: supportedPlatforms.except([.wasi]))), + .target(name: "OpenCombineFoundation", + condition: .when(platforms: supportedPlatforms.except([.wasi]))) + ] + ), + openCombineTarget, + openCombineFoundationTarget, + openCombineDispatchTarget, + openCombineTestsTarget, + ], + cxxLanguageStandard: .cxx17 +) + +// MARK: Helpers + +extension Array where Element == Platform { + func except(_ exceptions: [Platform]) -> [Platform] { + return filter { !exceptions.contains($0) } + } +} + +func envEnable(_ key: String) -> Bool { + guard let value = ProcessInfo.processInfo.environment[key] else { + return false + } + return value == "1" +} + +let enableCompatibilityTest = envEnable("OPENCOMBINE_COMPATIBILITY_TEST") +if enableCompatibilityTest { + var settings = openCombineTestsTarget.swiftSettings ?? [] + settings.append(.define("OPENCOMBINE_COMPATIBILITY_TEST")) + openCombineTestsTarget.swiftSettings = settings +} diff --git a/Tests/OpenCombineTests/AnyCancellableTests.swift b/Tests/OpenCombineTests/AnyCancellableTests.swift index 1f6acbe5f..34617d23d 100644 --- a/Tests/OpenCombineTests/AnyCancellableTests.swift +++ b/Tests/OpenCombineTests/AnyCancellableTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class AnyCancellableTests: XCTestCase { func testClosureInitialized() { diff --git a/Tests/OpenCombineTests/AnyPublisherTests.swift b/Tests/OpenCombineTests/AnyPublisherTests.swift index bf01beb92..9424eb65e 100644 --- a/Tests/OpenCombineTests/AnyPublisherTests.swift +++ b/Tests/OpenCombineTests/AnyPublisherTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class AnyPublisherTests: XCTestCase { private typealias Sut = AnyPublisher @@ -32,7 +32,7 @@ final class AnyPublisherTests: XCTestCase { XCTAssertEqual(publisher.history, [.subscriber]) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testDoubleErasure() { let introspection = TrackingIntrospection() let subscriber = TrackingSubscriber() diff --git a/Tests/OpenCombineTests/AnySubscriberTests.swift b/Tests/OpenCombineTests/AnySubscriberTests.swift index dd7ba1a2d..8b539b128 100644 --- a/Tests/OpenCombineTests/AnySubscriberTests.swift +++ b/Tests/OpenCombineTests/AnySubscriberTests.swift @@ -13,10 +13,10 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private typealias Sut = AnySubscriber -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class AnySubscriberTests: XCTestCase { func testCombineIdentifier() { @@ -163,7 +163,7 @@ final class AnySubscriberTests: XCTestCase { .completion(.finished)]) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testErasingTwice() { let introspection = TrackingIntrospection() let subscriber = TrackingSubscriber() @@ -185,7 +185,7 @@ final class AnySubscriberTests: XCTestCase { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private let events: [TrackingSubscriber.Event] = [ .subscription("1"), .subscription("2"), @@ -199,7 +199,7 @@ private let events: [TrackingSubscriber.Event] = [ .completion(.failure("failure")) ] -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private func publishEvents(_ events: [TrackingSubscriber.Event], _ erased: Sut) { for event in events { switch event { @@ -213,7 +213,7 @@ private func publishEvents(_ events: [TrackingSubscriber.Event], _ erased: Sut) } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private func publishEvents( _ events: [TrackingSubscriber.Event], _ publisher: PassthroughSubject @@ -230,7 +230,7 @@ private func publishEvents( } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private func subscriberEventToSubjectEvent( _ from: TrackingSubscriber.Event ) -> TrackingSubject.Event? { @@ -244,7 +244,7 @@ private func subscriberEventToSubjectEvent( } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension Array { func throughFirstCompletion() -> Array where Element == TrackingSubject.Event diff --git a/Tests/OpenCombineTests/CombineIdentifierTests.swift b/Tests/OpenCombineTests/CombineIdentifierTests.swift index e6e183ddf..e62def01a 100644 --- a/Tests/OpenCombineTests/CombineIdentifierTests.swift +++ b/Tests/OpenCombineTests/CombineIdentifierTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CombineIdentifierTests: XCTestCase { func testDefaultInitialized() { diff --git a/Tests/OpenCombineTests/CurrentValueSubjectTests.swift b/Tests/OpenCombineTests/CurrentValueSubjectTests.swift index f910605ef..259e35e92 100644 --- a/Tests/OpenCombineTests/CurrentValueSubjectTests.swift +++ b/Tests/OpenCombineTests/CurrentValueSubjectTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CurrentValueSubjectTests: XCTestCase { private typealias Sut = CurrentValueSubject diff --git a/Tests/OpenCombineTests/DispatchTests/DispatchQueueSchedulerTests.swift b/Tests/OpenCombineTests/DispatchTests/DispatchQueueSchedulerTests.swift index d552d9318..8281a2c67 100644 --- a/Tests/OpenCombineTests/DispatchTests/DispatchQueueSchedulerTests.swift +++ b/Tests/OpenCombineTests/DispatchTests/DispatchQueueSchedulerTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineDispatch #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class DispatchQueueSchedulerTests: XCTestCase { // MARK: - Scheduler.SchedulerTimeType @@ -590,7 +590,7 @@ final class DispatchQueueSchedulerTests: XCTestCase { #if OPENCOMBINE_COMPATIBILITY_TEST || !canImport(Combine) -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private typealias Scheduler = DispatchQueue private let mainScheduler = DispatchQueue.main @@ -605,7 +605,7 @@ private let backgroundScheduler = DispatchQueue.global(qos: .background).ocombin #endif // OPENCOMBINE_COMPATIBILITY_TEST || !canImport(Combine) -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private typealias Stride = Scheduler.SchedulerTimeType.Stride private struct KeyedWrapper: Codable, Equatable { diff --git a/Tests/OpenCombineTests/FoundationTests/JSONDecoderTests.swift b/Tests/OpenCombineTests/FoundationTests/JSONDecoderTests.swift index 094f29467..953b39bc5 100644 --- a/Tests/OpenCombineTests/FoundationTests/JSONDecoderTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/JSONDecoderTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class JSONDecoderTests: XCTestCase { func testSuccessfullyDecode() { let decoder = JSONDecoder() diff --git a/Tests/OpenCombineTests/FoundationTests/JSONEncoderTests.swift b/Tests/OpenCombineTests/FoundationTests/JSONEncoderTests.swift index 21c676a78..1882a1e51 100644 --- a/Tests/OpenCombineTests/FoundationTests/JSONEncoderTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/JSONEncoderTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class JSONEncoderTests: XCTestCase { func testSuccessfullyEncode() { diff --git a/Tests/OpenCombineTests/FoundationTests/NotificationCenterTests.swift b/Tests/OpenCombineTests/FoundationTests/NotificationCenterTests.swift index 6aa7d946b..9b90b1fe7 100644 --- a/Tests/OpenCombineTests/FoundationTests/NotificationCenterTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/NotificationCenterTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class NotificationCenterTests: XCTestCase { func testRequestingDemand() { @@ -456,7 +456,7 @@ final class NotificationCenterTests: XCTestCase { } #if OPENCOMBINE_COMPATIBILITY_TEST || !canImport(Combine) -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private func makePublisher( _ center: NotificationCenter, for name: Notification.Name, diff --git a/Tests/OpenCombineTests/FoundationTests/OperationQueueSchedulerTests.swift b/Tests/OpenCombineTests/FoundationTests/OperationQueueSchedulerTests.swift index 0125268ea..50e478884 100644 --- a/Tests/OpenCombineTests/FoundationTests/OperationQueueSchedulerTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/OperationQueueSchedulerTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class OperationQueueSchedulerTests: XCTestCase { // MARK: - Scheduler.SchedulerTimeType @@ -321,15 +321,15 @@ private func makeScheduler(_ queue: OperationQueue) -> OperationQueueScheduler { #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension OperationQueueScheduler.SchedulerTimeType.Stride : TimeIntervalBackedSchedulerStride {} -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension OperationQueueScheduler.SchedulerTimeType: DateBackedSchedulerTimeType {} -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension OperationQueueScheduler: RunLoopLikeScheduler {} private final class TestOperationQueue: OperationQueue { @@ -358,7 +358,7 @@ private final class TestOperationQueue: OperationQueue { private(set) var history = [Event]() - @available(macOS 10.15, iOS 13.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) override var progress: Progress { history.append(.progress) return super.progress @@ -379,7 +379,7 @@ private final class TestOperationQueue: OperationQueue { super.addOperation(block) } - @available(macOS 10.15, iOS 13.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) override func addBarrierBlock(_ barrier: @escaping () -> Void) { history.append(.addBarrierBlock(barrier)) super.addBarrierBlock(barrier) diff --git a/Tests/OpenCombineTests/FoundationTests/PropertyListDecoderTests.swift b/Tests/OpenCombineTests/FoundationTests/PropertyListDecoderTests.swift index ac269b508..066eb075f 100644 --- a/Tests/OpenCombineTests/FoundationTests/PropertyListDecoderTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/PropertyListDecoderTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class PropertyListDecoderTests: XCTestCase { func testSuccessfullyDecode() { let decoder = PropertyListDecoder() diff --git a/Tests/OpenCombineTests/FoundationTests/PropertyListEncoderTests.swift b/Tests/OpenCombineTests/FoundationTests/PropertyListEncoderTests.swift index 11fda47bd..8a49758cf 100644 --- a/Tests/OpenCombineTests/FoundationTests/PropertyListEncoderTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/PropertyListEncoderTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class PropertyListEncoderTests: XCTestCase { func testSuccessfullyEncode() { diff --git a/Tests/OpenCombineTests/FoundationTests/RunLoopSchedulerTests.swift b/Tests/OpenCombineTests/FoundationTests/RunLoopSchedulerTests.swift index 6ef0d0275..24b35e981 100644 --- a/Tests/OpenCombineTests/FoundationTests/RunLoopSchedulerTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/RunLoopSchedulerTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class RunLoopSchedulerTests: XCTestCase { // MARK: - Scheduler.SchedulerTimeType @@ -599,14 +599,14 @@ private func makeScheduler(_ runLoop: RunLoop) -> RunLoopScheduler { #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) protocol DateBackedSchedulerTimeType: Strideable, Codable, Hashable { init(_ date: Date) var date: Date { get } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) protocol TimeIntervalBackedSchedulerStride: SchedulerTimeIntervalConvertible, Comparable, SignedNumeric, @@ -619,19 +619,19 @@ protocol TimeIntervalBackedSchedulerStride: SchedulerTimeIntervalConvertible, var timeInterval: TimeInterval { get } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) protocol RunLoopLikeScheduler: Scheduler where SchedulerTimeType: DateBackedSchedulerTimeType, SchedulerTimeType.Stride: TimeIntervalBackedSchedulerStride { } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension RunLoopScheduler.SchedulerTimeType.Stride: TimeIntervalBackedSchedulerStride {} -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension RunLoopScheduler.SchedulerTimeType: DateBackedSchedulerTimeType {} -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension RunLoopScheduler: RunLoopLikeScheduler {} #endif // !os(WASI) diff --git a/Tests/OpenCombineTests/FoundationTests/TimerPublisherTests.swift b/Tests/OpenCombineTests/FoundationTests/TimerPublisherTests.swift index c9e16fb69..6c31e334c 100644 --- a/Tests/OpenCombineTests/FoundationTests/TimerPublisherTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/TimerPublisherTests.swift @@ -17,7 +17,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class TimerPublisherTests: XCTestCase { private lazy var timerSubscription: StringSubscription = { @@ -211,7 +211,7 @@ final class TimerPublisherTests: XCTestCase { } #if OPENCOMBINE_COMPATIBILITY_TEST || !canImport(Combine) -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private typealias TimerPublisher = Timer.TimerPublisher #else private typealias TimerPublisher = Timer.OCombine.TimerPublisher diff --git a/Tests/OpenCombineTests/FoundationTests/URLSessionTests.swift b/Tests/OpenCombineTests/FoundationTests/URLSessionTests.swift index 2b6063e92..2a6fe2929 100644 --- a/Tests/OpenCombineTests/FoundationTests/URLSessionTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/URLSessionTests.swift @@ -23,7 +23,7 @@ import OpenCombine import OpenCombineFoundation #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class URLSessionTests: XCTestCase { private typealias TrackingSubscriber = @@ -277,12 +277,12 @@ private class TestURLSession: URLSession { case downloadTaskWithResumeData(Data) case downloadTaskWithResumeDataAndCompletion(Data) case streamTaskWithHostNameAndPort(String, Int) -#if canImport(Darwin) && swift(>=5.1) +#if canImport(Darwin) && !os(watchOS) case streamTaskWithService(NetService) case webSocketTaskWithURL(URL) case webSocketTaskWithURLAndProtocols(URL, [String]) case webSocketTaskWithRequest(URLRequest) -#endif // canImport(Darwin) && swift(>=5.1) +#endif // canImport(Darwin) && !os(watchOS) } private(set) var history = [Event]() @@ -492,7 +492,7 @@ private class TestURLSession: URLSession { return super.downloadTask(withResumeData: resumeData) } -#if canImport(Darwin) +#if canImport(Darwin) && !os(watchOS) @available(macOS 10.11, iOS 9.0, *) override func streamTask(withHostName hostname: String, port: Int) -> URLSessionStreamTask { @@ -500,33 +500,31 @@ private class TestURLSession: URLSession { return super.streamTask(withHostName: hostname, port: port) } -#if swift(>=5.1) @available(macOS 10.11, iOS 9.0, *) override func streamTask(with service: NetService) -> URLSessionStreamTask { history.append(.streamTaskWithService(service)) return super.streamTask(with: service) } - @available(macOS 10.15, iOS 13.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) override func webSocketTask(with url: URL) -> URLSessionWebSocketTask { history.append(.webSocketTaskWithURL(url)) return super.webSocketTask(with: url) } - @available(macOS 10.15, iOS 13.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) override func webSocketTask(with url: URL, protocols: [String]) -> URLSessionWebSocketTask { history.append(.webSocketTaskWithURLAndProtocols(url, protocols)) return super.webSocketTask(with: url, protocols: protocols) } - @available(macOS 10.15, iOS 13.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) override func webSocketTask(with request: URLRequest) -> URLSessionWebSocketTask { history.append(.webSocketTaskWithRequest(request)) return super.webSocketTask(with: request) } -#endif // swift(>=5.1) -#endif // canImport(Darwin) +#endif // canImport(Darwin) && !os(watchOS) } private final class TestURLSessionDataTask: URLSessionDataTask { @@ -709,7 +707,7 @@ private final class TestURLSessionDataTask: URLSessionDataTask { extension URLError: EquatableError {} #if OPENCOMBINE_COMPATIBILITY_TEST || !canImport(Combine) -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private func makePublisher( _ session: URLSession, _ url: URL @@ -717,7 +715,7 @@ private func makePublisher( return session.dataTaskPublisher(for: url) } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private func makePublisher( _ session: URLSession, _ request: URLRequest diff --git a/Tests/OpenCombineTests/Helpers/AutomaticallyFinish.swift b/Tests/OpenCombineTests/Helpers/AutomaticallyFinish.swift index e20ea8466..ba23bc773 100644 --- a/Tests/OpenCombineTests/Helpers/AutomaticallyFinish.swift +++ b/Tests/OpenCombineTests/Helpers/AutomaticallyFinish.swift @@ -11,7 +11,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class AutomaticallyFinish { let subscription: CustomSubscription @@ -37,7 +37,7 @@ final class AutomaticallyFinish { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension AutomaticallyFinish: Publisher { func receive(subscriber: Downstream) where Downstream.Failure == Failure, Downstream.Input == Output @@ -46,7 +46,7 @@ extension AutomaticallyFinish: Publisher { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension AutomaticallyFinish where Failure == Never { func assign(to keyPath: ReferenceWritableKeyPath, on object: Root) -> AnyCancellable { diff --git a/Tests/OpenCombineTests/Helpers/CleaningUpSubscriber.swift b/Tests/OpenCombineTests/Helpers/CleaningUpSubscriber.swift index ee7ca210f..d4b2f1e51 100644 --- a/Tests/OpenCombineTests/Helpers/CleaningUpSubscriber.swift +++ b/Tests/OpenCombineTests/Helpers/CleaningUpSubscriber.swift @@ -11,7 +11,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CleaningUpSubscriber: Subscriber { private(set) var subscription: Subscription? diff --git a/Tests/OpenCombineTests/Helpers/CommonTests.swift b/Tests/OpenCombineTests/Helpers/CommonTests.swift index 17562e017..d8607acf1 100644 --- a/Tests/OpenCombineTests/Helpers/CommonTests.swift +++ b/Tests/OpenCombineTests/Helpers/CommonTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension XCTest { enum ValueBeforeSubscriptionBehavior { @@ -164,7 +164,7 @@ extension XCTest { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension XCTestCase.ValueBeforeSubscriptionBehavior where Value: Equatable { static func history( _ history: [TrackingSubscriberBase.Event], @@ -174,7 +174,7 @@ extension XCTestCase.ValueBeforeSubscriptionBehavior where Value: Equatable { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension XCTestCase.CompletionBeforeSubscriptionBehavior where Value: Equatable { static func history( _ history: [TrackingSubscriberBase.Event] diff --git a/Tests/OpenCombineTests/Helpers/CustomPublisher.swift b/Tests/OpenCombineTests/Helpers/CustomPublisher.swift index 7c77043b6..9ff53ebcc 100644 --- a/Tests/OpenCombineTests/Helpers/CustomPublisher.swift +++ b/Tests/OpenCombineTests/Helpers/CustomPublisher.swift @@ -30,10 +30,10 @@ import OpenCombine /// publisher.subscribe(subscriber) /// /// assert(subscription.history == [.requested(.max(42)), .cancelled]) -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) typealias CustomPublisher = CustomPublisherBase -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) class CustomPublisherBase: Publisher, Cancellable { private(set) var subscriber: AnySubscriber? @@ -83,7 +83,7 @@ class CustomPublisherBase: Publisher, Cancellable { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension CustomPublisherBase: Equatable { static func == (lhs: CustomPublisherBase, rhs: CustomPublisherBase) -> Bool { @@ -91,10 +91,10 @@ extension CustomPublisherBase: Equatable { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) typealias CustomConnectablePublisher = CustomConnectablePublisherBase -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CustomConnectablePublisherBase : CustomPublisherBase, ConnectablePublisher diff --git a/Tests/OpenCombineTests/Helpers/CustomSubscription.swift b/Tests/OpenCombineTests/Helpers/CustomSubscription.swift index a98764378..ce17061ca 100644 --- a/Tests/OpenCombineTests/Helpers/CustomSubscription.swift +++ b/Tests/OpenCombineTests/Helpers/CustomSubscription.swift @@ -16,7 +16,7 @@ import OpenCombine /// /// In order to inject `CustomSubscription` into the chain of subscriptions, /// use the `CustomSubscriber` class. -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CustomSubscription: Subscription, CustomStringConvertible { enum Event: Equatable, CustomStringConvertible { @@ -101,7 +101,7 @@ final class CustomSubscription: Subscription, CustomStringConvertible { var description: String { return "CustomSubscription" } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension CustomSubscription: Equatable { static func == (lhs: CustomSubscription, rhs: CustomSubscription) -> Bool { return lhs === rhs diff --git a/Tests/OpenCombineTests/Helpers/OperatorTestHelper.swift b/Tests/OpenCombineTests/Helpers/OperatorTestHelper.swift index 4c46712fc..196a93f23 100644 --- a/Tests/OpenCombineTests/Helpers/OperatorTestHelper.swift +++ b/Tests/OpenCombineTests/Helpers/OperatorTestHelper.swift @@ -16,7 +16,7 @@ import OpenCombine /// `OperatorTestHelper` is an abstraction that helps avoid a lot of boilerplate when /// testing an operator. It is initialized with a publisher type and creates a /// `CustomSubscription`, `CustomPublisherBase` and `TrackingSubscriberBase`. -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) class OperatorTestHelper( sendValue valueToBeSent: UpstreamOutput, cancellingSubscriptionReleasesSubscriber: Bool, diff --git a/Tests/OpenCombineTests/Helpers/TestReflection.swift b/Tests/OpenCombineTests/Helpers/TestReflection.swift index 5e587d739..465c76e9c 100644 --- a/Tests/OpenCombineTests/Helpers/TestReflection.swift +++ b/Tests/OpenCombineTests/Helpers/TestReflection.swift @@ -67,7 +67,7 @@ func reduceLikeOperatorMirror() -> (Mirror) -> Bool { ) } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) internal func testReflection( parentInput: Output.Type, parentFailure: Failure.Type, @@ -135,7 +135,7 @@ internal func testReflection( } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) internal func testSubscriptionReflection( description expectedDescription: String, customMirror customMirrorPredicate: ((Mirror) -> Bool)?, diff --git a/Tests/OpenCombineTests/Helpers/TrackingCollection.swift b/Tests/OpenCombineTests/Helpers/TrackingCollection.swift index 6dc842e77..230ee03f1 100644 --- a/Tests/OpenCombineTests/Helpers/TrackingCollection.swift +++ b/Tests/OpenCombineTests/Helpers/TrackingCollection.swift @@ -11,7 +11,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) typealias DisposeBag = TrackingCollection final class TrackingCollection { diff --git a/Tests/OpenCombineTests/Helpers/TrackingIntrospection.swift b/Tests/OpenCombineTests/Helpers/TrackingIntrospection.swift index 5574781e7..5239c226a 100644 --- a/Tests/OpenCombineTests/Helpers/TrackingIntrospection.swift +++ b/Tests/OpenCombineTests/Helpers/TrackingIntrospection.swift @@ -13,10 +13,10 @@ import Combine import OpenCombine #endif -@available(macOS 11.0, iOS 14.0, *) +@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) typealias TrackingIntrospection = TrackingIntrospectionBase -@available(macOS 11.0, iOS 14.0, *) +@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) internal final class TrackingIntrospectionBase : _Introspection @@ -133,7 +133,7 @@ internal final class TrackingIntrospectionBase Void) rethrows { enable() @@ -198,7 +198,7 @@ extension _Introspection { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension Subscribers.Completion { func castFailure( to target: Target.Type @@ -215,7 +215,7 @@ extension Subscribers.Completion { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) struct StringOrPublisher: CustomStringConvertible, ExpressibleByStringLiteral { @@ -262,7 +262,7 @@ struct StringOrPublisher: CustomStringConvertible, } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension StringOrPublisher: Equatable { static func == (lhs: StringOrPublisher, rhs: StringOrPublisher) -> Bool { switch (lhs.storage, rhs.storage) { @@ -274,7 +274,7 @@ extension StringOrPublisher: Equatable { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) struct StringOrSubscriber: CustomStringConvertible, ExpressibleByStringLiteral { @@ -312,7 +312,7 @@ struct StringOrSubscriber: CustomStringConvertible, } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension StringOrSubscriber: Equatable { static func == (lhs: StringOrSubscriber, rhs: StringOrSubscriber) -> Bool { switch (lhs.storage, rhs.storage) { diff --git a/Tests/OpenCombineTests/Helpers/TrackingSubscriber.swift b/Tests/OpenCombineTests/Helpers/TrackingSubscriber.swift index 7cce9dc71..c2ed948eb 100644 --- a/Tests/OpenCombineTests/Helpers/TrackingSubscriber.swift +++ b/Tests/OpenCombineTests/Helpers/TrackingSubscriber.swift @@ -25,7 +25,7 @@ import OpenCombine /// `TrackingSubscriber.Event.subscription(Subscription.empty)` /// is considered equal to any other subscription no matter what the subscription object /// actually is. -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) typealias TrackingSubscriber = TrackingSubscriberBase /// `TrackingSubscriber` records every event like "receiveSubscription", @@ -39,7 +39,7 @@ typealias TrackingSubscriber = TrackingSubscriberBase /// `TrackingSubscriber.Event.subscription(Subscription.empty)` /// is considered equal to any other subscription no matter what the subscription object /// actually is. -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class TrackingSubscriberBase : Subscriber, Cancellable, @@ -186,7 +186,7 @@ final class TrackingSubscriberBase } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension TrackingSubscriberBase: Equatable { static func == (lhs: TrackingSubscriberBase, rhs: TrackingSubscriberBase) -> Bool { @@ -194,21 +194,21 @@ extension TrackingSubscriberBase: Equatable { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension TrackingSubscriberBase where Value: Equatable { func assertHistoryEqual(_ expected: [Event]) { assertHistoryEqual(expected, valueComparator: ==) } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension TrackingSubscriberBase where Value == Void { func assertHistoryEqual(_ expected: [Event]) { assertHistoryEqual(expected, valueComparator: { _, _ in true }) } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension TrackingSubscriberBase.Event { func isEqual(to other: TrackingSubscriberBase.Event, valueComparator: (Value, Value) -> Bool) -> Bool { @@ -232,7 +232,7 @@ extension TrackingSubscriberBase.Event { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension TrackingSubscriberBase.Event: Equatable where Value: Equatable { static func == (lhs: TrackingSubscriberBase.Event, @@ -241,7 +241,7 @@ extension TrackingSubscriberBase.Event: Equatable where Value: Equatable { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension TrackingSubscriberBase.Event where Value == Void { static var signal: TrackingSubscriberBase.Event { return .value(()) } @@ -252,10 +252,10 @@ extension TrackingSubscriberBase.Event where Value == Void { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) typealias TrackingSubject = TrackingSubjectBase -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class TrackingSubjectBase : Subject, CustomStringConvertible @@ -346,7 +346,7 @@ final class TrackingSubjectBase var description: String { return "TrackingSubject" } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) enum StringSubscription: Subscription, CustomStringConvertible, ExpressibleByStringLiteral { @@ -399,7 +399,7 @@ enum StringSubscription: Subscription, } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension StringSubscription: Equatable { static func == (lhs: StringSubscription, rhs: StringSubscription) -> Bool { // swiftlint:disable pattern_matching_keywords diff --git a/Tests/OpenCombineTests/Helpers/VirtualTimeScheduler.swift b/Tests/OpenCombineTests/Helpers/VirtualTimeScheduler.swift index 4370de483..f626c616c 100644 --- a/Tests/OpenCombineTests/Helpers/VirtualTimeScheduler.swift +++ b/Tests/OpenCombineTests/Helpers/VirtualTimeScheduler.swift @@ -11,7 +11,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) protocol CancellableTokenProtocol: Cancellable { init(_ scheduler: VirtualTimeScheduler) @@ -19,7 +19,7 @@ protocol CancellableTokenProtocol: Cancellable { var isCancelled: Bool { get } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class VirtualTimeScheduler: Scheduler { struct SchedulerTimeType: Strideable, diff --git a/Tests/OpenCombineTests/ImmediateSchedulerTests.swift b/Tests/OpenCombineTests/ImmediateSchedulerTests.swift index 4ab1aec28..eb115f033 100644 --- a/Tests/OpenCombineTests/ImmediateSchedulerTests.swift +++ b/Tests/OpenCombineTests/ImmediateSchedulerTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ImmediateSchedulerTests: XCTestCase { func testSchedulerTimeType() throws { diff --git a/Tests/OpenCombineTests/IntrospectionTests.swift b/Tests/OpenCombineTests/IntrospectionTests.swift index 1deae3f75..d122cbd25 100644 --- a/Tests/OpenCombineTests/IntrospectionTests.swift +++ b/Tests/OpenCombineTests/IntrospectionTests.swift @@ -20,7 +20,7 @@ import Combine import OpenCombine #endif -@available(macOS 11.0, iOS 14.0, *) +@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) final class IntrospectionTests: XCTestCase { func testSubscribe() { @@ -653,7 +653,7 @@ final class IntrospectionTests: XCTestCase { } } -@available(macOS 11.0, iOS 14.0, *) +@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) private struct Noop: Publisher { typealias Output = Upstream.Output typealias Failure = Upstream.Failure @@ -667,7 +667,7 @@ private struct Noop: Publisher { } } -@available(macOS 11.0, iOS 14.0, *) +@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) extension Publisher { fileprivate func noop() -> Noop { return .init(upstream: self) diff --git a/Tests/OpenCombineTests/ObservableObjectPublisherTests.swift b/Tests/OpenCombineTests/ObservableObjectPublisherTests.swift index 27ac9fa0b..dbf7a000b 100644 --- a/Tests/OpenCombineTests/ObservableObjectPublisherTests.swift +++ b/Tests/OpenCombineTests/ObservableObjectPublisherTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ObservableObjectPublisherTests: XCTestCase { func testBasicBehavior() { diff --git a/Tests/OpenCombineTests/ObservableObjectTests.swift b/Tests/OpenCombineTests/ObservableObjectTests.swift index 6b43097b6..439dd55e5 100644 --- a/Tests/OpenCombineTests/ObservableObjectTests.swift +++ b/Tests/OpenCombineTests/ObservableObjectTests.swift @@ -12,10 +12,10 @@ import XCTest #if OPENCOMBINE_COMPATIBILITY_TEST import Combine -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private typealias Published = Combine.Published -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private typealias ObservableObject = Combine.ObservableObject #else import OpenCombine @@ -25,7 +25,7 @@ private typealias Published = OpenCombine.Published private typealias ObservableObject = OpenCombine.ObservableObject #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ObservableObjectTests: XCTestCase { var disposeBag = [AnyCancellable]() @@ -307,21 +307,21 @@ final class ObservableObjectTests: XCTestCase { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class NoFields: ObservableObject {} -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class NoPublishedFields: ObservableObject { var field = NoFields() var int = 0 } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class PublishedFieldIsConstant: ObservableObject { let publishedValue = Published(initialValue: 42) } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private class ObservedBase: ObservableObject { @Published var publishedValue0 = 0 var publishedValue1 = Published(initialValue: "Hello!") @@ -329,36 +329,36 @@ private class ObservedBase: ObservableObject { var simpleValue = "what" } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class ObservedDerivedWithObservedBase: ObservedBase { @Published var subclassPublished0 = 0 @Published var subclassPublished1 = 1 @Published var subclassPublished2 = 2 } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension NSNumber: ObservableObject {} -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class ObjCClassSubclass: NSObject, ObservableObject { @Published var published = 10 } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private class ResilientClassSubclass: JSONDecoder, ObservableObject { @Published var published0 = 10 @Published var published1 = "hello!" } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class ResilientClassSubclass2: ResilientClassSubclass { @Published var published3 = true } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension JSONEncoder: ObservableObject {} -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class GenericClass: ObservableObject { @Published var value1: Value1 @Published var value2: Value2 @@ -369,25 +369,25 @@ private final class GenericClass: ObservableObject { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private class NonObservedBase { @Published var nonObservedBaseValue0 = 10 @Published var nonObservedBaseValue1 = Double.pi } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private class ObservedDerivedWithNonObservedBase: NonObservedBase, ObservableObject { @Published var observedDerivedValue2 = "Asuka is obviously the best girl." @Published var observedDerivedValue3: UInt8 = 255 } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private class NSObjectSubclass: NSObject, ObservableObject { @Published var value0 = 0 @Published var value1: UInt8 = 42 } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private class ResilientClassGenericSubclass : JSONDecoder, ObservableObject @@ -401,14 +401,14 @@ private class ResilientClassGenericSubclass } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class ResilientClassGenericSubclass2 : ResilientClassGenericSubclass { @Published var value3 = false } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class TestObject: ObservableObject { @Published var state1: Int @Published var state2: Int diff --git a/Tests/OpenCombineTests/PassthroughSubjectTests.swift b/Tests/OpenCombineTests/PassthroughSubjectTests.swift index 41aa39d5a..292829641 100644 --- a/Tests/OpenCombineTests/PassthroughSubjectTests.swift +++ b/Tests/OpenCombineTests/PassthroughSubjectTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class PassthroughSubjectTests: XCTestCase { private typealias Sut = PassthroughSubject diff --git a/Tests/OpenCombineTests/PublishedTests.swift b/Tests/OpenCombineTests/PublishedTests.swift index 797bd7a00..01c01ee3c 100644 --- a/Tests/OpenCombineTests/PublishedTests.swift +++ b/Tests/OpenCombineTests/PublishedTests.swift @@ -12,10 +12,10 @@ import XCTest #if OPENCOMBINE_COMPATIBILITY_TEST import Combine -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private typealias Published = Combine.Published -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private typealias ObservableObject = Combine.ObservableObject #else import OpenCombine @@ -25,7 +25,7 @@ private typealias Published = OpenCombine.Published private typealias ObservableObject = OpenCombine.ObservableObject #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class PublishedTests: XCTestCase { func testBasicBehavior() { @@ -110,7 +110,7 @@ final class PublishedTests: XCTestCase { tracking1.assertHistoryEqual([.subscription("ObservableObjectPublisher")]) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testAssignToPublished() throws { let subscription = CustomSubscription() let publisher = CustomPublisherBase(subscription: subscription) @@ -149,7 +149,7 @@ final class PublishedTests: XCTestCase { .cancelled]) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testAssignToPublishedFinish() { let subscription = CustomSubscription() let publisher = CustomPublisherBase(subscription: subscription) @@ -291,7 +291,7 @@ final class PublishedTests: XCTestCase { ) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testProjectedValueSetter() { let testObject1 = TestObject(1) let testObject2 = TestObject(2) @@ -311,7 +311,7 @@ final class PublishedTests: XCTestCase { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class TestObject: ObservableObject { let objectWillChange = ObservableObjectPublisher() diff --git a/Tests/OpenCombineTests/PublisherTests.swift b/Tests/OpenCombineTests/PublisherTests.swift index 4d810e58c..08572e6c9 100644 --- a/Tests/OpenCombineTests/PublisherTests.swift +++ b/Tests/OpenCombineTests/PublisherTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class PublisherTests: XCTestCase { func testSubscribeSubscriber() { diff --git a/Tests/OpenCombineTests/PublisherTests/AllSatisfyTests.swift b/Tests/OpenCombineTests/PublisherTests/AllSatisfyTests.swift index b78cc0678..4dd3ac8e3 100644 --- a/Tests/OpenCombineTests/PublisherTests/AllSatisfyTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/AllSatisfyTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class AllSatisfyTests: XCTestCase { // MARK: - AllSatisfy diff --git a/Tests/OpenCombineTests/PublisherTests/AssertNoFailureTests.swift b/Tests/OpenCombineTests/PublisherTests/AssertNoFailureTests.swift index 9fa8eb43b..5082a4178 100644 --- a/Tests/OpenCombineTests/PublisherTests/AssertNoFailureTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/AssertNoFailureTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class AssertNoFailureTests: XCTestCase { func testPassThroughInput() throws { diff --git a/Tests/OpenCombineTests/PublisherTests/AutoconnectTests.swift b/Tests/OpenCombineTests/PublisherTests/AutoconnectTests.swift index c48459c7a..59f8ae6b2 100644 --- a/Tests/OpenCombineTests/PublisherTests/AutoconnectTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/AutoconnectTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class AutoconnectTests: XCTestCase { func testBasicRefcountBehavior() throws { diff --git a/Tests/OpenCombineTests/PublisherTests/BreakpointTests.swift b/Tests/OpenCombineTests/PublisherTests/BreakpointTests.swift index 068aea7cb..8f459fd24 100644 --- a/Tests/OpenCombineTests/PublisherTests/BreakpointTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/BreakpointTests.swift @@ -15,7 +15,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class BreakpointTests: XCTestCase { func testReceiveSubscription() { diff --git a/Tests/OpenCombineTests/PublisherTests/BufferTests.swift b/Tests/OpenCombineTests/PublisherTests/BufferTests.swift index a02babdf1..cb713dec4 100644 --- a/Tests/OpenCombineTests/PublisherTests/BufferTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/BufferTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class BufferTests: XCTestCase { func testInitialDemandWithKeepFullPrefetchStrategy() { diff --git a/Tests/OpenCombineTests/PublisherTests/CatchTests.swift b/Tests/OpenCombineTests/PublisherTests/CatchTests.swift index 06bd9d53c..5b1d11718 100644 --- a/Tests/OpenCombineTests/PublisherTests/CatchTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/CatchTests.swift @@ -17,7 +17,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CatchTests: XCTestCase { // FIXME: CatchTests will have 8 failure on Linux platform when TSAN is enabled, temporary disable them. diff --git a/Tests/OpenCombineTests/PublisherTests/CollectByCountTests.swift b/Tests/OpenCombineTests/PublisherTests/CollectByCountTests.swift index c313368fe..2942d7374 100644 --- a/Tests/OpenCombineTests/PublisherTests/CollectByCountTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/CollectByCountTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CollectByCountTests: XCTestCase { func testBasicBehavior() { diff --git a/Tests/OpenCombineTests/PublisherTests/CollectTests.swift b/Tests/OpenCombineTests/PublisherTests/CollectTests.swift index 787aba283..c0931725b 100644 --- a/Tests/OpenCombineTests/PublisherTests/CollectTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/CollectTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CollectTests: XCTestCase { func testBasicBehavior() throws { diff --git a/Tests/OpenCombineTests/PublisherTests/CompactMapTests.swift b/Tests/OpenCombineTests/PublisherTests/CompactMapTests.swift index 586ef4c0e..03328c162 100644 --- a/Tests/OpenCombineTests/PublisherTests/CompactMapTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/CompactMapTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CompactMapTests: XCTestCase { // MARK: - CompactMap diff --git a/Tests/OpenCombineTests/PublisherTests/ComparisonTests.swift b/Tests/OpenCombineTests/PublisherTests/ComparisonTests.swift index 03259c307..fd4fc79a1 100644 --- a/Tests/OpenCombineTests/PublisherTests/ComparisonTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ComparisonTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ComparisonTests: XCTestCase { // MARK: - Comparison diff --git a/Tests/OpenCombineTests/PublisherTests/ConcatenateTests.swift b/Tests/OpenCombineTests/PublisherTests/ConcatenateTests.swift index cbedfee6c..13c86bebf 100644 --- a/Tests/OpenCombineTests/PublisherTests/ConcatenateTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ConcatenateTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ConcatenateTests: XCTestCase { func testAppendBasicBehavior() { diff --git a/Tests/OpenCombineTests/PublisherTests/ContainsTests.swift b/Tests/OpenCombineTests/PublisherTests/ContainsTests.swift index 57dffba15..f6d745061 100644 --- a/Tests/OpenCombineTests/PublisherTests/ContainsTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ContainsTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ContainsTests: XCTestCase { // MARK: - Contains diff --git a/Tests/OpenCombineTests/PublisherTests/CountTests.swift b/Tests/OpenCombineTests/PublisherTests/CountTests.swift index 3a13f935c..4534f06d0 100644 --- a/Tests/OpenCombineTests/PublisherTests/CountTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/CountTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CountTests: XCTestCase { func testBasicBehavior() throws { diff --git a/Tests/OpenCombineTests/PublisherTests/DebounceTests.swift b/Tests/OpenCombineTests/PublisherTests/DebounceTests.swift index 23580f487..4acb30fb5 100644 --- a/Tests/OpenCombineTests/PublisherTests/DebounceTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/DebounceTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class DebounceTests: XCTestCase { func testBasicBehavior() { diff --git a/Tests/OpenCombineTests/PublisherTests/DeferredTests.swift b/Tests/OpenCombineTests/PublisherTests/DeferredTests.swift index 6c5d917b3..89a7b54aa 100644 --- a/Tests/OpenCombineTests/PublisherTests/DeferredTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/DeferredTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class DeferredTests: XCTestCase { func testDeferredCreatedAfterSubscription() { diff --git a/Tests/OpenCombineTests/PublisherTests/DelayTests.swift b/Tests/OpenCombineTests/PublisherTests/DelayTests.swift index 982e65f0e..a2408e790 100644 --- a/Tests/OpenCombineTests/PublisherTests/DelayTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/DelayTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class DelayTests: XCTestCase { // Delay's Inner doesn't conform to CustomStringConvertible, so we can't compare diff --git a/Tests/OpenCombineTests/PublisherTests/DropTests.swift b/Tests/OpenCombineTests/PublisherTests/DropTests.swift index f5e30c51d..f8d1378e9 100644 --- a/Tests/OpenCombineTests/PublisherTests/DropTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/DropTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class DropTests: XCTestCase { func testDroppingTwoElements() { diff --git a/Tests/OpenCombineTests/PublisherTests/DropUntilOutputTests.swift b/Tests/OpenCombineTests/PublisherTests/DropUntilOutputTests.swift index 014b7d8e6..dd053ba47 100644 --- a/Tests/OpenCombineTests/PublisherTests/DropUntilOutputTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/DropUntilOutputTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class DropUntilOutputTests: XCTestCase { func testOtherCompletesBeforeTriggering() { diff --git a/Tests/OpenCombineTests/PublisherTests/DropWhileTests.swift b/Tests/OpenCombineTests/PublisherTests/DropWhileTests.swift index 7692bca15..91d08e882 100644 --- a/Tests/OpenCombineTests/PublisherTests/DropWhileTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/DropWhileTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class DropWhileTests: XCTestCase { // MARK: - DropWhile diff --git a/Tests/OpenCombineTests/PublisherTests/EmptyTests.swift b/Tests/OpenCombineTests/PublisherTests/EmptyTests.swift index aea81dfc6..18d90ae27 100644 --- a/Tests/OpenCombineTests/PublisherTests/EmptyTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/EmptyTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class EmptyTests: XCTestCase { func testEmpty() { diff --git a/Tests/OpenCombineTests/PublisherTests/EncodeTests.swift b/Tests/OpenCombineTests/PublisherTests/EncodeTests.swift index 77d1b9efe..9804b820a 100644 --- a/Tests/OpenCombineTests/PublisherTests/EncodeTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/EncodeTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class EncodeTests: XCTestCase { private var encoder = TestEncoder() diff --git a/Tests/OpenCombineTests/PublisherTests/FailTests.swift b/Tests/OpenCombineTests/PublisherTests/FailTests.swift index 79c47dbaf..d9600e851 100644 --- a/Tests/OpenCombineTests/PublisherTests/FailTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/FailTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class FailTests: XCTestCase { private typealias Sut = Fail diff --git a/Tests/OpenCombineTests/PublisherTests/FilterTests.swift b/Tests/OpenCombineTests/PublisherTests/FilterTests.swift index f6e84d336..f86dc770b 100644 --- a/Tests/OpenCombineTests/PublisherTests/FilterTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/FilterTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class FilterTests: XCTestCase { // MARK: - Filter diff --git a/Tests/OpenCombineTests/PublisherTests/FirstTests.swift b/Tests/OpenCombineTests/PublisherTests/FirstTests.swift index 16f5177e0..55a34d7ac 100644 --- a/Tests/OpenCombineTests/PublisherTests/FirstTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/FirstTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class FirstTests: XCTestCase { // MARK: - First diff --git a/Tests/OpenCombineTests/PublisherTests/FlatMapTests.swift b/Tests/OpenCombineTests/PublisherTests/FlatMapTests.swift index 1c4045370..6f2ac9a9a 100644 --- a/Tests/OpenCombineTests/PublisherTests/FlatMapTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/FlatMapTests.swift @@ -12,7 +12,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class FlatMapTests: XCTestCase { func testFlatMapSequencesWithSink() { @@ -1068,7 +1068,7 @@ final class FlatMapTests: XCTestCase { ) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testOverloadWhenUpstreamNeverFailsButChildrenCanFail() { let child = CustomPublisher(subscription: nil) let helper = OperatorTestHelper( @@ -1082,7 +1082,7 @@ final class FlatMapTests: XCTestCase { XCTAssertEqual(helper.sut.transform(0), child) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testOverloadWhenUpstreamCanFailButChildrenNeverFail() { let child = CustomPublisherBase(subscription: nil) diff --git a/Tests/OpenCombineTests/PublisherTests/FutureTests.swift b/Tests/OpenCombineTests/PublisherTests/FutureTests.swift index 271d97b63..e90cbde19 100644 --- a/Tests/OpenCombineTests/PublisherTests/FutureTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/FutureTests.swift @@ -15,7 +15,7 @@ import OpenCombine // swiftlint:enable generic_type_name -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class FutureTests: XCTestCase { private typealias Sut = Future diff --git a/Tests/OpenCombineTests/PublisherTests/HandleEventsTests.swift b/Tests/OpenCombineTests/PublisherTests/HandleEventsTests.swift index a30c58063..079f8abf7 100644 --- a/Tests/OpenCombineTests/PublisherTests/HandleEventsTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/HandleEventsTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class HandleEventsTests: XCTestCase { func testBasicBehavior() throws { @@ -240,7 +240,7 @@ final class HandleEventsTests: XCTestCase { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private enum Event: Equatable { case receiveSubscription(StringSubscription) case receiveOutput(Int) @@ -249,7 +249,7 @@ private enum Event: Equatable { case receiveRequest(Subscribers.Demand) } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) extension Publisher where Output == Int, Failure: Equatable { fileprivate func handleAllEvents( _ handle: @escaping (Event) -> Void diff --git a/Tests/OpenCombineTests/PublisherTests/IgnoreOutputTests.swift b/Tests/OpenCombineTests/PublisherTests/IgnoreOutputTests.swift index 3c538c51b..a791b1c1e 100644 --- a/Tests/OpenCombineTests/PublisherTests/IgnoreOutputTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/IgnoreOutputTests.swift @@ -12,7 +12,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class IgnoreOutputTests: XCTestCase { func testCompletionWithEmpty() { diff --git a/Tests/OpenCombineTests/PublisherTests/JustTests.swift b/Tests/OpenCombineTests/PublisherTests/JustTests.swift index 4ee2f07c7..2fd3ed70c 100644 --- a/Tests/OpenCombineTests/PublisherTests/JustTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/JustTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class JustTests: XCTestCase { private typealias Sut = Just diff --git a/Tests/OpenCombineTests/PublisherTests/LastTests.swift b/Tests/OpenCombineTests/PublisherTests/LastTests.swift index 79d211f3c..5143d8bf1 100644 --- a/Tests/OpenCombineTests/PublisherTests/LastTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/LastTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class LastTests: XCTestCase { // MARK: - Last diff --git a/Tests/OpenCombineTests/PublisherTests/MakeConnectableTests.swift b/Tests/OpenCombineTests/PublisherTests/MakeConnectableTests.swift index 48e5b3c84..59004d25c 100644 --- a/Tests/OpenCombineTests/PublisherTests/MakeConnectableTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/MakeConnectableTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class MakeConnectableTests: XCTestCase { // MakeConnectable is just Multicast that uses PassthroughSubject, diff --git a/Tests/OpenCombineTests/PublisherTests/MapErrorTests.swift b/Tests/OpenCombineTests/PublisherTests/MapErrorTests.swift index 2e1fce9ac..c1c04c420 100644 --- a/Tests/OpenCombineTests/PublisherTests/MapErrorTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/MapErrorTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class MapErrorTests: XCTestCase { func testEmpty() { diff --git a/Tests/OpenCombineTests/PublisherTests/MapKeyPathTests.swift b/Tests/OpenCombineTests/PublisherTests/MapKeyPathTests.swift index de8d848ba..f175d7ef0 100644 --- a/Tests/OpenCombineTests/PublisherTests/MapKeyPathTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/MapKeyPathTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class MapKeyPathTests: XCTestCase { func testEmpty() { diff --git a/Tests/OpenCombineTests/PublisherTests/MapTests.swift b/Tests/OpenCombineTests/PublisherTests/MapTests.swift index 01461fa95..c70af0e9a 100644 --- a/Tests/OpenCombineTests/PublisherTests/MapTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/MapTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class MapTests: XCTestCase { func testEmpty() { diff --git a/Tests/OpenCombineTests/PublisherTests/MeasureIntervalTests.swift b/Tests/OpenCombineTests/PublisherTests/MeasureIntervalTests.swift index adb863d2e..f1e36f9aa 100644 --- a/Tests/OpenCombineTests/PublisherTests/MeasureIntervalTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/MeasureIntervalTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class MeasureIntervalTests: XCTestCase { func testBasicBehavior() { diff --git a/Tests/OpenCombineTests/PublisherTests/MergeTests.swift b/Tests/OpenCombineTests/PublisherTests/MergeTests.swift index 252c3ac07..0b2b2ca43 100644 --- a/Tests/OpenCombineTests/PublisherTests/MergeTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/MergeTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class MergeTests: XCTestCase { static let arities = (2 ... 10) diff --git a/Tests/OpenCombineTests/PublisherTests/MulticastTests.swift b/Tests/OpenCombineTests/PublisherTests/MulticastTests.swift index 210c5cb15..b11daf847 100644 --- a/Tests/OpenCombineTests/PublisherTests/MulticastTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/MulticastTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class MulticastTests: XCTestCase { func testMulticast() throws { @@ -494,7 +494,7 @@ final class MulticastTests: XCTestCase { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private final class MulticastTestingSubject: Subject { typealias Output = Int diff --git a/Tests/OpenCombineTests/PublisherTests/OptionalPublisherTests.swift b/Tests/OpenCombineTests/PublisherTests/OptionalPublisherTests.swift index ed7141cdd..c5a2dfccd 100644 --- a/Tests/OpenCombineTests/PublisherTests/OptionalPublisherTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/OptionalPublisherTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 11.0, iOS 14.0, *) +@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) final class OptionalPublisherTests: XCTestCase { private typealias Sut = OptionalPublisher @@ -383,10 +383,10 @@ final class OptionalPublisherTests: XCTestCase { } #if OPENCOMBINE_COMPATIBILITY_TEST || !canImport(Combine) -@available(macOS 11.0, iOS 14.0, *) +@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) typealias OptionalPublisher = Optional.Publisher -@available(macOS 11.0, iOS 14.0, *) +@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func makePublisher(_ optional: Output?) -> OptionalPublisher { return optional.publisher } diff --git a/Tests/OpenCombineTests/PublisherTests/OutputTests.swift b/Tests/OpenCombineTests/PublisherTests/OutputTests.swift index eeeaf1681..23cc41234 100644 --- a/Tests/OpenCombineTests/PublisherTests/OutputTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/OutputTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class OutputTests: XCTestCase { func testPrefixOperatorCorrectlyTranslatesToCountableRange() { diff --git a/Tests/OpenCombineTests/PublisherTests/PrefixUntilOutputTests.swift b/Tests/OpenCombineTests/PublisherTests/PrefixUntilOutputTests.swift index 0d2383e87..8a8b99349 100644 --- a/Tests/OpenCombineTests/PublisherTests/PrefixUntilOutputTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/PrefixUntilOutputTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class PrefixUntilOutputTests: XCTestCase { func testBasicBehavior() { diff --git a/Tests/OpenCombineTests/PublisherTests/PrefixWhileTests.swift b/Tests/OpenCombineTests/PublisherTests/PrefixWhileTests.swift index 1a802189c..0ae539c73 100644 --- a/Tests/OpenCombineTests/PublisherTests/PrefixWhileTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/PrefixWhileTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class PrefixWhileTests: XCTestCase { // MARK: - PrefixWhile diff --git a/Tests/OpenCombineTests/PublisherTests/PrintTests.swift b/Tests/OpenCombineTests/PublisherTests/PrintTests.swift index 7c01bdc7e..cc156946d 100644 --- a/Tests/OpenCombineTests/PublisherTests/PrintTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/PrintTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class PrintTests: XCTestCase { func testPrintWithoutPrefix() { diff --git a/Tests/OpenCombineTests/PublisherTests/ReceiveOnTests.swift b/Tests/OpenCombineTests/PublisherTests/ReceiveOnTests.swift index 86f316dcd..d729a15fb 100644 --- a/Tests/OpenCombineTests/PublisherTests/ReceiveOnTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ReceiveOnTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ReceiveOnTests: XCTestCase { func testBasicBehavior() { diff --git a/Tests/OpenCombineTests/PublisherTests/RecordTests.swift b/Tests/OpenCombineTests/PublisherTests/RecordTests.swift index d96f8d452..fb50a8aa2 100644 --- a/Tests/OpenCombineTests/PublisherTests/RecordTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/RecordTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class RecordTests: XCTestCase { typealias Sut = Record diff --git a/Tests/OpenCombineTests/PublisherTests/ReduceTests.swift b/Tests/OpenCombineTests/PublisherTests/ReduceTests.swift index 1b00fbc62..32a25ca07 100644 --- a/Tests/OpenCombineTests/PublisherTests/ReduceTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ReduceTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ReduceTests: XCTestCase { // MARK: - Reduce diff --git a/Tests/OpenCombineTests/PublisherTests/RemoveDuplicatesTests.swift b/Tests/OpenCombineTests/PublisherTests/RemoveDuplicatesTests.swift index bcd5f50c9..06434f08d 100644 --- a/Tests/OpenCombineTests/PublisherTests/RemoveDuplicatesTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/RemoveDuplicatesTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class RemoveDuplicatesTests: XCTestCase { // MARK: - RemoveDuplicates diff --git a/Tests/OpenCombineTests/PublisherTests/ReplaceEmptyTests.swift b/Tests/OpenCombineTests/PublisherTests/ReplaceEmptyTests.swift index 40451a235..b1614ac4f 100644 --- a/Tests/OpenCombineTests/PublisherTests/ReplaceEmptyTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ReplaceEmptyTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ReplaceEmptyTests: XCTestCase { func testEmptySubscription() { let helper = OperatorTestHelper(publisherType: CustomPublisher.self, diff --git a/Tests/OpenCombineTests/PublisherTests/ReplaceErrorTests.swift b/Tests/OpenCombineTests/PublisherTests/ReplaceErrorTests.swift index 5b4a9d327..04cc8dff4 100644 --- a/Tests/OpenCombineTests/PublisherTests/ReplaceErrorTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ReplaceErrorTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ReplaceErrorTests: XCTestCase { func testEmpty() { diff --git a/Tests/OpenCombineTests/PublisherTests/ReplaceNilTests.swift b/Tests/OpenCombineTests/PublisherTests/ReplaceNilTests.swift index 2c388473f..c6613db01 100644 --- a/Tests/OpenCombineTests/PublisherTests/ReplaceNilTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ReplaceNilTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ReplaceNilTests: XCTestCase { func testReplacesNilElement() { diff --git a/Tests/OpenCombineTests/PublisherTests/ResultPublisherTests.swift b/Tests/OpenCombineTests/PublisherTests/ResultPublisherTests.swift index a992f35e8..265334402 100644 --- a/Tests/OpenCombineTests/PublisherTests/ResultPublisherTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ResultPublisherTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ResultPublisherTests: XCTestCase { private typealias Sut = ResultPublisher @@ -426,11 +426,11 @@ final class ResultPublisherTests: XCTestCase { } #if OPENCOMBINE_COMPATIBILITY_TEST || !canImport(Combine) -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) typealias ResultPublisher = Result.Publisher -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) func makePublisher( _ result: Result ) -> ResultPublisher { @@ -447,7 +447,7 @@ func makePublisher( } #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private func makePublisher( _ output: Output ) -> ResultPublisher { diff --git a/Tests/OpenCombineTests/PublisherTests/RetryTests.swift b/Tests/OpenCombineTests/PublisherTests/RetryTests.swift index 86e2c084c..f804a314f 100644 --- a/Tests/OpenCombineTests/PublisherTests/RetryTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/RetryTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class RetryTests: XCTestCase { func testRetry3Times() throws { diff --git a/Tests/OpenCombineTests/PublisherTests/ScanTests.swift b/Tests/OpenCombineTests/PublisherTests/ScanTests.swift index 2ac303fbb..97b89918a 100644 --- a/Tests/OpenCombineTests/PublisherTests/ScanTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ScanTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ScanTests: XCTestCase { func testDemandSend() { diff --git a/Tests/OpenCombineTests/PublisherTests/SequenceTests.swift b/Tests/OpenCombineTests/PublisherTests/SequenceTests.swift index 2b335a9d4..a4cd324a4 100644 --- a/Tests/OpenCombineTests/PublisherTests/SequenceTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/SequenceTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class SequenceTests: XCTestCase { #if OPENCOMBINE_COMPATIBILITY_TEST || !canImport(Combine) @@ -737,7 +737,7 @@ private final class Counter: Sequence, IteratorProtocol, CustomStringConvertible /// /// let publisher = makePublisher([1, 2, 3, 4]) /// -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private func makePublisher( _ elements: Elements ) -> Publishers.Sequence { diff --git a/Tests/OpenCombineTests/PublisherTests/SetFailureTypeTests.swift b/Tests/OpenCombineTests/PublisherTests/SetFailureTypeTests.swift index 7264358e5..92196979f 100644 --- a/Tests/OpenCombineTests/PublisherTests/SetFailureTypeTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/SetFailureTypeTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class SetFailureTypeTests: XCTestCase { func testEmpty() { diff --git a/Tests/OpenCombineTests/PublisherTests/ShareTests.swift b/Tests/OpenCombineTests/PublisherTests/ShareTests.swift index 5518affa5..a560f398c 100644 --- a/Tests/OpenCombineTests/PublisherTests/ShareTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ShareTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ShareTests: XCTestCase { func testBasicBehavior() { diff --git a/Tests/OpenCombineTests/PublisherTests/SubscribeOnTests.swift b/Tests/OpenCombineTests/PublisherTests/SubscribeOnTests.swift index 0b24dffd8..1737517d8 100644 --- a/Tests/OpenCombineTests/PublisherTests/SubscribeOnTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/SubscribeOnTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class SubscribeOnTests: XCTestCase { func testSynchronouslySendsEventsDownstream() throws { diff --git a/Tests/OpenCombineTests/PublisherTests/SwitchToLatestTests.swift b/Tests/OpenCombineTests/PublisherTests/SwitchToLatestTests.swift index 13e8c8121..4127a7bdc 100644 --- a/Tests/OpenCombineTests/PublisherTests/SwitchToLatestTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/SwitchToLatestTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class SwitchToLatestTests: XCTestCase { var cancellables = [AnyCancellable]() @@ -736,7 +736,7 @@ final class SwitchToLatestTests: XCTestCase { XCTAssertEqual(nestedSubscription.history, [.requested(.max(1))]) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testOverloadWhenUpstreamNeverFailsButChildrenCanFail() { let helper = OperatorTestHelper( publisherType: CustomPublisherBase.self, @@ -748,7 +748,7 @@ final class SwitchToLatestTests: XCTestCase { XCTAssertEqual(helper.sut.upstream.upstream, helper.publisher) } - @available(macOS 11.0, iOS 14.0, *) + @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) func testOverloadWhenUpstreamCanFailButChildrenNeverFail() { let helper = OperatorTestHelper( publisherType: CustomPublisherBase, diff --git a/Tests/OpenCombineTests/PublisherTests/ThrottleTests.swift b/Tests/OpenCombineTests/PublisherTests/ThrottleTests.swift index 405619957..bbbccb817 100644 --- a/Tests/OpenCombineTests/PublisherTests/ThrottleTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ThrottleTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ThrottleTests: XCTestCase { func testBasicBehavior() { diff --git a/Tests/OpenCombineTests/PublisherTests/TimeoutTests.swift b/Tests/OpenCombineTests/PublisherTests/TimeoutTests.swift index fa468470f..e94db0cbf 100644 --- a/Tests/OpenCombineTests/PublisherTests/TimeoutTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/TimeoutTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class TimeoutTests: XCTestCase { func testBasicBehaviorWithoutCustomError() { diff --git a/Tests/OpenCombineTests/PublisherTests/ZipTests.swift b/Tests/OpenCombineTests/PublisherTests/ZipTests.swift index 6a6089aef..1cd3d7358 100644 --- a/Tests/OpenCombineTests/PublisherTests/ZipTests.swift +++ b/Tests/OpenCombineTests/PublisherTests/ZipTests.swift @@ -12,7 +12,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ZipTests: XCTestCase { static let arities = (2...4) diff --git a/Tests/OpenCombineTests/SubscribersTests/AssignTests.swift b/Tests/OpenCombineTests/SubscribersTests/AssignTests.swift index d1733c605..43f4e4789 100644 --- a/Tests/OpenCombineTests/SubscribersTests/AssignTests.swift +++ b/Tests/OpenCombineTests/SubscribersTests/AssignTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class AssignTests: XCTestCase { private typealias Sut = Subscribers.Assign @@ -170,7 +170,7 @@ final class AssignTests: XCTestCase { } } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class ObjectToModify { let autofinish = AutomaticallyFinish() var value = 0 diff --git a/Tests/OpenCombineTests/SubscribersTests/CompletionTests.swift b/Tests/OpenCombineTests/SubscribersTests/CompletionTests.swift index ba91d171c..c4d7b06cf 100644 --- a/Tests/OpenCombineTests/SubscribersTests/CompletionTests.swift +++ b/Tests/OpenCombineTests/SubscribersTests/CompletionTests.swift @@ -15,7 +15,7 @@ import OpenCombine import Foundation -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class CompletionTests: XCTestCase { private typealias Sut = Subscribers.Completion diff --git a/Tests/OpenCombineTests/SubscribersTests/SinkTests.swift b/Tests/OpenCombineTests/SubscribersTests/SinkTests.swift index 974de7dde..0976db944 100644 --- a/Tests/OpenCombineTests/SubscribersTests/SinkTests.swift +++ b/Tests/OpenCombineTests/SubscribersTests/SinkTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class SinkTests: XCTestCase { private typealias Sut = Subscribers.Sink diff --git a/Tests/OpenCombineTests/SubscribersTests/SubscribersDemandTests.swift b/Tests/OpenCombineTests/SubscribersTests/SubscribersDemandTests.swift index feb9c2aaf..33d2c6949 100644 --- a/Tests/OpenCombineTests/SubscribersTests/SubscribersDemandTests.swift +++ b/Tests/OpenCombineTests/SubscribersTests/SubscribersDemandTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class SubscribersDemandTests: XCTestCase { func testCrashesOnNegativeValue() { @@ -316,7 +316,7 @@ final class SubscribersDemandTests: XCTestCase { #endif // !os(WASI) } -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) private struct DemandKeyedWrapper: Codable, Equatable { let value: Subscribers.Demand diff --git a/Tests/OpenCombineTests/Subscriptions/EmptySubscriptionTests.swift b/Tests/OpenCombineTests/Subscriptions/EmptySubscriptionTests.swift index 07a80c3ef..ede011824 100644 --- a/Tests/OpenCombineTests/Subscriptions/EmptySubscriptionTests.swift +++ b/Tests/OpenCombineTests/Subscriptions/EmptySubscriptionTests.swift @@ -13,7 +13,7 @@ import Combine import OpenCombine #endif -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class EmptySubscriptionTests: XCTestCase { func testSingleInstance() { diff --git a/Tests/OpenCombineTests/VirtualTimeSchedulerTests.swift b/Tests/OpenCombineTests/VirtualTimeSchedulerTests.swift index fe632c3db..341ab154f 100644 --- a/Tests/OpenCombineTests/VirtualTimeSchedulerTests.swift +++ b/Tests/OpenCombineTests/VirtualTimeSchedulerTests.swift @@ -7,7 +7,7 @@ import XCTest -@available(macOS 10.15, iOS 13.0, *) +@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) final class VirtualTimeSchedulerTests: XCTestCase { func testOrder() {