Skip to content
This repository was archived by the owner on Mar 10, 2022. It is now read-only.

Commit d7a5a65

Browse files
Dominik HadlDominik Hadl
authored andcommitted
Update tests to Swift 3.0 in Xcode 8 beta 4
1 parent 9eafcf9 commit d7a5a65

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

KeyboardHelperTests/Tests/KeyboardAppearanceInfoTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class KeyboardAppearanceInfoTests: XCTestCase {
7575
}
7676

7777
func testAnimateAlong() {
78-
let expectation = self.expectation(withDescription: "Animate along should take 3 seconds")
78+
let expectation = self.expectation(description: "Animate along should take 3 seconds")
7979

8080
apperanceInfo.animateAlong({ () -> Void in
8181
// Do animations
@@ -85,7 +85,7 @@ class KeyboardAppearanceInfoTests: XCTestCase {
8585
}
8686
}
8787

88-
waitForExpectations(withTimeout: 3.005, handler: nil)
88+
waitForExpectations(timeout: 3.005, handler: nil)
8989
}
9090

9191
}

KeyboardHelperTests/Tests/KeyboardHelperTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class KeyboardHelperTests: XCTestCase {
5555
let spyDelegate = ShowSpyDelegate()
5656
let kh = KeyboardHelper(delegate: spyDelegate)
5757

58-
let expectation = self.expectation(withDescription: "KeyboardHelper calls the delegate as the result of receiving the show notification")
58+
let expectation = self.expectation(description: "KeyboardHelper calls the delegate as the result of receiving the show notification")
5959
spyDelegate.expectation = expectation
6060

6161
// NSNotificationCenter.defaultCenter().postNotificationName(UIKeyboardWillShowNotification, object: kh)
@@ -81,7 +81,7 @@ class KeyboardHelperTests: XCTestCase {
8181

8282

8383

84-
waitForExpectations(withTimeout: 1) { error in
84+
waitForExpectations(timeout: 1) { error in
8585
if let error = error {
8686
XCTFail("waitForExpectationsWithTimeout errored: \(error)")
8787
}
@@ -104,13 +104,13 @@ class KeyboardHelperTests: XCTestCase {
104104
let spyDelegate = HideSpyDelegate()
105105
let kh = KeyboardHelper(delegate: spyDelegate)
106106

107-
let expectation = self.expectation(withDescription: "KeyboardHelper calls the delegate as the result of receiving the hide notification")
107+
let expectation = self.expectation(description: "KeyboardHelper calls the delegate as the result of receiving the hide notification")
108108
spyDelegate.expectation = expectation
109109

110110
NotificationCenter.default.post(name: NSNotification.Name.UIKeyboardWillHide, object: kh)
111111

112112

113-
waitForExpectations(withTimeout: 1) { error in
113+
waitForExpectations(timeout: 1) { error in
114114
if let error = error {
115115
XCTFail("waitForExpectationsWithTimeout errored: \(error)")
116116
}

0 commit comments

Comments
 (0)