Skip to content

enable Dispatch tests in TestNSOperationQueue #559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions TestFoundation/TestNSOperationQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import SwiftXCTest
class TestNSOperationQueue : XCTestCase {
static var allTests: [(String, (TestNSOperationQueue) -> () throws -> Void)] {
return [
/* uncomment below lines once Dispatch is enabled in Foundation */
// ("test_OperationPriorities", test_OperationPriorities),
("test_OperationPriorities", test_OperationPriorities),
("test_OperationCount", test_OperationCount)
]
}
Expand All @@ -31,9 +30,8 @@ class TestNSOperationQueue : XCTestCase {
let op1 = BlockOperation(block: { sleep(2) })
queue.addOperation(op1)
XCTAssertTrue(queue.operationCount == 1)
/* uncomment below lines once Dispatch is enabled in Foundation */
//queue.waitUntilAllOperationsAreFinished()
//XCTAssertTrue(queue.operationCount == 0)
queue.waitUntilAllOperationsAreFinished()
XCTAssertTrue(queue.operationCount == 0)
}

func test_OperationPriorities() {
Expand Down