[macos] Upgraded tests to Swift 4
This commit is contained in:
committed by
Minh Nguyễn
parent
9f708d80f4
commit
91de48356e
@@ -23,9 +23,9 @@ extension MGLSDKTestHelpers {
|
||||
class func protocolMethodDescriptions(_ p: Protocol) -> Set<String> {
|
||||
var methods = Set<String>()
|
||||
var methodCount = UInt32()
|
||||
let methodDescriptionList: UnsafeMutablePointer<objc_method_description>! = protocol_copyMethodDescriptionList(p, false, true, &methodCount)
|
||||
let methodDescriptionList = protocol_copyMethodDescriptionList(p, false, true, &methodCount)
|
||||
for i in 0..<Int(methodCount) {
|
||||
let description: objc_method_description = methodDescriptionList[i]
|
||||
let description = methodDescriptionList![i]
|
||||
XCTAssertNotNil(description.name?.description)
|
||||
methods.insert(description.name!.description)
|
||||
}
|
||||
@@ -36,11 +36,16 @@ extension MGLSDKTestHelpers {
|
||||
class func classMethodDescriptions(_ cls: Swift.AnyClass) -> Set<String> {
|
||||
var methods = Set<String>()
|
||||
var methodCount = UInt32()
|
||||
let methodList: UnsafeMutablePointer<Method?>! = class_copyMethodList(cls, &methodCount)
|
||||
let methodList = class_copyMethodList(cls, &methodCount)
|
||||
for i in 0..<Int(methodCount) {
|
||||
let method = methodList[i]
|
||||
let selector : Selector = method_getName(method)
|
||||
methods.insert(selector.description)
|
||||
let method = methodList![i]
|
||||
let selector = method_getName(method)
|
||||
#if os(macOS)
|
||||
methods.insert(selector.description)
|
||||
#else
|
||||
XCTAssertNotNil(selector)
|
||||
methods.insert(selector!.description)
|
||||
#endif
|
||||
}
|
||||
free(methodList)
|
||||
return methods
|
||||
|
||||
@@ -1378,7 +1378,7 @@
|
||||
TargetAttributes = {
|
||||
DA839E911CC2E3400062CAFB = {
|
||||
CreatedOnToolsVersion = 7.3;
|
||||
LastSwiftMigration = 0830;
|
||||
LastSwiftMigration = 0920;
|
||||
};
|
||||
DAAA17961CE13BAE00731EFE = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
@@ -1388,7 +1388,7 @@
|
||||
};
|
||||
DAE6C3301CC30DB200DB3429 = {
|
||||
CreatedOnToolsVersion = 7.3;
|
||||
LastSwiftMigration = 0800;
|
||||
LastSwiftMigration = 0920;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1885,7 +1885,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGL;
|
||||
PRODUCT_NAME = "Mapbox GL";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -1900,7 +1900,7 @@
|
||||
OTHER_CFLAGS = "-fvisibility=hidden";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGL;
|
||||
PRODUCT_NAME = "Mapbox GL";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -2026,7 +2026,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "../darwin/test/test-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -2053,7 +2053,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.test;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "../darwin/test/test-Bridging-Header.h";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user