Skip to content

Commit 5b29f2d

Browse files
committed
Update test code to Swift 4
1 parent 51b5ffe commit 5b29f2d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tests/URLNavigatorTests/URLNavigatorPublicTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class URLNavigatorPublicTests: XCTestCase {
108108
}
109109

110110
func testPushURL_URLOpenHandler() {
111-
self.navigator.map("myapp://ping") { _ in return true }
111+
self.navigator.map("myapp://ping") { _, _ in return true }
112112
let navigationController = UINavigationController(rootViewController: UIViewController())
113113
let viewController = self.navigator.push("myapp://ping", from: navigationController, animated: false)
114114
XCTAssertNil(viewController)
@@ -139,7 +139,7 @@ class URLNavigatorPublicTests: XCTestCase {
139139
}
140140

141141
func testPresentURL_URLOpenHandler() {
142-
self.navigator.map("myapp://ping") { _ in return true }
142+
self.navigator.map("myapp://ping") { _, _ in return true }
143143
let fromViewController = UIViewController()
144144
let viewController = self.navigator.present("myapp://ping", from: fromViewController)
145145
XCTAssertNil(viewController)
@@ -170,7 +170,7 @@ class URLNavigatorPublicTests: XCTestCase {
170170
NotificationCenter.default.post(name: .init("Ping"), object: nil, userInfo: nil)
171171
return true
172172
}
173-
self.expectation(forNotification: "Ping", object: nil, handler: nil)
173+
self.expectation(forNotification: .init(rawValue: "Ping"), object: nil, handler: nil)
174174
XCTAssertTrue(self.navigator.open("myapp://ping"))
175175
self.waitForExpectations(timeout: 1, handler: nil)
176176
}
@@ -232,7 +232,7 @@ class URLNavigatorPublicTests: XCTestCase {
232232

233233
func testSchemePushURL_URLOpenHandler() {
234234
self.navigator.scheme = "myapp"
235-
self.navigator.map("/ping") { _ in return true }
235+
self.navigator.map("/ping") { _, _ in return true }
236236
let navigationController = UINavigationController(rootViewController: UIViewController())
237237
let viewController = self.navigator.push("/ping", from: navigationController, animated: false)
238238
XCTAssertNil(viewController)
@@ -258,7 +258,7 @@ class URLNavigatorPublicTests: XCTestCase {
258258

259259
func testSchemePresentURL_URLOpenHandler() {
260260
self.navigator.scheme = "myapp"
261-
self.navigator.map("/ping") { _ in return true }
261+
self.navigator.map("/ping") { _, _ in return true }
262262
let fromViewController = UIViewController()
263263
let viewController = self.navigator.present("/ping", from: fromViewController)
264264
XCTAssertNil(viewController)

0 commit comments

Comments
 (0)