import Foundation class MGLSDKTestHelpers { class func checkTestsContainAllMethods(testClass: Swift.AnyClass, in p: Protocol) { let testMethods = self.classMethodDescriptions(testClass) let subjectMethods = self.protocolMethodDescriptions(p) for method in subjectMethods { if !testMethods.contains(method) { XCTFail("\(String(describing: testClass)) does not contain \(method) from \(String(describing: p))") } } XCTAssert(true) } } extension MGLSDKTestHelpers { class func protocolMethodDescriptions(_ p: Protocol) -> Set { var methods = Set() var methodCount = UInt32() let methodDescriptionList: UnsafeMutablePointer! = protocol_copyMethodDescriptionList(p, false, true, &methodCount) for i in 0.. Set { var methods = Set() var methodCount = UInt32() let methodList: UnsafeMutablePointer! = class_copyMethodList(cls, &methodCount) for i in 0..