@@ -117,7 +117,7 @@ open class XCTWaiter {
117117 private var state = State . ready
118118 internal var timeout : TimeInterval = 0
119119 internal var waitSourceLocation : SourceLocation ?
120- #if !USE_SWIFT_CONCURRENCY_WAITER
120+ #if !DISABLE_XCTWAITER
121121 private weak var manager : WaiterManager < XCTWaiter > ?
122122 #endif
123123 private var runLoop : RunLoop ?
@@ -189,14 +189,14 @@ open class XCTWaiter {
189189 /// these environments. To ensure compatibility of tests between
190190 /// swift-corelibs-xctest and Apple XCTest, it is not recommended to pass
191191 /// explicit values for `file` and `line`.
192- #if USE_SWIFT_CONCURRENCY_WAITER
192+ #if DISABLE_XCTWAITER
193193 @available ( * , unavailable, message: " Expectation-based waiting is not available when using the Swift concurrency waiter. " )
194194 #else
195195 @available ( * , noasync, message: " Use await fulfillment(of:timeout:enforceOrder:) instead. " )
196196 #endif
197197 @discardableResult
198198 open func wait( for expectations: [ XCTestExpectation ] , timeout: TimeInterval , enforceOrder: Bool = false , file: StaticString = #file, line: Int = #line) -> Result {
199- #if USE_SWIFT_CONCURRENCY_WAITER
199+ #if DISABLE_XCTWAITER
200200 fatalError ( " This method is not available when using the Swift concurrency waiter. " )
201201 #else
202202 precondition ( Set ( expectations) . count == expectations. count, " API violation - each expectation can appear only once in the 'expectations' parameter. " )
@@ -286,14 +286,14 @@ open class XCTWaiter {
286286 /// these environments. To ensure compatibility of tests between
287287 /// swift-corelibs-xctest and Apple XCTest, it is not recommended to pass
288288 /// explicit values for `file` and `line`.
289- #if USE_SWIFT_CONCURRENCY_WAITER
289+ #if DISABLE_XCTWAITER
290290 @available ( * , unavailable, message: " Expectation-based waiting is not available when using the Swift concurrency waiter. " )
291291 #else
292292 @available ( macOS 12 . 0 , * )
293293 #endif
294294 @discardableResult
295295 open func fulfillment( of expectations: [ XCTestExpectation ] , timeout: TimeInterval , enforceOrder: Bool = false , file: StaticString = #file, line: Int = #line) async -> Result {
296- #if USE_SWIFT_CONCURRENCY_WAITER
296+ #if DISABLE_XCTWAITER
297297 fatalError ( " This method is not available when using the Swift concurrency waiter. " )
298298#else
299299 return await withCheckedContinuation { continuation in
@@ -324,13 +324,13 @@ open class XCTWaiter {
324324 /// expectations are not fulfilled before the given timeout. Default is the line
325325 /// number of the call to this method in the calling file. It is rare to
326326 /// provide this parameter when calling this method.
327- #if USE_SWIFT_CONCURRENCY_WAITER
327+ #if DISABLE_XCTWAITER
328328 @available ( * , unavailable, message: " Expectation-based waiting is not available when using the Swift concurrency waiter. " )
329329 #else
330330 @available ( * , noasync, message: " Use await fulfillment(of:timeout:enforceOrder:) instead. " )
331331 #endif
332332 open class func wait( for expectations: [ XCTestExpectation ] , timeout: TimeInterval , enforceOrder: Bool = false , file: StaticString = #file, line: Int = #line) -> Result {
333- #if USE_SWIFT_CONCURRENCY_WAITER
333+ #if DISABLE_XCTWAITER
334334 fatalError ( " This method is not available when using the Swift concurrency waiter. " )
335335#else
336336 return XCTWaiter ( ) . wait ( for: expectations, timeout: timeout, enforceOrder: enforceOrder, file: file, line: line)
@@ -353,13 +353,13 @@ open class XCTWaiter {
353353 /// expectations are not fulfilled before the given timeout. Default is the line
354354 /// number of the call to this method in the calling file. It is rare to
355355 /// provide this parameter when calling this method.
356- #if USE_SWIFT_CONCURRENCY_WAITER
356+ #if DISABLE_XCTWAITER
357357 @available ( * , unavailable, message: " Expectation-based waiting is not available when using the Swift concurrency waiter. " )
358358 #else
359359 @available ( macOS 12 . 0 , * )
360360 #endif
361361 open class func fulfillment( of expectations: [ XCTestExpectation ] , timeout: TimeInterval , enforceOrder: Bool = false , file: StaticString = #file, line: Int = #line) async -> Result {
362- #if USE_SWIFT_CONCURRENCY_WAITER
362+ #if DISABLE_XCTWAITER
363363 fatalError ( " This method is not available when using the Swift concurrency waiter. " )
364364#else
365365 return await XCTWaiter ( ) . fulfillment ( of: expectations, timeout: timeout, enforceOrder: enforceOrder, file: file, line: line)
@@ -372,7 +372,7 @@ open class XCTWaiter {
372372 }
373373 }
374374
375- #if !USE_SWIFT_CONCURRENCY_WAITER
375+ #if !DISABLE_XCTWAITER
376376 private func queue_configureExpectations( _ expectations: [ XCTestExpectation ] ) {
377377 dispatchPrecondition ( condition: . onQueue( XCTWaiter . subsystemQueue) )
378378
@@ -452,7 +452,7 @@ open class XCTWaiter {
452452
453453}
454454
455- #if !USE_SWIFT_CONCURRENCY_WAITER
455+ #if !DISABLE_XCTWAITER
456456private extension XCTWaiter {
457457 func primitiveWait( using runLoop: RunLoop , duration timeout: TimeInterval ) {
458458 // The contract for `primitiveWait(for:)` explicitly allows waiting for a shorter period than requested
@@ -491,7 +491,7 @@ extension XCTWaiter: CustomStringConvertible {
491491 }
492492}
493493
494- #if !USE_SWIFT_CONCURRENCY_WAITER
494+ #if !DISABLE_XCTWAITER
495495extension XCTWaiter : ManageableWaiter {
496496 var isFinished : Bool {
497497 return XCTWaiter . subsystemQueue. sync {
0 commit comments