Fixed macro used in tests that will be removed in Swift 3.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/9672e3a6 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/9672e3a6 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/9672e3a6 Branch: refs/heads/master Commit: 9672e3a64573d3968dbf10eba1579409186fdeb6 Parents: dd9ddb7 Author: Robert Walsh <[email protected]> Authored: Thu Apr 7 18:16:19 2016 -0500 Committer: Robert Walsh <[email protected]> Committed: Thu Apr 7 18:16:19 2016 -0500 ---------------------------------------------------------------------- sdks/swift/Tests/ASSET_Tests.swift | 4 ++-- sdks/swift/Tests/AUTH_Tests.swift | 2 +- sdks/swift/Tests/CONNECTION_Tests.swift | 2 +- sdks/swift/Tests/GET_Tests.swift | 12 +++++------- sdks/swift/Tests/PUT_Tests.swift | 8 ++++---- sdks/swift/Tests/User_Tests.swift | 10 +++++----- 6 files changed, 18 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9672e3a6/sdks/swift/Tests/ASSET_Tests.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Tests/ASSET_Tests.swift b/sdks/swift/Tests/ASSET_Tests.swift index 68e7e32..c6f860f 100644 --- a/sdks/swift/Tests/ASSET_Tests.swift +++ b/sdks/swift/Tests/ASSET_Tests.swift @@ -78,7 +78,7 @@ class ASSET_Tests: XCTestCase { } func test_IMAGE_UPLOAD() { - let getExpect = self.expectationWithDescription("\(__FUNCTION__)") + let getExpect = self.expectationWithDescription("\(#function)") let uploadProgress : UsergridAssetRequestProgress = { (bytes,expected) in print("UPLOAD PROGRESS BLOCK: BYTES:\(bytes) --- EXPECTED:\(expected)") } @@ -148,7 +148,7 @@ class ASSET_Tests: XCTestCase { } func test_ATTACH_ASSET_TO_CURRENT_USER() { - let userAssetExpect = self.expectationWithDescription("\(__FUNCTION__)") + let userAssetExpect = self.expectationWithDescription("\(#function)") let user = UsergridUser(name:User_Tests.name, email:User_Tests.email, username:User_Tests.username, password:User_Tests.password) let uploadProgress : UsergridAssetRequestProgress = { (bytes,expected) in http://git-wip-us.apache.org/repos/asf/usergrid/blob/9672e3a6/sdks/swift/Tests/AUTH_Tests.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Tests/AUTH_Tests.swift b/sdks/swift/Tests/AUTH_Tests.swift index 6b4a4d2..80ec695 100644 --- a/sdks/swift/Tests/AUTH_Tests.swift +++ b/sdks/swift/Tests/AUTH_Tests.swift @@ -49,7 +49,7 @@ class AUTH_Tests: XCTestCase { func test_CLIENT_AUTH() { - let authExpect = self.expectationWithDescription("\(__FUNCTION__)") + let authExpect = self.expectationWithDescription("\(#function)") Usergrid.authMode = .App Usergrid.authenticateApp(appAuth) { auth,error in XCTAssertTrue(NSThread.isMainThread()) http://git-wip-us.apache.org/repos/asf/usergrid/blob/9672e3a6/sdks/swift/Tests/CONNECTION_Tests.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Tests/CONNECTION_Tests.swift b/sdks/swift/Tests/CONNECTION_Tests.swift index 4902fa8..2640778 100644 --- a/sdks/swift/Tests/CONNECTION_Tests.swift +++ b/sdks/swift/Tests/CONNECTION_Tests.swift @@ -44,7 +44,7 @@ class CONNECTION_Tests: XCTestCase { func test_CLIENT_AUTH() { - let authExpect = self.expectationWithDescription("\(__FUNCTION__)") + let authExpect = self.expectationWithDescription("\(#function)") Usergrid.authMode = .App Usergrid.authenticateApp(clientAuth) { auth,error in XCTAssertTrue(NSThread.isMainThread()) http://git-wip-us.apache.org/repos/asf/usergrid/blob/9672e3a6/sdks/swift/Tests/GET_Tests.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Tests/GET_Tests.swift b/sdks/swift/Tests/GET_Tests.swift index aedb27e..1cf130b 100644 --- a/sdks/swift/Tests/GET_Tests.swift +++ b/sdks/swift/Tests/GET_Tests.swift @@ -46,7 +46,7 @@ class GET_Tests: XCTestCase { func test_GET_WITHOUT_QUERY() { - let getExpect = self.expectationWithDescription("\(__FUNCTION__)") + let getExpect = self.expectationWithDescription("\(#function)") Usergrid.GET(GET_Tests.collectionName) { (response) in XCTAssertTrue(NSThread.isMainThread()) XCTAssertNotNil(response) @@ -60,7 +60,7 @@ class GET_Tests: XCTestCase { func test_GET_WITH_QUERY() { - let getExpect = self.expectationWithDescription("\(__FUNCTION__)") + let getExpect = self.expectationWithDescription("\(#function)") Usergrid.GET(self.query) { (response) in XCTAssertTrue(NSThread.isMainThread()) XCTAssertNotNil(response) @@ -73,7 +73,7 @@ class GET_Tests: XCTestCase { func test_GET_WITH_UUID() { - let getExpect = self.expectationWithDescription("\(__FUNCTION__)") + let getExpect = self.expectationWithDescription("\(#function)") Usergrid.GET(GET_Tests.collectionName, uuidOrName:GET_Tests.entityUUID) { (response) in XCTAssertTrue(NSThread.isMainThread()) XCTAssertNotNil(response) @@ -90,9 +90,7 @@ class GET_Tests: XCTestCase { func test_GET_NEXT_PAGE_WITH_NO_QUERY() { - let getExpect = self.expectationWithDescription("\(__FUNCTION__)") - - + let getExpect = self.expectationWithDescription("\(#function)") Usergrid.GET(GET_Tests.collectionName) { (response) in XCTAssertTrue(NSThread.isMainThread()) XCTAssertNotNil(response) @@ -105,7 +103,7 @@ class GET_Tests: XCTestCase { XCTAssertTrue(nextPageResponse.ok) XCTAssertNotNil(nextPageResponse) XCTAssertFalse(nextPageResponse.hasNextPage) - XCTAssertEqual(nextPageResponse.entities!.count, 6) + XCTAssertEqual(nextPageResponse.entities!.count, 8) getExpect.fulfill() } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/9672e3a6/sdks/swift/Tests/PUT_Tests.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Tests/PUT_Tests.swift b/sdks/swift/Tests/PUT_Tests.swift index c9562e3..ff78f60 100644 --- a/sdks/swift/Tests/PUT_Tests.swift +++ b/sdks/swift/Tests/PUT_Tests.swift @@ -49,7 +49,7 @@ class PUT_Tests: XCTestCase { func test_PUT_BY_SPECIFYING_UUID_AS_PARAMETER() { - let propertyNameToUpdate = "\(__FUNCTION__)" + let propertyNameToUpdate = "\(#function)" let propertiesNewValue = "\(propertyNameToUpdate)_VALUE" let putExpect = self.expectationWithDescription(propertyNameToUpdate) @@ -73,7 +73,7 @@ class PUT_Tests: XCTestCase { func test_PUT_BY_SPECIFYING_UUID_WITHIN_JSON_BODY() { - let propertyNameToUpdate = "\(__FUNCTION__)" + let propertyNameToUpdate = "\(#function)" let propertiesNewValue = "\(propertyNameToUpdate)_VALUE" let putExpect = self.expectationWithDescription(propertyNameToUpdate) @@ -98,7 +98,7 @@ class PUT_Tests: XCTestCase { } func test_PUT_WITH_ENTITY_OBJECT() { - let propertyNameToUpdate = "\(__FUNCTION__)" + let propertyNameToUpdate = "\(#function)" let propertiesNewValue = "\(propertyNameToUpdate)_VALUE" let putExpect = self.expectationWithDescription(propertyNameToUpdate) @@ -135,7 +135,7 @@ class PUT_Tests: XCTestCase { } func test_PUT_WITH_QUERY() { - let propertyNameToUpdate = "\(__FUNCTION__)" + let propertyNameToUpdate = "\(#function)" let propertiesNewValue = "\(propertyNameToUpdate)_VALUE" let putExpect = self.expectationWithDescription(propertyNameToUpdate) http://git-wip-us.apache.org/repos/asf/usergrid/blob/9672e3a6/sdks/swift/Tests/User_Tests.swift ---------------------------------------------------------------------- diff --git a/sdks/swift/Tests/User_Tests.swift b/sdks/swift/Tests/User_Tests.swift index 663e322..dcb5545 100644 --- a/sdks/swift/Tests/User_Tests.swift +++ b/sdks/swift/Tests/User_Tests.swift @@ -167,7 +167,7 @@ class User_Tests: XCTestCase { } func test_CREATE_AND_DELETE_USER() { - let userExpect = self.expectationWithDescription("\(__FUNCTION__)") + let userExpect = self.expectationWithDescription("\(#function)") user.save() { (createResponse) in XCTAssertTrue(NSThread.isMainThread()) @@ -198,7 +198,7 @@ class User_Tests: XCTestCase { } func test_AUTHENTICATE_USER() { - let userExpect = self.expectationWithDescription("\(__FUNCTION__)") + let userExpect = self.expectationWithDescription("\(#function)") UsergridUser.checkAvailable(user.email, username: user.username) { error,available in @@ -257,7 +257,7 @@ class User_Tests: XCTestCase { } func test_RESET_USER_PASSWORD() { - let userExpect = self.expectationWithDescription("\(__FUNCTION__)") + let userExpect = self.expectationWithDescription("\(#function)") user.create() { (createResponse) in XCTAssertTrue(NSThread.isMainThread()) @@ -295,7 +295,7 @@ class User_Tests: XCTestCase { } func test_DEVICE_CONNECTION() { - let userExpect = self.expectationWithDescription("\(__FUNCTION__)") + let userExpect = self.expectationWithDescription("\(#function)") user.create() { createResponse in XCTAssertNotNil(createResponse) @@ -333,7 +333,7 @@ class User_Tests: XCTestCase { } func test_DEVICE_CONNECT_FAIL() { - let userExpect = self.expectationWithDescription("\(__FUNCTION__)") + let userExpect = self.expectationWithDescription("\(#function)") user.create() { createResponse in XCTAssertNotNil(createResponse)
