Skip to content

Commit f7b2ad4

Browse files
committed
Fix a few stragglers from pr-104
1 parent d06b865 commit f7b2ad4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/XCTest/XCTestCase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ public class XCTestCase: XCTest {
143143
/// the signature required by `XCTMain`
144144
/// - seealso: `XCTMain`
145145
public func testCase<T: XCTestCase>(_ allTests: [(String, (T) -> () throws -> Void)]) -> XCTestCaseEntry {
146-
let tests: [(String, XCTestCase throws -> Void)] = allTests.map { ($0.0, test($0.1)) }
146+
let tests: [(String, (XCTestCase) throws -> Void)] = allTests.map { ($0.0, test($0.1)) }
147147
return (T.self, tests)
148148
}
149149

150-
private func test<T: XCTestCase>(_ testFunc: T -> () throws -> Void) -> XCTestCase throws -> Void {
150+
private func test<T: XCTestCase>(_ testFunc: (T) -> () throws -> Void) -> (XCTestCase) throws -> Void {
151151
return { testCaseType in
152152
guard let testCase = testCaseType as? T else {
153153
fatalError("Attempt to invoke test on class \(T.self) with incompatible instance type \(testCaseType.dynamicType)")

Sources/XCTest/XCTestObservationCenter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class XCTestObservationCenter {
7171
forEachObserver { $0.testBundleDidFinish(testBundle) }
7272
}
7373

74-
private func forEachObserver(_ body: @noescape XCTestObservation -> Void) {
74+
private func forEachObserver(_ body: @noescape (XCTestObservation) -> Void) {
7575
for observer in observers {
7676
body(observer.object)
7777
}

0 commit comments

Comments
 (0)