diff --git a/Tests/ReactiveSwiftTests/SchedulerSpec.swift b/Tests/ReactiveSwiftTests/SchedulerSpec.swift index 6171d49ef..8f1dbd925 100644 --- a/Tests/ReactiveSwiftTests/SchedulerSpec.swift +++ b/Tests/ReactiveSwiftTests/SchedulerSpec.swift @@ -6,6 +6,9 @@ // Copyright (c) 2014 GitHub. All rights reserved. // +#if canImport(Darwin) +import Darwin.sys.qos +#endif import Dispatch import Foundation @@ -265,6 +268,11 @@ class SchedulerSpec: QuickSpec { it("should propagate QoS values by default") { expect(scheduler.queue.qos).to(equal(.unspecified)) + // qos_class_self() may not be available on non-Darwin + // platforms, and it's unclear if QoS propagation is + // implemented in an equivalent manner in such contexts, + // so we restrict runtime validation tests to Darwin. + #if canImport(Darwin) let userInitiatedQueue = DispatchQueue( label: "reactiveswift.tests.user-initiated", qos: .userInitiated @@ -293,6 +301,7 @@ class SchedulerSpec: QuickSpec { expect(endQoS?.rawValue).to(beGreaterThanOrEqualTo( initialQoS?.rawValue )) + #endif // canImport(Darwin) } } }