File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -229,10 +229,11 @@ class TestOperationQueue : XCTestCase {
229
229
230
230
func test_CurrentQueueWithCustomUnderlyingQueue( ) {
231
231
let expectation = self . expectation ( description: " Background execution " )
232
-
232
+
233
233
let operationQueue = OperationQueue ( )
234
- operationQueue. underlyingQueue = DispatchQueue ( label: " underlying_queue " )
235
-
234
+ let underlyingQueue = DispatchQueue ( label: " underlying_queue " )
235
+ operationQueue. underlyingQueue = underlyingQueue
236
+
236
237
operationQueue. addOperation {
237
238
XCTAssertEqual ( operationQueue, OperationQueue . current)
238
239
expectation. fulfill ( )
@@ -268,7 +269,8 @@ class TestOperationQueue : XCTestCase {
268
269
let expectation = self . expectation ( description: " Background execution " )
269
270
270
271
let operationQueue = OperationQueue ( )
271
- operationQueue. underlyingQueue = DispatchQueue ( label: " underlying_queue " )
272
+ let underlyingQueue = DispatchQueue ( label: " underlying_queue " )
273
+ operationQueue. underlyingQueue = underlyingQueue
272
274
operationQueue. underlyingQueue = nil
273
275
274
276
operationQueue. addOperation {
You can’t perform that action at this time.
0 commit comments