diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/Logger.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/Logger.swift new file mode 100644 index 0000000..f339141 --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/Logger.swift @@ -0,0 +1,52 @@ +open class Logger { + + /// All calls to `log(message: atLevel: inFile: inFunction: atLine: line)` will be relayed to this instance + /// Inject a mock here if needed + public var relay: CanLogMessageAtLevelInFileInFunctionAtLine? + public let settings: Settings + + public init(settings: Settings = .verboseSettings) { + self.settings = settings + } +} + +//MARK: CanCanLogMessageAtLevelInFileInFunctionAtLine +extension Logger: CanLogMessageAtLevelInFileInFunctionAtLine { + + open func log(_ message: Any = "", atLevel level: Loglevel, inFile file: String? = #file, inFunction function: String? = #function, atLine line: Int? = #line) { + relay?.log(message, atLevel: level, inFile: file, inFunction: function, atLine: line) + guard shouldLog(at: level) else { return } + settings.destination.log(settings.formatter.format(message, + with: settings.loglevelStrings[level] ?? "", + in: file, + in: function, + at: line, + with: settings.formatSettings[level] ?? .nothingSettings)) + } +} + +//MARK: CanLogMessageInFileInFunctionAtLine +extension Logger: CanLogMessageInFileInFunctionAtLine { + + open func log(_ message: Any = "", inFile file: String? = #file, inFunction function: String? = #function, atLine line: Int? = #line) { + log(message, atLevel: defaultLogLevel, inFile: file, inFunction: function, atLine: line) + } +} + +//MARK: HasDefaultLoglevel +extension Logger: HasDefaultLoglevel { + + open var defaultLogLevel: Loglevel { + return settings.defaultLogLevel + } +} + +extension Logger { + + open func shouldLog(at level: Loglevel) -> Bool { + guard level != .inactive else { return false } + return level.rawValue >= settings.activeLogLevel.rawValue + } +} + + diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/MockLogger.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/MockLogger.swift new file mode 100644 index 0000000..223a40b --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/MockLogger.swift @@ -0,0 +1,45 @@ +// +// MockLogger.swift +// Zoomy_Example +// +// Created by Menno on 30/04/2018. +// Copyright Š 2018 CocoaPods. All rights reserved. +// + +import Foundation + +public class MockLogger { + + public typealias LoggedMessage = (level: Loglevel?, message: Any, file: String?, function: String?, line: Int?) + + public var defaultLogLevel: Loglevel = .info + + public private(set) var loggedMessages = [LoggedMessage]() + + public init() {} +} + +//MARK: - Public Methods + +public extension MockLogger { + + func loggedMessages(atLevel logLevel: Loglevel) -> [LoggedMessage] { + return loggedMessages.filter{ $0.level == logLevel } + } +} + +//MARK: CanLogMessageAtLevel +extension MockLogger: CanLogMessageAtLevel { + + public func log(_ message: Any, atLevel level: Loglevel) { + log(message, atLevel: level, inFile: nil, inFunction: nil, atLine: nil) + } +} + +//MARK: CanCanLogMessageAtLevelInFileInFunctionAtLine +extension MockLogger: CanLogMessageAtLevelInFileInFunctionAtLine { + + public func log(_ message: Any, atLevel level: Loglevel, inFile file: String?, inFunction function: String?, atLine line: Int?) { + loggedMessages.append((level: level, message: message, file: file, function: function, line: line)) + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/SimpleLogger.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/SimpleLogger.swift new file mode 100644 index 0000000..60ddc33 --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Classes/SimpleLogger.swift @@ -0,0 +1,54 @@ +open class SimpleLogger { + + public let settings: Settings + + /// All calls to `log(message:at level:)` will be relayed to this instance + /// Inject a mock here if needed + public var relay: CanLogMessageAtLevel? + + public init(settings: Settings = .verboseSettings) { + self.settings = settings + } +} + +//MARK: Open Methods +extension SimpleLogger { + + open func format(_ message: Any, with logLevelString: String) -> String { + + var formattedMessage = logLevelString + + if (message as? String)?.count != 0 { + if formattedMessage.count > 0 { + formattedMessage.append(" ") + } + + formattedMessage.append("\(message)") + } + + return formattedMessage + } + + open func shouldLog(at level: Loglevel) -> Bool { + guard level != .inactive else { return false } + return level.rawValue >= settings.activeLogLevel.rawValue + } +} + +//MARK: CanLogMessageAtLevel +extension SimpleLogger: CanLogMessageAtLevel { + + open func log(_ message: Any, atLevel level: Loglevel) { + relay?.log(message, atLevel: level) + guard shouldLog(at: level) else { return } + settings.destination.log(format(message, with: settings.loglevelStrings[level] ?? "")) + } +} + +// MARK: HasDefaultLoglevel +extension SimpleLogger: HasDefaultLoglevel { + + open var defaultLogLevel: Loglevel { + return settings.defaultLogLevel + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Enums/LogLevel.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Enums/LogLevel.swift new file mode 100644 index 0000000..df484ad --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Enums/LogLevel.swift @@ -0,0 +1,13 @@ +public enum Loglevel: UInt { + case verbose = 0 + case info = 1 + case warning = 2 + case error = 3 + case inactive = 4 +} + +public extension Loglevel { + public static var all: [Loglevel] { + return [.verbose, .info, .warning, .error, .inactive] + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLog.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLog.swift new file mode 100644 index 0000000..29b930d --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLog.swift @@ -0,0 +1,11 @@ +public protocol CanLog { + + func log() +} + +public extension CanLog { + + public func log() { + print("") + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogAtLevel.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogAtLevel.swift new file mode 100644 index 0000000..8b53b82 --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogAtLevel.swift @@ -0,0 +1,27 @@ +public protocol CanLogAtLevel: CanLog, HasDefaultLoglevel { + + func log(atLevel level: Loglevel) +} + +extension CanLogAtLevel { + + public func log() { + log(atLevel: defaultLogLevel) + } + + public func logError() { + log(atLevel: .error) + } + + public func logWarning() { + log(atLevel: .warning) + } + + public func logInfo() { + log(atLevel: .info) + } + + public func logVerbose() { + log(atLevel: .verbose) + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogMessage.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogMessage.swift new file mode 100644 index 0000000..4137856 --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogMessage.swift @@ -0,0 +1,11 @@ +public protocol CanLogMessage: CanLog { + + func log(_ message: Any) +} + +extension CanLogMessage { + + public func log() { + log("") + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogMessageAtLevel.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogMessageAtLevel.swift new file mode 100644 index 0000000..3d203be --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/ExtendedProtocols/CanLogMessageAtLevel.swift @@ -0,0 +1,35 @@ +public protocol CanLogMessageAtLevel: CanLogMessage, CanLogAtLevel { + + func log(_ message: Any, atLevel level: Loglevel) +} + +public extension CanLogMessageAtLevel { + + func log() { + log("", atLevel: defaultLogLevel) + } + + func log(_ message: Any) { + log(message, atLevel: defaultLogLevel) + } + + func log(atLevel level: Loglevel) { + log("", atLevel: level) + } + + func logError(_ message: Any) { + log(message, atLevel: .error) + } + + func logWarning(_ message: Any) { + log(message, atLevel: .warning) + } + + func logInfo(_ message: Any) { + log(message, atLevel: .info) + } + + func logVerbose(_ message: Any) { + log(message, atLevel: .verbose) + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanFormatMessageInFileInFunctionAtLineWithSettings.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanFormatMessageInFileInFunctionAtLineWithSettings.swift new file mode 100644 index 0000000..98c182a --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanFormatMessageInFileInFunctionAtLineWithSettings.swift @@ -0,0 +1,4 @@ +public protocol CanFormatMessageInFileInFunctionAtLineWithSettings { + + func format(_ message: Any, with levelString: String, in file: String?, in function: String?, at line: Int?, with settings: Logger.FormatSettings) -> String +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanLogMessageAtLevelInFileInFunctionAtLine.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanLogMessageAtLevelInFileInFunctionAtLine.swift new file mode 100644 index 0000000..c6e9e4e --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanLogMessageAtLevelInFileInFunctionAtLine.swift @@ -0,0 +1,23 @@ +public protocol CanLogMessageAtLevelInFileInFunctionAtLine { + + func log(_ message: Any, atLevel level:Loglevel, inFile file: String?, inFunction function: String?, atLine line: Int?) +} + +public extension CanLogMessageAtLevelInFileInFunctionAtLine { + + func logError(_ message: Any = "", inFile file: String? = #file, inFunction function: String? = #function, atLine line: Int? = #line) { + log(message, atLevel: .error, inFile: file, inFunction: function, atLine: line) + } + + func logWarning(_ message: Any = "", inFile file: String? = #file, inFunction function: String? = #function, atLine line: Int? = #line) { + log(message, atLevel: .warning, inFile: file, inFunction: function, atLine: line) + } + + func logInfo(_ message: Any = "", inFile file: String? = #file, inFunction function: String? = #function, atLine line: Int? = #line) { + log(message, atLevel: .info, inFile: file, inFunction: function, atLine: line) + } + + func logVerbose(_ message: Any = "", inFile file: String? = #file, inFunction function: String? = #function, atLine line: Int? = #line) { + log(message, atLevel: .verbose, inFile: file, inFunction: function, atLine: line) + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanLogMessageInFileInFunctionAtLine.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanLogMessageInFileInFunctionAtLine.swift new file mode 100644 index 0000000..710c9eb --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/CanLogMessageInFileInFunctionAtLine.swift @@ -0,0 +1,4 @@ +public protocol CanLogMessageInFileInFunctionAtLine { + + func log(_ message: Any, inFile file: String?, inFunction function: String?, atLine line: Int?) +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/HasDefaultLoglevel.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/HasDefaultLoglevel.swift new file mode 100644 index 0000000..53d7402 --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Protocols/HasDefaultLoglevel.swift @@ -0,0 +1,11 @@ +public protocol HasDefaultLoglevel { + + var defaultLogLevel: Loglevel { get } +} + +public extension HasDefaultLoglevel { + + var defaultLogLevel: Loglevel { + return .info + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/ConsoleLogger.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/ConsoleLogger.swift new file mode 100644 index 0000000..7c60a1e --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/ConsoleLogger.swift @@ -0,0 +1,13 @@ +/// Can Log messages to the console +public struct ConsoleLogger { + + public init() {} +} + +//MARK: CanLogMessage +extension ConsoleLogger: CanLogMessage { + + public func log(_ message: Any) { + print(message) + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.FormatSettings.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.FormatSettings.swift new file mode 100644 index 0000000..d73e9de --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.FormatSettings.swift @@ -0,0 +1,47 @@ +public extension Logger { + public struct FormatSettings { + + public var shouldShowLevel: Bool + + public var shouldShowFile: Bool + + public var shouldShowFunction: Bool + + public var shouldShowLine: Bool + + public init(shouldShowLevel: Bool = false, shouldShowFile: Bool = false, shouldShowFunction: Bool = false, shouldShowLine: Bool = false) { + self.shouldShowLevel = shouldShowLevel + self.shouldShowFile = shouldShowFile + self.shouldShowFunction = shouldShowFunction + self.shouldShowLine = shouldShowLine + } + } +} + +public extension Logger.FormatSettings { + + /// Will show everything up to line level + static var lineSettings: Logger.FormatSettings { + return Logger.FormatSettings(shouldShowLevel: true, shouldShowFile: true, shouldShowFunction: true, shouldShowLine: true) + } + + /// Will show everything up to function level + static var functionSettings: Logger.FormatSettings { + return Logger.FormatSettings(shouldShowLevel: true, shouldShowFile: true, shouldShowFunction: true, shouldShowLine: false) + } + + /// Will show everything up to file level + static var fileSettings: Logger.FormatSettings { + return Logger.FormatSettings(shouldShowLevel: true, shouldShowFile: true, shouldShowFunction: false, shouldShowLine: false) + } + + /// Will show everything up to logLevel level + static var levelSettings: Logger.FormatSettings { + return Logger.FormatSettings(shouldShowLevel: true, shouldShowFile: false, shouldShowFunction: false, shouldShowLine: false) + } + + /// Will show nothing except message + static var nothingSettings: Logger.FormatSettings { + return Logger.FormatSettings(shouldShowLevel: false, shouldShowFile: false, shouldShowFunction: false, shouldShowLine: false) + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.Formatter.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.Formatter.swift new file mode 100644 index 0000000..a94e085 --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.Formatter.swift @@ -0,0 +1,64 @@ +public extension Logger { + + public struct Formatter { + + public init(){} + } +} + +extension Logger.Formatter: CanFormatMessageInFileInFunctionAtLineWithSettings { + + public func format(_ message: Any, with levelString: String, in file: String?, in function: String?, at line: Int?, with settings: Logger.FormatSettings) -> String { + var formattedMessage = "" + + if settings.shouldShowLevel { + formattedMessage.append(levelString) + } + + if settings.shouldShowFile, + let file = file { + if formattedMessage.count > 0 { + formattedMessage.append(" ") + } + formattedMessage.append("\(format(fileName: file))") + + if settings.shouldShowFunction, + let function = function { + formattedMessage.append(".\(function)") + } + } else if settings.shouldShowFunction, + let function = function { + if formattedMessage.count > 0 { + formattedMessage.append(" ") + } + + formattedMessage.append(function) + } + + if settings.shouldShowLine, + let line = line { + if formattedMessage.count > 0 { + formattedMessage.append(" ") + } + + formattedMessage.append("\(line)" ) + } + + if (message as? String)?.count != 0 { + if formattedMessage.count > 0 { + formattedMessage.append(" ") + } + + formattedMessage.append("\(message)") + } + + return formattedMessage + } +} + +private extension Logger.Formatter { + + func format(fileName: String) -> String { + return String(URL(fileURLWithPath: fileName).deletingPathExtension().lastPathComponent) + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.Settings.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.Settings.swift new file mode 100644 index 0000000..69b3624 --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/Logger.Settings.swift @@ -0,0 +1,98 @@ +extension Logger { + public struct Settings { + /// All messages with loglevel equal to or above this logLevel will be logged + public var activeLogLevel: Loglevel + + /// Messages logged without a logLevel will automatically be logged at this logLevel + public var defaultLogLevel: Loglevel + + /// The strings that will be used to identify each loglevel in a formatted message + public var loglevelStrings: [Loglevel: String] + + /// All messages created by formatter will be logged to this destination + /// By default this destination will be a ConsoleLogger but any other destination can be injected either here on in the constructor + public var destination: CanLogMessage + + /// Will turn logLevel, message, file, function and line into the strings that will be logged to destination + public var formatter: CanFormatMessageInFileInFunctionAtLineWithSettings + + /// Format settings per logLevel that will used by formatter to format messages + public var formatSettings: [Loglevel: FormatSettings] + + public init(activeLogLevel: Loglevel = .verbose, + defaultLogLevel: Loglevel = .info, + loglevelStrings: [Loglevel: String] = [.verbose: "🔍", .info: "ℹī¸", .warning: "⚠ī¸", .error:"⛔ī¸"], + destination: CanLogMessage = ConsoleLogger(), + formatter: CanFormatMessageInFileInFunctionAtLineWithSettings = Formatter(), + formatSettings: [Loglevel: FormatSettings] = [.verbose : FormatSettings(shouldShowLevel: true, shouldShowFile: true, shouldShowFunction: true, shouldShowLine: true), + .info : FormatSettings(shouldShowLevel: true, shouldShowFile: true, shouldShowFunction: true, shouldShowLine: false), + .warning : FormatSettings(shouldShowLevel: true, shouldShowFile: true, shouldShowFunction: true, shouldShowLine: false), + .error : FormatSettings(shouldShowLevel: true, shouldShowFile: true, shouldShowFunction: true, shouldShowLine: false)]) { + self.activeLogLevel = activeLogLevel + self.defaultLogLevel = defaultLogLevel + self.loglevelStrings = loglevelStrings + self.destination = destination + self.formatter = formatter + self.formatSettings = formatSettings + } + } +} + +public extension Logger.Settings { + + /// Will cause messages for all levels to be logged to the destination + static var verboseSettings: Logger.Settings { + var settings = Logger.Settings() + settings.activeLogLevel = .verbose + return settings + } + + /// Will cause messages for Loglevel.info and higher to be logged to the destination + static var infoSettings: Logger.Settings { + var settings = Logger.Settings() + settings.activeLogLevel = .info + return settings + } + + /// Will cause messages for Loglevel.warning and higher to be logged to the destination + static var warningSettings: Logger.Settings { + var settings = Logger.Settings() + settings.activeLogLevel = .warning + return settings + } + + /// Will cause messages for Loglevel.error and higher to be logged to the destination + static var errorSettings: Logger.Settings { + var settings = Logger.Settings() + settings.activeLogLevel = .error + return settings + } + + /// Will cause no message to be logged to the destination + static var inactiveSettings: Logger.Settings { + var settings = Logger.Settings() + settings.activeLogLevel = .inactive + return settings + } + + /// Same settings but with provided defaultLogLevel + func with(defaultLogLevel: Loglevel) -> Logger.Settings { + var settings = self + settings.defaultLogLevel = defaultLogLevel + return settings + } + + /// Same settings but with provided destination + func with(destination: CanLogMessage) -> Logger.Settings { + var settings = self + settings.destination = destination + return settings + } + + /// Same settings but with provided formatsettings + func with(formatSettings: [Loglevel: Logger.FormatSettings]) -> Logger.Settings { + var settings = self + settings.formatSettings = formatSettings + return settings + } +} diff --git a/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/SimpleLogger.Settings.swift b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/SimpleLogger.Settings.swift new file mode 100644 index 0000000..dfcf6bb --- /dev/null +++ b/Example/Pods/InjectableLoggers/InjectableLoggers/Classes/Structs/SimpleLogger.Settings.swift @@ -0,0 +1,80 @@ +public extension SimpleLogger { + + public struct Settings { + + /// All messages with loglevel equal to or above this logLevel will be logged + public var activeLogLevel: Loglevel + + /// Messages logged without a logLevel will automatically be logged at this logLevel + public var defaultLogLevel: Loglevel + + /// The strings that will be used to identify each loglevel in a formatted message + public var loglevelStrings: [Loglevel: String] + + /// All messages created by formatter will be logged to this destination + /// By default this destination will be a ConsoleLogger but any other destination can be injected either here on in the constructor + public var destination: CanLogMessage + + public init(activeLogLevel: Loglevel = .verbose, + defaultLogLevel: Loglevel = .info, + loglevelStrings: [Loglevel: String] = [.verbose: "🔍", .info: "ℹī¸", .warning: "⚠ī¸", .error:"⛔ī¸"], + destination: CanLogMessage = ConsoleLogger()) { + self.activeLogLevel = activeLogLevel + self.defaultLogLevel = defaultLogLevel + self.loglevelStrings = loglevelStrings + self.destination = destination + } + } +} + +public extension SimpleLogger.Settings { + + /// Will cause messages for all levels to be logged to the destination + static var verboseSettings: SimpleLogger.Settings { + var settings = SimpleLogger.Settings() + settings.activeLogLevel = .verbose + return settings + } + + /// Will cause messages for Loglevel.info and higher to be logged to the destination + static var infoSettings: SimpleLogger.Settings { + var settings = SimpleLogger.Settings() + settings.activeLogLevel = .info + return settings + } + + /// Will cause messages for Loglevel.warning and higher to be logged to the destination + static var warningSettings: SimpleLogger.Settings { + var settings = SimpleLogger.Settings() + settings.activeLogLevel = .warning + return settings + } + + /// Will cause messages for Loglevel.error and higher to be logged to the destination + static var errorSettings: SimpleLogger.Settings { + var settings = SimpleLogger.Settings() + settings.activeLogLevel = .error + return settings + } + + /// Will cause no message to be logged to the destination + static var inactiveSettings: SimpleLogger.Settings { + var settings = SimpleLogger.Settings() + settings.activeLogLevel = .inactive + return settings + } + + /// Same settings but with provided defaultLogLevel + func with(defaultLogLevel: Loglevel) -> SimpleLogger.Settings { + var settings = self + settings.defaultLogLevel = defaultLogLevel + return settings + } + + /// Same settings but with provided destination + func with(destination: CanLogMessage) -> SimpleLogger.Settings { + var settings = self + settings.destination = destination + return settings + } +} diff --git a/Example/Pods/InjectableLoggers/LICENSE b/Example/Pods/InjectableLoggers/LICENSE new file mode 100644 index 0000000..fd65c88 --- /dev/null +++ b/Example/Pods/InjectableLoggers/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018 mclovink@me.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Example/Pods/InjectableLoggers/README.md b/Example/Pods/InjectableLoggers/README.md new file mode 100644 index 0000000..92f6279 --- /dev/null +++ b/Example/Pods/InjectableLoggers/README.md @@ -0,0 +1,153 @@ +# InjectableLoggers + [![Version](http://img.shields.io/cocoapods/v/InjectableLoggers.svg?style=flat)](http://cocoapods.org/pods/Zoomy) [![Platform](http://img.shields.io/cocoapods/p/InjectableLoggers.svg?style=flat)](http://cocoapods.org/pods/Zoomy) [![License](http://img.shields.io/cocoapods/l/InjectableLoggers.svg?style=flat)](LICENSE) + +A nice set of protocols that will help logger(s) at being loosely coupled, injectable and testable. + +## Example + +To see the example project, run the following in your terminal: + +`pod try InjectableLoggers` + +## Setup +Just add: + +`import InjectableLoggers` + +to the files where you need some injectable logging action. + +### Making your logger injectable + +Depending on how much functionality you want (to expose) from a logger, make a logger conform to one of the following protocols: + +`CanLog` + +`CanLogMessage` + +`CanLogMessageAtLevel` + +All of thes protocols have lightweight and sensible default implementations and make sure you never have to implement more than one of their methods. + +### Making an existing logger injectable + +#### When it uses instance methods for logging + +```swift +extension SomeoneElsesLogger: CanLogMessageAtLevel /* CanLog || CanLogMessage */ { + + func log(_ message Any, at: LogLevel) { + //call existing logging functionality here + } +} +``` + +#### When it uses class methods for logging + +```swift +struct Logger: CanLogMessageAtLevel /* CanLog || CanLogMessage */ { + + func log(_ message Any, at: LogLevel) { + //call existing logging functionality here + } +} +``` + +### Doing some logging + +Depending on which protocols your loggers conform to, you can call the following methods: + +```swift +logger.log() //Will log "" to default LogLevel if expected +logger.log(42) //Will log 42 to default LogLevel if expected +logger.log("Something not to important", at LogLevel.verbose) +logger.log("Something broke!", at: LogLevel.error) +``` + +Bonus! This lib comes with two concrete loggers 🎉 + +**ConsoleLogger** + +```swift +let logger: CanLogMessage = ConsoleLogger() + +logger.log() // logs to console: "" +logger.log(42) // logs to console: 42 +logger.log("Hi there") // logs to console: "Hi there" +``` + +**Logger** + +```swift +let logger: CanLogMessageAtLevel = Logger(settings: .warningSettings) + +logger.log("Some info", atLevel LogLevel.info) //Won't log anything because of settings +logger.log("Something's up") // logs to settings.destination: "⚠ī¸ Something's up" +logger.log("Something went wrong") // logs to settings.destination: "⛔ī¸ Something's up" +``` + +`settings.destination`? + +Yes, settings has it's own `CanLogMessage` instance (`ConsoleLogger` by default) which is used for logging all created strings. This not only made `Logger` completely testable (and tested) but it also allows you to log to different destinations if needed. + + +### Testing that what was expected is being logged +Another bonus! This lib comes with a pretty handy mock logger called `MockLogger` 🎉 + +```swift +class ViewControllerTests: XCTestCase { + + var sut: ViewController! + var mockLogger: MockLogger! + + override func setUp() { + super.setUp() + + sut = ViewController() + mockLogger = MockLogger() + } + + // MARK: Single line assertions + func testViewDidLoad() { + //Arrange + sut.logger = mockLogger //Inject mockLogger + + //Act + sut.viewDidLoad() + + //Assert + XCTAssertEqual(mockLogger.loggedMessages(at: Loglevel.info).last?.message as? String, "viewDidLoad()") + } + + // MARK: More verbose assertions + func testDidReceiveMemoryWarning() { + //Arrange + sut.logger = mockLogger //Inject mockLogger + + //Act + sut.didReceiveMemoryWarning() + + //Assert + XCTAssertEqual(mockLogger.loggedMessages.last?.message as? String, "didReceiveMemoryWarning()") + XCTAssertEqual(mockLogger.loggedMessages.last?.level, Loglevel.warning) + } +} +``` + +For some more advance testing check out the example project. + +## Installation + +InjectableLoggers is available through [CocoaPods](http://cocoapods.org). To install +it, simply add the following line to your Podfile: + +```ruby +pod 'InjectableLoggers' +``` + +## Author + +Menno Lovink, mclovink@me.com + +## License + +InjectableLoggers is available under the MIT license. See the LICENSE file for more info. diff --git a/Example/Pods/Local Podspecs/QuickGWT.podspec.json b/Example/Pods/Local Podspecs/QuickGWT.podspec.json new file mode 100644 index 0000000..f1e03f5 --- /dev/null +++ b/Example/Pods/Local Podspecs/QuickGWT.podspec.json @@ -0,0 +1,29 @@ +{ + "name": "QuickGWT", + "version": "1.0.0", + "summary": "Simply adds Given When and Then to Quick.", + "description": "Simply adds Given When and Then to Quick. And makes sure the test outputs are looking pretty.", + "homepage": "https://github.com/mennolovink/QuickGWT", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": { + "mennolovink": "mclovink@me.com" + }, + "source": { + "git": "https://github.com/mennolovink/QuickGWT.git", + "tag": "1.0.0" + }, + "platforms": { + "ios": "7.0", + "osx": "10.10", + "tvos": "9.0" + }, + "source_files": "QuickGWT/Classes/**/*", + "dependencies": { + "Quick": [ + "~> 1.3" + ] + } +} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..509a2bf --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,36 @@ +PODS: + - InjectableLoggers (1.2.0) + - MockNStub (0.1.1): + - InjectableLoggers (~> 1) + - Nimble (7.1.1) + - Quick (1.3.0) + - QuickGWT (1.0.0): + - Quick (~> 1.3) + +DEPENDENCIES: + - InjectableLoggers (~> 1) + - MockNStub + - Nimble + - QuickGWT (from `../`) + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - InjectableLoggers + - MockNStub + - Nimble + - Quick + +EXTERNAL SOURCES: + QuickGWT: + :path: "../" + +SPEC CHECKSUMS: + InjectableLoggers: f63523bbb55c5b41ba7cb6a053f5de7aca20a009 + MockNStub: 2066a12b2f60abc90c6d1048db2ba2dcbae8bbb6 + Nimble: 391f07782af4b37914f9bd7b2ffbb952731b8202 + Quick: 03278013f71aa05fe9ecabc94fbcc6835f1ee76f + QuickGWT: e7e917d40acc05a72828240aa44a0fd8091b2eba + +PODFILE CHECKSUM: 43f439e3508eabc68bf8d2ad166d924aa0f17bde + +COCOAPODS: 1.5.2 diff --git a/Example/Pods/MockNStub/LICENSE b/Example/Pods/MockNStub/LICENSE new file mode 100644 index 0000000..bef6571 --- /dev/null +++ b/Example/Pods/MockNStub/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018 mennolovink + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Classes/ArgumentMatcher.swift b/Example/Pods/MockNStub/MockNStub/Classes/Classes/ArgumentMatcher.swift new file mode 100644 index 0000000..fc7cda0 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Classes/ArgumentMatcher.swift @@ -0,0 +1,28 @@ +public class ArgumentMatcher { + + private let matcher: (ArgumentsType) -> Bool + + public init(matcher: @escaping (ArgumentsType) -> Bool) { + self.matcher = matcher + } +} + +public extension ArgumentMatcher { + + /// Matches any argument + public static var any: ArgumentMatcher { + return anyArgumentMatcher + } +} + +extension ArgumentMatcher: MatchingArguments { + + public func match(arguments: Any) -> Bool { + guard let arguments = arguments as? ArgumentsType else { + return false + } + return matcher(arguments) + } +} + + diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/Mocking.swift b/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/Mocking.swift new file mode 100644 index 0000000..36f4208 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/Mocking.swift @@ -0,0 +1,82 @@ +public protocol Mocking: Stubbing, ProvidingMutableCalls, ProvidingMutableVerifications, ProvidingFailureHandler {} + +//MARK: Pubblic +public extension Mocking { + + // MARK: Selectors + func didCallSelector(_ selector: Selector) { + didCallSelector(selector, withArguments: []) + } + + func didCallSelector(_ selector: Selector, withArguments arguments: Any?...) { + registerCall(to: selector, withArguments: arguments) + } + + func didCallSelector(_ selector: Selector) -> ReturnType? { + return didCallSelector(selector, withArguments: []) + } + + func didCallSelector(_ selector: Selector, withArguments arguments: Any?...) -> ReturnType? { + registerCall(to: selector, withArguments: arguments) + return valueForSelector(selector, with: arguments.tuple) + } + + func expect(callToSelector selector: Selector, withArgumentsThatMatch matcher: MatchingArguments = anyArgumentMatcher) { + verifications.append(Verification(selector: selector, matcher: matcher)) + } + + // MARK: Functions + func didCallFunction(_ function: String = #function) { + didCallFunction(withArguments: []) + } + + func didCallFunction(_ function: String = #function, withArguments arguments: Any?...) { + registerCall(to: function, withArguments: arguments) + } + + func didCallFunction(_ function: String = #function) -> ReturnType? { + return didCallFunction(function, withArguments: []) + } + + func didCallFunction(_ function: String = #function, withArguments arguments: Any?...) -> ReturnType? { + registerCall(to: function, withArguments: arguments) + return valueForFunction(function, with: arguments.tuple) + } + + func expect(callToFunction function: String, withArgumentsThatMatch matcher: MatchingArguments = anyArgumentMatcher) { + verifications.append(Verification(function: function, matcher: matcher)) + } + + // MARK: Verification + func verify(inFile file: StaticString = #file, atLine line: UInt = #line) { + for verification in verifications { + if calls.filter({ $0.selector == verification.selector && + $0.function == verification.function }).filter({ verification.matcher.match(arguments: $0.arguments) }).count == 0 { + + failureHandler.fail(with: "Could not verify call to `\(methodName(from: verification))`", at: Location(file: file, line: line)) + } + } + } +} + +//MARK: Private +private extension Mocking { + + func registerCall(to function: String, withArguments arguments: [Any?]) { + calls.append(Call(function: function, arguments: arguments.tuple)) + } + + func registerCall(to selector: Selector, withArguments arguments: [Any?]) { + calls.append(Call(selector: selector, arguments: arguments.tuple)) + } + + func methodName(from verification: Verification) -> String { + if let selector = verification.selector { + return "\(selector)" + } else if let function = verification.function { + return function + } else { + return "" + } + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/ProvidingFailureHandler.swift b/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/ProvidingFailureHandler.swift new file mode 100644 index 0000000..e5e1046 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/ProvidingFailureHandler.swift @@ -0,0 +1,15 @@ +public protocol ProvidingFailureHandler { + + var failureHandler: FailingWithMessageAtLocation { get } +} + +public extension ProvidingFailureHandler where Self: Mocking { + + var failureHandler: FailingWithMessageAtLocation { + if let failureHandler: FailingWithMessageAtLocation = valueForFunction() { + return failureHandler + } else { + return XCTFailureHandler() + } + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/Stubbing.swift b/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/Stubbing.swift new file mode 100644 index 0000000..80bd9b7 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Extended Protocols/Stubbing.swift @@ -0,0 +1,85 @@ +public protocol Stubbing: ProvidingMutableCallValues {} + +//MARK: Public +public extension Stubbing { + + // MARK: Selectors + func didCallSelector(_ selector: Selector, withArguments arguments: Any?...) -> ReturnType? { + return valueForSelector(selector, with: arguments.tuple) + } + + func given(_ selector: Selector, withArgumentsThatMatch matcher: MatchingArguments = anyArgumentMatcher, willReturn value: Any?) { + callValues.append(CallValue(selector: selector, value: value, matcher: matcher)) + } + + func valueForSelector(_ selector: Selector) -> ReturnType? { + return valueForSelector(selector, with: []) + } + + // MARK: Functions + func didCallFunction(_ function: String = #function, withArguments arguments: Any?...) -> ReturnType? { + return valueForFunction(function, with: arguments.tuple) + } + + func given(_ function: String, withArgumentsThatMatch matcher: MatchingArguments = anyArgumentMatcher, willReturn value: Any?) { + callValues.append(CallValue(function: function, value: value, matcher: matcher)) + } + + func valueForFunction(_ function: String = #function) -> ReturnType? { + return valueForFunction(function, with: []) + } +} + +//MARK: Internal +internal extension Stubbing { + + // MARK: Selectors + func valueForSelector(_ selector: Selector, with arguments: Any) -> ReturnType? { + guard let nonNilValue = callValues.filter({ $0.selector == selector }).filter({ $0.matcher.match(arguments: arguments) }).compactMap({ $0.value }).last else { + if !isOptional(ReturnType.self) { + logger.log(""" + + + Got nil when asking for non optional type \(ReturnType.self) + there's probably a stub missing for selector `\(selector)` that's called with arguments `\(arguments)` + + current stubs: + \(dump(callValues))\n + """, atLevel: .warning) + } + return nil + } + + guard let valueOfExpectedType = nonNilValue as? ReturnType else { + logger.log("Asking for value of type that's unkown to selector: `\(String(describing: selector))` \nExpected: \(type(of: nonNilValue)) Asked: \(ReturnType.self)", atLevel: .warning) + return nil + } + + return valueOfExpectedType + } + + // MARK: Functions + func valueForFunction(_ function: String = #function, with arguments: Any) -> ReturnType? { + guard let nonNilValue = callValues.filter({ $0.function == function }).filter({ $0.matcher.match(arguments: arguments) }).compactMap({ $0.value }).last else { + if !isOptional(ReturnType.self) { + logger.log(""" + + + Got nil when asking for non optional type \(ReturnType.self) + there's probably a stub missing for function: `\(function)` that's called with arguments `\(arguments)` + + current stubs: + \(dump(callValues))\n + """, atLevel: .warning) + } + return nil + } + + guard let valueOfExpectedType = nonNilValue as? ReturnType else { + logger.log("Asking for value of type that's unkown to function: `\(function)`\n Expected: \(type(of: nonNilValue)) Asked: \(ReturnType.self)", atLevel: .warning) + return nil + } + + return valueOfExpectedType + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Extensions/Array+tuple.swift b/Example/Pods/MockNStub/MockNStub/Classes/Extensions/Array+tuple.swift new file mode 100644 index 0000000..0e3a813 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Extensions/Array+tuple.swift @@ -0,0 +1,60 @@ +internal extension Array { + + var tuple: Any { + switch count { + case 0: + return () + case 1: + return (self[0]) + case 2: + return (self[0], self[1]) + case 3: + return (self[0], self[1], self[2]) + case 4: + return (self[0], self[1], self[2], self[3]) + case 5: + return (self[0], self[1], self[2], self[3], self[4]) + case 6: + return (self[0], self[1], self[2], self[3], self[4], self[5]) + case 7: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6]) + case 8: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7]) + case 9: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8]) + case 10: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9]) + case 11: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10]) + case 12: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11]) + case 13: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12]) + case 14: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13]) + case 15: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14]) + case 16: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15]) + case 17: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16]) + case 18: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16], self[17]) + case 19: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16], self[17], self[18]) + case 20: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16], self[17], self[18], self[19]) + case 21: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16], self[17], self[18], self[19], self[20]) + case 22: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16], self[17], self[18], self[19], self[20], self[21]) + case 23: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16], self[17], self[18], self[19], self[20], self[21], self[22]) + case 24: + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16], self[17], self[18], self[19], self[20], self[21], self[22], self[23]) + default: + logger.log("Can currently only create tuples from arrays with up to 24 elements. Elements at index 25 and up will be lost", atLevel: .warning) + return (self[0], self[1], self[2], self[3], self[4], self[5], self[6], self[7], self[8], self[9], self[10], self[11], self[12], self[13], self[14], self[15], self[16], self[17], self[18], self[19], self[20], self[21], self[22], self[23]) + } + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Functions/dumpValue.swift b/Example/Pods/MockNStub/MockNStub/Classes/Functions/dumpValue.swift new file mode 100644 index 0000000..b7784dc --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Functions/dumpValue.swift @@ -0,0 +1,5 @@ +func dump(_ value: T) -> String { + var result = String() + dump(value, to: &result) + return result +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Functions/isOptionalType.swift b/Example/Pods/MockNStub/MockNStub/Classes/Functions/isOptionalType.swift new file mode 100644 index 0000000..805d23f --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Functions/isOptionalType.swift @@ -0,0 +1,4 @@ +func isOptional(_ type: Any.Type) -> Bool { + /// I curently don't know of a better way to do this + return String(describing: type).hasPrefix("Optional") +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Protocols/FailingWithMessageAtLocation.swift b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/FailingWithMessageAtLocation.swift new file mode 100644 index 0000000..b9044ae --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/FailingWithMessageAtLocation.swift @@ -0,0 +1,4 @@ +public protocol FailingWithMessageAtLocation { + + func fail(with message: String, at location: Location) +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Protocols/MatchingArguments.swift b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/MatchingArguments.swift new file mode 100644 index 0000000..10a5489 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/MatchingArguments.swift @@ -0,0 +1,4 @@ +public protocol MatchingArguments { + + func match(arguments: Any) -> Bool +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableCallValues.swift b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableCallValues.swift new file mode 100644 index 0000000..74458e9 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableCallValues.swift @@ -0,0 +1,22 @@ +public protocol ProvidingMutableCallValues: class { + + var callValues: [CallValue] { get set } +} + +public extension ProvidingMutableCallValues { + + var callValues: [CallValue] { + get { + if let callValues = objc_getAssociatedObject(self, &AsociatedKeys.callValues) as? [CallValue] { + return callValues + } else { + let callValues = [CallValue]() + objc_setAssociatedObject(self, &AsociatedKeys.callValues, callValues, .OBJC_ASSOCIATION_RETAIN) + return callValues + } + } + set { + objc_setAssociatedObject(self, &AsociatedKeys.callValues, newValue, .OBJC_ASSOCIATION_RETAIN) + } + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableCalls.swift b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableCalls.swift new file mode 100644 index 0000000..1135f2d --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableCalls.swift @@ -0,0 +1,22 @@ +public protocol ProvidingMutableCalls: class { + + var calls: [Call] { get set } +} + +public extension ProvidingMutableCalls { + + var calls: [Call] { + get { + if let calls = objc_getAssociatedObject(self, &AsociatedKeys.calls) as? [Call] { + return calls + } else { + let calls = [Call]() + objc_setAssociatedObject(self, &AsociatedKeys.calls, calls, .OBJC_ASSOCIATION_RETAIN) + return calls + } + } + set { + objc_setAssociatedObject(self, &AsociatedKeys.calls, newValue, .OBJC_ASSOCIATION_RETAIN) + } + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableVerifications.swift b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableVerifications.swift new file mode 100644 index 0000000..58f18cf --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Protocols/ProvidingMutableVerifications.swift @@ -0,0 +1,22 @@ +public protocol ProvidingMutableVerifications: class { + + var verifications: [Verification] { get set } +} + +public extension ProvidingMutableVerifications { + + var verifications: [Verification] { + get { + if let verifications = objc_getAssociatedObject(self, &AsociatedKeys.verifications) as? [Verification] { + return verifications + } else { + let verifications = [Verification]() + objc_setAssociatedObject(self, &AsociatedKeys.verifications, verifications, .OBJC_ASSOCIATION_RETAIN) + return verifications + } + } + set { + objc_setAssociatedObject(self, &AsociatedKeys.verifications, newValue, .OBJC_ASSOCIATION_RETAIN) + } + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Shared Instances/anyArgumentMatcher.swift b/Example/Pods/MockNStub/MockNStub/Classes/Shared Instances/anyArgumentMatcher.swift new file mode 100644 index 0000000..b15ee7a --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Shared Instances/anyArgumentMatcher.swift @@ -0,0 +1,2 @@ +/// Matches any argument +public let anyArgumentMatcher = ArgumentMatcher(matcher: { (args: Any) -> Bool in return true }) diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Shared Instances/logger.swift b/Example/Pods/MockNStub/MockNStub/Classes/Shared Instances/logger.swift new file mode 100644 index 0000000..d889f44 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Shared Instances/logger.swift @@ -0,0 +1,11 @@ +import InjectableLoggers + + +/// The settings that will be used by `logger` +/// The changes to these settings will only have effect when done before the first `logger` calls have been made +public var loggerSettings = Logger.Settings(activeLogLevel: .warning, + defaultLogLevel: .verbose, + loglevelStrings: [.verbose: "🔍", .info: "ℹī¸", .warning: "\n⚠ī¸", .error:"\n⛔ī¸"]) + +internal let logger = Logger(settings: loggerSettings) +internal typealias Loglevel = InjectableLoggers.Loglevel diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Structs/AsociatedKeys.swift b/Example/Pods/MockNStub/MockNStub/Classes/Structs/AsociatedKeys.swift new file mode 100644 index 0000000..b6c1f9d --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Structs/AsociatedKeys.swift @@ -0,0 +1,6 @@ +internal struct AsociatedKeys { + + static var calls = "calls" + static var callValues = "callvalues" + static var verifications = "verifications" +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Structs/Call.swift b/Example/Pods/MockNStub/MockNStub/Classes/Structs/Call.swift new file mode 100644 index 0000000..1366db1 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Structs/Call.swift @@ -0,0 +1,38 @@ +public class Call { + + let selector: Selector? + let function: String? + let arguments: Any + + public required init(selector: Selector, arguments: Any) { + self.selector = selector + self.function = nil + self.arguments = arguments + } + + public required init(function: String, arguments: Any) { + self.selector = nil + self.function = function + self.arguments = arguments + } +} + +extension Call: CustomStringConvertible { + public var description: String { + var description = "" + + if let selector = selector { + description.append("selector: ") + description.append(String(describing: selector)) + } + if let function = function { + description.append("function: ") + description.append(function) + } + + description.append(" arguments: ") + description.append(String(describing: arguments)) + + return description + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Structs/CallValue.swift b/Example/Pods/MockNStub/MockNStub/Classes/Structs/CallValue.swift new file mode 100644 index 0000000..bf3c24c --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Structs/CallValue.swift @@ -0,0 +1,44 @@ +public class CallValue { + + public let selector: Selector? + public let function: String? + public let value: Any? + public let matcher: MatchingArguments + + public required init(selector: Selector, value: Any?, matcher: MatchingArguments) { + self.selector = selector + self.function = nil + self.value = value + self.matcher = matcher + } + + public required init(function: String, value: Any?, matcher: MatchingArguments) { + self.selector = nil + self.function = function + self.value = value + self.matcher = matcher + } +} + +extension CallValue: CustomStringConvertible { + public var description: String { + var description = "" + + if let selector = selector { + description.append("selector: ") + description.append(String(describing: selector)) + } + if let function = function { + description.append("function: ") + description.append(function) + } + + description.append(" value: ") + description.append(String(describing: value ?? "nil")) + + description.append(" matcher: ") + description.append(String(describing: matcher)) + + return description + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Structs/Location.swift b/Example/Pods/MockNStub/MockNStub/Classes/Structs/Location.swift new file mode 100644 index 0000000..b45386c --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Structs/Location.swift @@ -0,0 +1,9 @@ +public struct Location { + public let file: StaticString + public let line: UInt + + public init(file: StaticString = #file, line: UInt = #line) { + self.file = file + self.line = line + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Structs/Verification.swift b/Example/Pods/MockNStub/MockNStub/Classes/Structs/Verification.swift new file mode 100644 index 0000000..8e331f3 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Structs/Verification.swift @@ -0,0 +1,39 @@ +public class Verification { + + let selector: Selector? + let function: String? + let matcher: MatchingArguments + + public required init(selector: Selector, matcher: MatchingArguments) { + self.selector = selector + self.function = nil + self.matcher = matcher + } + + public required init(function: String, matcher: MatchingArguments) { + self.selector = nil + self.function = function + self.matcher = matcher + } +} + +extension Verification: CustomStringConvertible { + + public var description: String { + var description = "" + + if let selector = selector { + description.append("selector: ") + description.append(String(describing: selector)) + } + if let function = function { + description.append("function: ") + description.append(function) + } + + description.append(" matcher: ") + description.append(String(describing: matcher)) + + return description + } +} diff --git a/Example/Pods/MockNStub/MockNStub/Classes/Structs/XCTFailureHandler.swift b/Example/Pods/MockNStub/MockNStub/Classes/Structs/XCTFailureHandler.swift new file mode 100644 index 0000000..e0a2b11 --- /dev/null +++ b/Example/Pods/MockNStub/MockNStub/Classes/Structs/XCTFailureHandler.swift @@ -0,0 +1,10 @@ +import XCTest + +public struct XCTFailureHandler: FailingWithMessageAtLocation { + + public func fail(with message: String, at location: Location) { + XCTFail(message, file: location.file, line: location.line) + } + + public init() {} +} diff --git a/Example/Pods/MockNStub/README.md b/Example/Pods/MockNStub/README.md new file mode 100644 index 0000000..49476f4 --- /dev/null +++ b/Example/Pods/MockNStub/README.md @@ -0,0 +1,287 @@ +# Mock 'N Stub + + [![Version](http://img.shields.io/cocoapods/v/MockNStub.svg?style=flat)](http://cocoapods.org/pods/Zoomy) [![Platform](http://img.shields.io/cocoapods/p/MockNStub.svg?style=flat)](http://cocoapods.org/pods/Zoomy) [![License](http://img.shields.io/cocoapods/l/MockNStub.svg?style=flat)](LICENSE) + +Code completed Mocking and Stubbing for Swift protocols and classes. + +## Example + +To see the example project, run the following in your terminal: + +``` +pod try MockNStub +``` + +## Setup + +Just add: + +```Swift +import MockNStub +``` + +to the files where you need to create mocks or stubs. + +## All Mocks are Stubs + +All created mocks conform to the `Mocking` protocol and since `Mocking` conforms to the `Stubbing` protocol, all created mocks can automatically be used as stubs too. + +Wenever you feel that an explicit stub needs to support `Mocking`, all you need to do is change it's conformance from `Stubbing` to `Mocking`. + +## Class Mocks and Protocol share the exact same interface +The implementations in MockNStub are completely protocol oriented. This allows the interface of class and protocol mocks (and stubs) to be exactly the same. All explicit stubs conform to `Stubbing` and all mocks conform to `Mocking`. There's never a need to inherit from a concrete type from this library. + +## Two ways of creating fakes + +We can create mocks stubs in two ways; using `@objc` **selectors** and using **functions** (or more specifically their names). While using the function names to create [stubs](###Creating-stubs) and [mocks](###Creating-mocks) is a bit faster because needed function name is known within the scope of the stub or mock, it's more error (typo) prone when using these fakes because identifying methods by their names from the outside of the fake does (currently) not currently support code completion or inference. + +Therefore identifying methods using selectors is the recommended way. However some methods can't be identified using selectors because they use swift types that can't be represented in objc. The compiler will let you know when this is the case. + +When your fake inherits from NSObject in whatever way, there's no need to prefix it's methods with `@objc `, when it isn't the compiler will let you know and give helpful quick fixes. + +When creating fakes (mocks or stubs) and identifying them using their function names, it can be helpful to store these names in constants. Proper support for enums with this purpose will be added soon. + +When creating fakes and identifying them using their selectors, it can be helpful to leverage Xcode's code snippets to avoid having to type `#selector()` all the time. These snippets will soon be added to this repo as well. + +Please note that neither the `Mocking` or `Stubbing` protocols rely on **one** way of doing this. You can mix it up whenever needed. For instance some methods in the same fake can be identified using their function names while others can be identified by their selectors. + +## Stubbing +### Creating stubs +#### Using selectors +```Swift +class UITableViewDataSourceStub: Stubbing, UITableViewDataSource { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return didCallSelector(#selector(tableView(_:numberOfRowsInSection:)), withArguments: tableView, section)! + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return didCallSelector(#selector(tableView(_:cellForRowAt:)), withArguments: tableView, indexPath)! + } +} +``` +Notes: + +* Everything inside `#selector()` is code completed. +* [No need](###unwapping-return-value-of-didCall()) to worry about force unwrapping the optional value that's returned. + +#### Using function names +```Swift +class UITableViewDataSourceStub: Stubbing, UITableViewDataSource { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return didCallFunction(withArguments: tableView, section)! + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return didCallFunction(withArguments: tableView, indexPath)! + } +} +``` +Notes: + +* No need to manually provide a function name. + +### Adding return values to stubs +#### Using selectors +Considering: + +```Swift +let stub = UITableViewDataSourceStub() +``` + +You can add stub values like this: + +```Swift +stub.given(#selector(sut.tableView(_:numberOfRowsInSection:)), willReturn: 0) +stub.given(#selector(sut.tableView(_:cellForRowAt:)), willReturn: UITableViewCell()) +``` + +Or when needing to be more specific, like this: + +```Swift +stub.given(#selector(sut.tableView(_:numberOfRowsInSection:)), withArgumentsThatMatch: ArgumentMatcher(matcher: { (args: (UITableView, Int)) -> Bool in + return args.0 === expectedTableView && args.1 == 2 +}), willReturn: 42) +``` +Notes: + +* Argument matcher won't match if argument types are not correct. + +#### Using function names +Considering: + +```Swift +let stub = UITableViewDataSourceStub() +``` + +You can add stub values like this: + +```Swift +stub.given("tableView(_:numberOfRowsInSection:)", willReturn: 0) +stub.given("tableView(_:cellForRowAt:)", willReturn: UITableViewCell()) +``` + +Or when needing to be more specific, like this: + +```Swift +stub.given("tableView(_:numberOfRowsInSection:)"), withArgumentsThatMatch: ArgumentMatcher(matcher: { (args: (UITableView, Int)) -> Bool in + return args.0 === expectedTableView && args.1 == 2 +}), willReturn: 42) +``` +Notes: + +* Argument matcher won't match if argument types are not correct. + +## Mocking +### Creating mocks +#### Using selectors + +```Swift +class UITableViewDataSourceMock: NSObject, Mocking, UITableViewDataSource { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return didCallSelector(#selector(tableView(_:numberOfRowsInSection:)), withArguments: tableView, section)! + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return didCallSelector(#selector(tableView(_:cellForRowAt:)), withArguments: tableView, indexPath)! + } +} +``` +Notes: + +* Every mock directly suports stubbing + +#### Using function names + +```Swift +class UITableViewDataSourceMock: NSObject, Mocking, UITableViewDataSource { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return didCallFunction(withArguments: tableView, section)! + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return didCallFunction(withArguments: tableView, indexPath)! + } +} +``` + +### Creating expectations +#### Using selectors + +Considering: + +```Swift +let mock = UITableViewDataSourceMock() +``` + +You can add expectations like this: + +```Swift +mock.expect(callToSelector: #selector(sut.tableView(_:cellForRowAt:))) +mock.expect(callToSelector: #selector(sut.tableView(_:numberOfRowsInSection:))) +``` + +Or when needing to be more specific, like this: + +```Swift +mock.expect(callToSelector: #selector(sut.tableView(_:numberOfRowsInSection:)), withArgumentsThatMatch: ArgumentMatcher(matcher: { (args: (UITableView, Int)) -> Bool in + return args.0 === tableView && args.1 == 42 +})) +``` +#### Using function names + +```Swift +let mock = UITableViewDataSourceMock() +``` + +You can add expectations like this: + +```Swift +mock.expect(callToFunction: "tableView(_:cellForRowAt:)") +mock.expect(callToFunction: "tableView(_:numberOfRowsInSection:)") +``` + +Or when needing to be more specific, like this: + +```Swift +mock.expect(callToFunction: "tableView(_:numberOfRowsInSection:)", withArgumentsThatMatch: ArgumentMatcher(matcher: { (args: (UITableView, Int)) -> Bool in + return args.0 === tableView && args.1 == 42 +})) +``` + +### Verifying + +regardless of how methods have been identified: + +```Swift +mock.verify() +``` + +Notes: + +* This will result in an XCT failure when one ore more expectations have not been met. + +### Properties + +Mocking and stubbing properties is done like expected. + +#### Using selectors + +```Swift +var title: String { + get { + return didCallSelector(#selector(getter: self.title))! + } + set { + didCallSelector(#selector(setter: title), withArguments: newValue) + } +} +``` +Notes: + +* In case you forget the `getter:` or `setter:` prefix, Xcode will friendly remind you and provide a quickfix for it. +* `self.` is needed in the getter to prevent a warning. Xcode will also provide the option to fix this automatically. + +#### Using function names + +```Swift +var title: String { + get { + return didCallFunction()! + } + set { + didCallFunction(withArguments: newValue) + } +} +``` + +Notes: + +* This get set pattern is identical on any property. + +### Unwapping return value of didCall() +* Considering you're only going to use MockNStub in your test target(s), there's no need to worry about the force (!) unwrapping of the optional return values of `didCallSelector` and `didCallFunction`. + * In the worst case scenario this would lead to a failing test which is desired behavior because it indicates that the test hasn't been setup correctly. + * Every force unwrap of a nil value is known before it occurs and will cause detailed diagnosics to be logged to the console which shows what was expected to happen vs. what actually happened:![Screenshot Missing](Art/LogWhenForceUnwappingReturnValue.png) +* It some cases it can still be helpful to prevent a force unwrapped nil from happening by writing something like `return didCallFunction() ?? 0` instead. + * This will have no effect on return values that have been provided using the `given..` methods. + +## Installation + +MockNStub is available through [CocoaPods](https://cocoapods.org). To install +it, simply add the following line to your Podfile: + +```ruby +pod 'MockNStub' +``` + +## Author + +mennolovink, mclovink@me.com + +## License + +MockNStub is available under the MIT license. See the LICENSE file for more info. diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift b/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift new file mode 100644 index 0000000..3e89e23 --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift @@ -0,0 +1,35 @@ +// +// CwlCatchException.swift +// CwlAssertionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +import Foundation + +#if SWIFT_PACKAGE +import CwlCatchExceptionSupport +#endif + +private func catchReturnTypeConverter(_ type: T.Type, block: () -> Void) -> T? { + return catchExceptionOfKind(type, block) as? T +} + +extension NSException { + public static func catchException(in block: () -> Void) -> Self? { + return catchReturnTypeConverter(self, block: block) + } +} diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m b/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m new file mode 100644 index 0000000..8cf414f --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m @@ -0,0 +1,37 @@ +// +// CwlCatchException.m +// CwlAssertionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#import "CwlCatchException.h" + +#if !SWIFT_PACKAGE && NON_SWIFT_PACKAGE +__attribute__((visibility("hidden"))) +#endif +NSException* catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)(void)) { + @try { + inBlock(); + } @catch (NSException *exception) { + if ([exception isKindOfClass:type]) { + return exception; + } else { + @throw; + } + } + return nil; +} diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h b/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h new file mode 100644 index 0000000..0c8dd87 --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h @@ -0,0 +1,32 @@ +// +// CwlCatchException.h +// CwlCatchException +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#import + +//! Project version number for CwlCatchException. +FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber; + +//! Project version string for CwlCatchException. +FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[]; + +#if !SWIFT_PACKAGE && NON_SWIFT_PACKAGE +__attribute__((visibility("hidden"))) +#endif +NSException* __nullable catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)(void)); diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m new file mode 100644 index 0000000..8183196 --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m @@ -0,0 +1,50 @@ +// +// CwlMachBadExceptionHandler.m +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#if defined(__x86_64__) + + #import "mach_excServer.h" + #import "CwlMachBadInstructionHandler.h" + + @protocol BadInstructionReply + +(NSNumber *)receiveReply:(NSValue *)value; + @end + + /// A basic function that receives callbacks from mach_exc_server and relays them to the Swift implemented BadInstructionException.catch_mach_exception_raise_state. + kern_return_t catch_mach_exception_raise_state(mach_port_t exception_port, exception_type_t exception, const mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, const thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { + bad_instruction_exception_reply_t reply = { exception_port, exception, code, codeCnt, flavor, old_state, old_stateCnt, new_state, new_stateCnt }; + Class badInstructionClass = NSClassFromString(@"BadInstructionException"); + NSValue *value = [NSValue valueWithBytes: &reply objCType: @encode(bad_instruction_exception_reply_t)]; + return [[badInstructionClass performSelector: @selector(receiveReply:) withObject: value] intValue]; + } + + // The mach port should be configured so that this function is never used. + kern_return_t catch_mach_exception_raise(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt) { + assert(false); + return KERN_FAILURE; + } + + // The mach port should be configured so that this function is never used. + kern_return_t catch_mach_exception_raise_state_identity(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { + assert(false); + return KERN_FAILURE; + } + +#endif diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h new file mode 100644 index 0000000..aef59c2 --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h @@ -0,0 +1,70 @@ +// +// CwlMachBadInstructionHandler.h +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +extern boolean_t mach_exc_server(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); + +// The request_mach_exception_raise_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. +typedef struct +{ + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; +} request_mach_exception_raise_t; + +// The reply_mach_exception_raise_state_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. +typedef struct +{ + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[224]; +} reply_mach_exception_raise_state_t; + +typedef struct +{ + mach_port_t exception_port; + exception_type_t exception; + mach_exception_data_type_t const * _Nullable code; + mach_msg_type_number_t codeCnt; + int32_t * _Nullable flavor; + natural_t const * _Nullable old_state; + mach_msg_type_number_t old_stateCnt; + thread_state_t _Nullable new_state; + mach_msg_type_number_t * _Nullable new_stateCnt; +} bad_instruction_exception_reply_t; + +NS_ASSUME_NONNULL_END diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c new file mode 100644 index 0000000..733c564 --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c @@ -0,0 +1,537 @@ +/* + * IDENTIFICATION: + * stub generated Sun Jan 29 19:05:29 2017 + * with a MiG generated by bootstrap_cmds-96.20.2 + * OPTIONS: + */ + +#if defined(__x86_64__) + +/* Module mach_exc */ + +#define __MIG_check__Request__mach_exc_subsystem__ 1 + +#include "mach_excServer.h" + +#ifndef mig_internal +#define mig_internal static __inline__ +#endif /* mig_internal */ + +#ifndef mig_external +#define mig_external +#endif /* mig_external */ + +#if !defined(__MigTypeCheck) && defined(TypeCheck) +#define __MigTypeCheck TypeCheck /* Legacy setting */ +#endif /* !defined(__MigTypeCheck) */ + +#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) +#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ +#endif /* !defined(__MigKernelSpecificCode) */ + +#ifndef LimitCheck +#define LimitCheck 0 +#endif /* LimitCheck */ + +#ifndef min +#define min(a,b) ( ((a) < (b))? (a): (b) ) +#endif /* min */ + +#if !defined(_WALIGN_) +#define _WALIGN_(x) (((x) + 3) & ~3) +#endif /* !defined(_WALIGN_) */ + +#if !defined(_WALIGNSZ_) +#define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) +#endif /* !defined(_WALIGNSZ_) */ + +#ifndef UseStaticTemplates +#define UseStaticTemplates 0 +#endif /* UseStaticTemplates */ + +#ifndef __DeclareRcvRpc +#define __DeclareRcvRpc(_NUM_, _NAME_) +#endif /* __DeclareRcvRpc */ + +#ifndef __BeforeRcvRpc +#define __BeforeRcvRpc(_NUM_, _NAME_) +#endif /* __BeforeRcvRpc */ + +#ifndef __AfterRcvRpc +#define __AfterRcvRpc(_NUM_, _NAME_) +#endif /* __AfterRcvRpc */ + +#ifndef __DeclareRcvSimple +#define __DeclareRcvSimple(_NUM_, _NAME_) +#endif /* __DeclareRcvSimple */ + +#ifndef __BeforeRcvSimple +#define __BeforeRcvSimple(_NUM_, _NAME_) +#endif /* __BeforeRcvSimple */ + +#ifndef __AfterRcvSimple +#define __AfterRcvSimple(_NUM_, _NAME_) +#endif /* __AfterRcvSimple */ + +#define novalue void + +#define msgh_request_port msgh_local_port +#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) +#define msgh_reply_port msgh_remote_port +#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) + +#define MIG_RETURN_ERROR(X, code) {\ + ((mig_reply_error_t *)X)->RetCode = code;\ + ((mig_reply_error_t *)X)->NDR = NDR_record;\ + return;\ + } + +/* Forward Declarations */ + + +mig_internal novalue _Xmach_exception_raise + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); + +mig_internal novalue _Xmach_exception_raise_state + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); + +mig_internal novalue _Xmach_exception_raise_state_identity + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); + + +#if ( __MigTypeCheck ) +#if __MIG_check__Request__mach_exc_subsystem__ +#if !defined(__MIG_check__Request__mach_exception_raise_t__defined) +#define __MIG_check__Request__mach_exception_raise_t__defined + +mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_t(__attribute__((__unused__)) __Request__mach_exception_raise_t *In0P) +{ + + typedef __Request__mach_exception_raise_t __Request; +#if __MigTypeCheck + unsigned int msgh_size; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + msgh_size = In0P->Head.msgh_size; + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || + (In0P->msgh_body.msgh_descriptor_count != 2) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 16)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || + In0P->thread.disposition != 17) + return MIG_TYPE_ERROR; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || + In0P->task.disposition != 17) + return MIG_TYPE_ERROR; +#endif /* __MigTypeCheck */ + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined */ +#if __MigTypeCheck + if ( In0P->codeCnt > 2 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 16)) / 8 < In0P->codeCnt) || + (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 16) + (8 * In0P->codeCnt))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + + return MACH_MSG_SUCCESS; +} +#endif /* !defined(__MIG_check__Request__mach_exception_raise_t__defined) */ +#endif /* __MIG_check__Request__mach_exc_subsystem__ */ +#endif /* ( __MigTypeCheck ) */ + + +/* Routine mach_exception_raise */ +mig_internal novalue _Xmach_exception_raise + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) +{ + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + mach_msg_trailer_t trailer; + } Request __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + typedef __Request__mach_exception_raise_t __Request; + typedef __Reply__mach_exception_raise_t Reply __attribute__((unused)); + + /* + * typedef struct { + * mach_msg_header_t Head; + * NDR_record_t NDR; + * kern_return_t RetCode; + * } mig_reply_error_t; + */ + + Request *In0P = (Request *) InHeadP; + Reply *OutP = (Reply *) OutHeadP; +#ifdef __MIG_check__Request__mach_exception_raise_t__defined + kern_return_t check_result; +#endif /* __MIG_check__Request__mach_exception_raise_t__defined */ + + __DeclareRcvRpc(2405, "mach_exception_raise") + __BeforeRcvRpc(2405, "mach_exception_raise") + +#if defined(__MIG_check__Request__mach_exception_raise_t__defined) + check_result = __MIG_check__Request__mach_exception_raise_t((__Request *)In0P); + if (check_result != MACH_MSG_SUCCESS) + { MIG_RETURN_ERROR(OutP, check_result); } +#endif /* defined(__MIG_check__Request__mach_exception_raise_t__defined) */ + + OutP->RetCode = catch_mach_exception_raise(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt); + + OutP->NDR = NDR_record; + + + __AfterRcvRpc(2405, "mach_exception_raise") +} + +#if ( __MigTypeCheck ) +#if __MIG_check__Request__mach_exc_subsystem__ +#if !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) +#define __MIG_check__Request__mach_exception_raise_state_t__defined + +mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_t **In1PP) +{ + + typedef __Request__mach_exception_raise_state_t __Request; + __Request *In1P; +#if __MigTypeCheck + unsigned int msgh_size; +#endif /* __MigTypeCheck */ + unsigned int msgh_size_delta; + +#if __MigTypeCheck + msgh_size = In0P->Head.msgh_size; + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined */ + msgh_size_delta = (8 * In0P->codeCnt); +#if __MigTypeCheck + if ( In0P->codeCnt > 2 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) + return MIG_BAD_ARGUMENTS; + msgh_size -= msgh_size_delta; +#endif /* __MigTypeCheck */ + + *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined */ +#if __MigTypeCheck + if ( In1P->old_stateCnt > 224 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || + (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + + return MACH_MSG_SUCCESS; +} +#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ +#endif /* __MIG_check__Request__mach_exc_subsystem__ */ +#endif /* ( __MigTypeCheck ) */ + + +/* Routine mach_exception_raise_state */ +mig_internal novalue _Xmach_exception_raise_state + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) +{ + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; + mach_msg_trailer_t trailer; + } Request __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + typedef __Request__mach_exception_raise_state_t __Request; + typedef __Reply__mach_exception_raise_state_t Reply __attribute__((unused)); + + /* + * typedef struct { + * mach_msg_header_t Head; + * NDR_record_t NDR; + * kern_return_t RetCode; + * } mig_reply_error_t; + */ + + Request *In0P = (Request *) InHeadP; + Request *In1P; + Reply *OutP = (Reply *) OutHeadP; +#ifdef __MIG_check__Request__mach_exception_raise_state_t__defined + kern_return_t check_result; +#endif /* __MIG_check__Request__mach_exception_raise_state_t__defined */ + + __DeclareRcvRpc(2406, "mach_exception_raise_state") + __BeforeRcvRpc(2406, "mach_exception_raise_state") + +#if defined(__MIG_check__Request__mach_exception_raise_state_t__defined) + check_result = __MIG_check__Request__mach_exception_raise_state_t((__Request *)In0P, (__Request **)&In1P); + if (check_result != MACH_MSG_SUCCESS) + { MIG_RETURN_ERROR(OutP, check_result); } +#endif /* defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ + + OutP->new_stateCnt = 224; + + OutP->RetCode = catch_mach_exception_raise_state(In0P->Head.msgh_request_port, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); + if (OutP->RetCode != KERN_SUCCESS) { + MIG_RETURN_ERROR(OutP, OutP->RetCode); + } + + OutP->NDR = NDR_record; + + + OutP->flavor = In1P->flavor; + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); + + __AfterRcvRpc(2406, "mach_exception_raise_state") +} + +#if ( __MigTypeCheck ) +#if __MIG_check__Request__mach_exc_subsystem__ +#if !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) +#define __MIG_check__Request__mach_exception_raise_state_identity_t__defined + +mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_identity_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t **In1PP) +{ + + typedef __Request__mach_exception_raise_state_identity_t __Request; + __Request *In1P; +#if __MigTypeCheck + unsigned int msgh_size; +#endif /* __MigTypeCheck */ + unsigned int msgh_size_delta; + +#if __MigTypeCheck + msgh_size = In0P->Head.msgh_size; + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || + (In0P->msgh_body.msgh_descriptor_count != 2) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || + In0P->thread.disposition != 17) + return MIG_TYPE_ERROR; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || + In0P->task.disposition != 17) + return MIG_TYPE_ERROR; +#endif /* __MigTypeCheck */ + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined */ + msgh_size_delta = (8 * In0P->codeCnt); +#if __MigTypeCheck + if ( In0P->codeCnt > 2 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) + return MIG_BAD_ARGUMENTS; + msgh_size -= msgh_size_delta; +#endif /* __MigTypeCheck */ + + *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined */ +#if __MigTypeCheck + if ( In1P->old_stateCnt > 224 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || + (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + + return MACH_MSG_SUCCESS; +} +#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ +#endif /* __MIG_check__Request__mach_exc_subsystem__ */ +#endif /* ( __MigTypeCheck ) */ + + +/* Routine mach_exception_raise_state_identity */ +mig_internal novalue _Xmach_exception_raise_state_identity + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) +{ + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; + mach_msg_trailer_t trailer; + } Request __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + typedef __Request__mach_exception_raise_state_identity_t __Request; + typedef __Reply__mach_exception_raise_state_identity_t Reply __attribute__((unused)); + + /* + * typedef struct { + * mach_msg_header_t Head; + * NDR_record_t NDR; + * kern_return_t RetCode; + * } mig_reply_error_t; + */ + + Request *In0P = (Request *) InHeadP; + Request *In1P; + Reply *OutP = (Reply *) OutHeadP; +#ifdef __MIG_check__Request__mach_exception_raise_state_identity_t__defined + kern_return_t check_result; +#endif /* __MIG_check__Request__mach_exception_raise_state_identity_t__defined */ + + __DeclareRcvRpc(2407, "mach_exception_raise_state_identity") + __BeforeRcvRpc(2407, "mach_exception_raise_state_identity") + +#if defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) + check_result = __MIG_check__Request__mach_exception_raise_state_identity_t((__Request *)In0P, (__Request **)&In1P); + if (check_result != MACH_MSG_SUCCESS) + { MIG_RETURN_ERROR(OutP, check_result); } +#endif /* defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ + + OutP->new_stateCnt = 224; + + OutP->RetCode = catch_mach_exception_raise_state_identity(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); + if (OutP->RetCode != KERN_SUCCESS) { + MIG_RETURN_ERROR(OutP, OutP->RetCode); + } + + OutP->NDR = NDR_record; + + + OutP->flavor = In1P->flavor; + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); + + __AfterRcvRpc(2407, "mach_exception_raise_state_identity") +} + + + +/* Description of this subsystem, for use in direct RPC */ +const struct catch_mach_exc_subsystem catch_mach_exc_subsystem = { + mach_exc_server_routine, + 2405, + 2408, + (mach_msg_size_t)sizeof(union __ReplyUnion__catch_mach_exc_subsystem), + (vm_address_t)0, + { + { (mig_impl_routine_t) 0, + (mig_stub_routine_t) _Xmach_exception_raise, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_t)}, + { (mig_impl_routine_t) 0, + (mig_stub_routine_t) _Xmach_exception_raise_state, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_t)}, + { (mig_impl_routine_t) 0, + (mig_stub_routine_t) _Xmach_exception_raise_state_identity, 11, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_identity_t)}, + } +}; + +mig_external boolean_t mach_exc_server + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) +{ + /* + * typedef struct { + * mach_msg_header_t Head; + * NDR_record_t NDR; + * kern_return_t RetCode; + * } mig_reply_error_t; + */ + + register mig_routine_t routine; + + OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); + OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; + /* Minimal size: routine() will update it if different */ + OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); + OutHeadP->msgh_local_port = MACH_PORT_NULL; + OutHeadP->msgh_id = InHeadP->msgh_id + 100; + OutHeadP->msgh_reserved = 0; + + if ((InHeadP->msgh_id > 2407) || (InHeadP->msgh_id < 2405) || + ((routine = catch_mach_exc_subsystem.routine[InHeadP->msgh_id - 2405].stub_routine) == 0)) { + ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; + ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; + return FALSE; + } + (*routine) (InHeadP, OutHeadP); + return TRUE; +} + +mig_external mig_routine_t mach_exc_server_routine + (mach_msg_header_t *InHeadP) +{ + register int msgh_id; + + msgh_id = InHeadP->msgh_id - 2405; + + if ((msgh_id > 2) || (msgh_id < 0)) + return 0; + + return catch_mach_exc_subsystem.routine[msgh_id].stub_routine; +} + +#endif diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h new file mode 100644 index 0000000..52e53ae --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h @@ -0,0 +1,321 @@ +#ifndef _mach_exc_server_ +#define _mach_exc_server_ + +/* Module mach_exc */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* BEGIN VOUCHER CODE */ + +#ifndef KERNEL +#if defined(__has_include) +#if __has_include() +#ifndef USING_VOUCHERS +#define USING_VOUCHERS +#endif +#ifndef __VOUCHER_FORWARD_TYPE_DECLS__ +#define __VOUCHER_FORWARD_TYPE_DECLS__ +#ifdef __cplusplus +extern "C" { +#endif + extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); +#ifdef __cplusplus +} +#endif +#endif // __VOUCHER_FORWARD_TYPE_DECLS__ +#endif // __has_include() +#endif // __has_include +#endif // !KERNEL + +/* END VOUCHER CODE */ + + +/* BEGIN MIG_STRNCPY_ZEROFILL CODE */ + +#if defined(__has_include) +#if __has_include() +#ifndef USING_MIG_STRNCPY_ZEROFILL +#define USING_MIG_STRNCPY_ZEROFILL +#endif +#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ +#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ +#ifdef __cplusplus +extern "C" { +#endif + extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); +#ifdef __cplusplus +} +#endif +#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ +#endif /* __has_include() */ +#endif /* __has_include */ + +/* END MIG_STRNCPY_ZEROFILL CODE */ + + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef mach_exc_MSG_COUNT +#define mach_exc_MSG_COUNT 3 +#endif /* mach_exc_MSG_COUNT */ + +#include +#include +#include +#include + +#ifdef __BeforeMigServerHeader +__BeforeMigServerHeader +#endif /* __BeforeMigServerHeader */ + + +/* Routine mach_exception_raise */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t catch_mach_exception_raise +( + mach_port_t exception_port, + mach_port_t thread, + mach_port_t task, + exception_type_t exception, + mach_exception_data_t code, + mach_msg_type_number_t codeCnt +); + +/* Routine mach_exception_raise_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t catch_mach_exception_raise_state +( + mach_port_t exception_port, + exception_type_t exception, + const mach_exception_data_t code, + mach_msg_type_number_t codeCnt, + int *flavor, + const thread_state_t old_state, + mach_msg_type_number_t old_stateCnt, + thread_state_t new_state, + mach_msg_type_number_t *new_stateCnt +); + +/* Routine mach_exception_raise_state_identity */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t catch_mach_exception_raise_state_identity +( + mach_port_t exception_port, + mach_port_t thread, + mach_port_t task, + exception_type_t exception, + mach_exception_data_t code, + mach_msg_type_number_t codeCnt, + int *flavor, + thread_state_t old_state, + mach_msg_type_number_t old_stateCnt, + thread_state_t new_state, + mach_msg_type_number_t *new_stateCnt +); + +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +boolean_t mach_exc_server( + mach_msg_header_t *InHeadP, + mach_msg_header_t *OutHeadP); + +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +mig_routine_t mach_exc_server_routine( + mach_msg_header_t *InHeadP); + + +/* Description of this subsystem, for use in direct RPC */ +extern const struct catch_mach_exc_subsystem { + mig_server_routine_t server; /* Server routine */ + mach_msg_id_t start; /* Min routine number */ + mach_msg_id_t end; /* Max routine number + 1 */ + unsigned int maxsize; /* Max msg size */ + vm_address_t reserved; /* Reserved */ + struct routine_descriptor /*Array of routine descriptors */ + routine[3]; +} catch_mach_exc_subsystem; + +/* typedefs for all requests */ + +#ifndef __Request__mach_exc_subsystem__defined +#define __Request__mach_exc_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + } __Request__mach_exception_raise_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; + } __Request__mach_exception_raise_state_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; + } __Request__mach_exception_raise_state_identity_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__mach_exc_subsystem__defined */ + + +/* union of all requests */ + +#ifndef __RequestUnion__catch_mach_exc_subsystem__defined +#define __RequestUnion__catch_mach_exc_subsystem__defined +union __RequestUnion__catch_mach_exc_subsystem { + __Request__mach_exception_raise_t Request_mach_exception_raise; + __Request__mach_exception_raise_state_t Request_mach_exception_raise_state; + __Request__mach_exception_raise_state_identity_t Request_mach_exception_raise_state_identity; +}; +#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__mach_exc_subsystem__defined +#define __Reply__mach_exc_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_exception_raise_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[224]; + } __Reply__mach_exception_raise_state_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[224]; + } __Reply__mach_exception_raise_state_identity_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__mach_exc_subsystem__defined */ + + +/* union of all replies */ + +#ifndef __ReplyUnion__catch_mach_exc_subsystem__defined +#define __ReplyUnion__catch_mach_exc_subsystem__defined +union __ReplyUnion__catch_mach_exc_subsystem { + __Reply__mach_exception_raise_t Reply_mach_exception_raise; + __Reply__mach_exception_raise_state_t Reply_mach_exception_raise_state; + __Reply__mach_exception_raise_state_identity_t Reply_mach_exception_raise_state_identity; +}; +#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ + +#ifndef subsystem_to_name_map_mach_exc +#define subsystem_to_name_map_mach_exc \ + { "mach_exception_raise", 2405 },\ + { "mach_exception_raise_state", 2406 },\ + { "mach_exception_raise_state_identity", 2407 } +#endif + +#ifdef __AfterMigServerHeader +__AfterMigServerHeader +#endif /* __AfterMigServerHeader */ + +#endif /* _mach_exc_server_ */ diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift new file mode 100644 index 0000000..91e5d4d --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift @@ -0,0 +1,89 @@ +// +// CwlBadInstructionException.swift +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +import Foundation + +#if SWIFT_PACKAGE + import CwlMachBadInstructionHandler +#endif + +private func raiseBadInstructionException() { + BadInstructionException().raise() +} + +/// A simple NSException subclass. It's not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type. +@objc(BadInstructionException) +public class BadInstructionException: NSException { + static var name: String = "com.cocoawithlove.BadInstruction" + + init() { + super.init(name: NSExceptionName(rawValue: BadInstructionException.name), reason: nil, userInfo: nil) + } + + required public init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + } + + /// An Objective-C callable function, invoked from the `mach_exc_server` callback function `catch_mach_exception_raise_state` to push the `raiseBadInstructionException` function onto the stack. + @objc(receiveReply:) + public class func receiveReply(_ value: NSValue) -> NSNumber { + #if arch(x86_64) + var reply = bad_instruction_exception_reply_t(exception_port: 0, exception: 0, code: nil, codeCnt: 0, flavor: nil, old_state: nil, old_stateCnt: 0, new_state: nil, new_stateCnt: nil) + withUnsafeMutablePointer(to: &reply) { value.getValue(UnsafeMutableRawPointer($0)) } + + let old_state: UnsafePointer = reply.old_state! + let old_stateCnt: mach_msg_type_number_t = reply.old_stateCnt + let new_state: thread_state_t = reply.new_state! + let new_stateCnt: UnsafeMutablePointer = reply.new_stateCnt! + + // Make sure we've been given enough memory + if old_stateCnt != x86_THREAD_STATE64_COUNT || new_stateCnt.pointee < x86_THREAD_STATE64_COUNT { + return NSNumber(value: KERN_INVALID_ARGUMENT) + } + + // Read the old thread state + var state = old_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { return $0.pointee } + + // 1. Decrement the stack pointer + state.__rsp -= __uint64_t(MemoryLayout.size) + + // 2. Save the old Instruction Pointer to the stack. + if let pointer = UnsafeMutablePointer<__uint64_t>(bitPattern: UInt(state.__rsp)) { + pointer.pointee = state.__rip + } else { + return NSNumber(value: KERN_INVALID_ARGUMENT) + } + + // 3. Set the Instruction Pointer to the new function's address + var f: @convention(c) () -> Void = raiseBadInstructionException + withUnsafePointer(to: &f) { + state.__rip = $0.withMemoryRebound(to: __uint64_t.self, capacity: 1) { return $0.pointee } + } + + // Write the new thread state + new_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { $0.pointee = state } + new_stateCnt.pointee = x86_THREAD_STATE64_COUNT + + return NSNumber(value: KERN_SUCCESS) + #else + fatalError("Unavailable for this CPU architecture") + #endif + } +} diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift new file mode 100644 index 0000000..f96ec63 --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift @@ -0,0 +1,197 @@ +// +// CwlCatchBadInstruction.swift +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +import Foundation + +#if SWIFT_PACKAGE + import CwlMachBadInstructionHandler +#endif + +#if arch(x86_64) + + private enum PthreadError: Error { case code(Int32) } + private enum MachExcServer: Error { case code(kern_return_t) } + + /// A quick function for converting Mach error results into Swift errors + private func kernCheck(_ f: () -> Int32) throws { + let r = f() + guard r == KERN_SUCCESS else { + throw NSError(domain: NSMachErrorDomain, code: Int(r), userInfo: nil) + } + } + + extension request_mach_exception_raise_t { + mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { + return withUnsafeMutablePointer(to: &self) { p -> R in + return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in + return block(ptr) + } + } + } + } + + extension reply_mach_exception_raise_state_t { + mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { + return withUnsafeMutablePointer(to: &self) { p -> R in + return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in + return block(ptr) + } + } + } + } + + /// A structure used to store context associated with the Mach message port + private struct MachContext { + var masks = execTypesCountTuple() + var count: mach_msg_type_number_t = 0 + var ports = execTypesCountTuple() + var behaviors = execTypesCountTuple() + var flavors = execTypesCountTuple() + var currentExceptionPort: mach_port_t = 0 + var handlerThread: pthread_t? = nil + + static func internalMutablePointers(_ m: UnsafeMutablePointer>, _ c: UnsafeMutablePointer, _ p: UnsafeMutablePointer>, _ b: UnsafeMutablePointer>, _ f: UnsafeMutablePointer>, _ block: (UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer) -> R) -> R { + return m.withMemoryRebound(to: exception_mask_t.self, capacity: 1) { masksPtr in + return c.withMemoryRebound(to: mach_msg_type_number_t.self, capacity: 1) { countPtr in + return p.withMemoryRebound(to: mach_port_t.self, capacity: 1) { portsPtr in + return b.withMemoryRebound(to: exception_behavior_t.self, capacity: 1) { behaviorsPtr in + return f.withMemoryRebound(to: thread_state_flavor_t.self, capacity: 1) { flavorsPtr in + return block(masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr) + } + } + } + } + } + } + + mutating func withUnsafeMutablePointers(in block: @escaping (UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer) -> R) -> R { + return MachContext.internalMutablePointers(&masks, &count, &ports, &behaviors, &flavors, block) + } + } + + /// A function for receiving mach messages and parsing the first with mach_exc_server (and if any others are received, throwing them away). + private func machMessageHandler(_ arg: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer? { + let context = arg.assumingMemoryBound(to: MachContext.self).pointee + var request = request_mach_exception_raise_t() + var reply = reply_mach_exception_raise_state_t() + + var handledfirstException = false + repeat { do { + // Request the next mach message from the port + request.Head.msgh_local_port = context.currentExceptionPort + request.Head.msgh_size = UInt32(MemoryLayout.size) + let requestSize = request.Head.msgh_size + try kernCheck { request.withMsgHeaderPointer { requestPtr in + mach_msg(requestPtr, MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0, requestSize, context.currentExceptionPort, 0, UInt32(MACH_PORT_NULL)) + } } + + // Prepare the reply structure + reply.Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(request.Head.msgh_bits), 0) + reply.Head.msgh_local_port = UInt32(MACH_PORT_NULL) + reply.Head.msgh_remote_port = request.Head.msgh_remote_port + reply.Head.msgh_size = UInt32(MemoryLayout.size) + reply.NDR = NDR_record + + if !handledfirstException { + // Use the MiG generated server to invoke our handler for the request and fill in the rest of the reply structure + guard request.withMsgHeaderPointer(in: { requestPtr in reply.withMsgHeaderPointer { replyPtr in + mach_exc_server(requestPtr, replyPtr) + } }) != 0 else { throw MachExcServer.code(reply.RetCode) } + + handledfirstException = true + } else { + // If multiple fatal errors occur, don't handle subsquent errors (let the program crash) + reply.RetCode = KERN_FAILURE + } + + // Send the reply + let replySize = reply.Head.msgh_size + try kernCheck { reply.withMsgHeaderPointer { replyPtr in + mach_msg(replyPtr, MACH_SEND_MSG, replySize, 0, UInt32(MACH_PORT_NULL), 0, UInt32(MACH_PORT_NULL)) + } } + } catch let error as NSError where (error.domain == NSMachErrorDomain && (error.code == Int(MACH_RCV_PORT_CHANGED) || error.code == Int(MACH_RCV_INVALID_NAME))) { + // Port was already closed before we started or closed while we were listening. + // This means the controlling thread shut down. + return nil + } catch { + // Should never be reached but this is testing code, don't try to recover, just abort + fatalError("Mach message error: \(error)") + } } while true + } + + /// Run the provided block. If a mach "BAD_INSTRUCTION" exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil. + /// NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a "BAD_INSTRUCTION" exception is raised, the block will be exited before completion via Objective-C exception. The risks associated with an Objective-C exception apply here: most Swift/Objective-C functions are *not* exception-safe. Memory may be leaked and the program will not necessarily be left in a safe state. + /// - parameter block: a function without parameters that will be run + /// - returns: if an EXC_BAD_INSTRUCTION is raised during the execution of `block` then a BadInstructionException will be returned, otherwise `nil`. + public func catchBadInstruction(in block: () -> Void) -> BadInstructionException? { + var context = MachContext() + var result: BadInstructionException? = nil + do { + var handlerThread: pthread_t? = nil + defer { + // 8. Wait for the thread to terminate *if* we actually made it to the creation point + // The mach port should be destroyed *before* calling pthread_join to avoid a deadlock. + if handlerThread != nil { + pthread_join(handlerThread!, nil) + } + } + + try kernCheck { + // 1. Create the mach port + mach_port_allocate(mach_task_self_, MACH_PORT_RIGHT_RECEIVE, &context.currentExceptionPort) + } + defer { + // 7. Cleanup the mach port + mach_port_destroy(mach_task_self_, context.currentExceptionPort) + } + + try kernCheck { + // 2. Configure the mach port + mach_port_insert_right(mach_task_self_, context.currentExceptionPort, context.currentExceptionPort, MACH_MSG_TYPE_MAKE_SEND) + } + + let currentExceptionPtr = context.currentExceptionPort + try kernCheck { context.withUnsafeMutablePointers { masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr in + // 3. Apply the mach port as the handler for this thread + thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, currentExceptionPtr, Int32(bitPattern: UInt32(EXCEPTION_STATE) | MACH_EXCEPTION_CODES), x86_THREAD_STATE64, masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr) + } } + + defer { context.withUnsafeMutablePointers { masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr in + // 6. Unapply the mach port + _ = thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, 0, EXCEPTION_DEFAULT, THREAD_STATE_NONE, masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr) + } } + + try withUnsafeMutablePointer(to: &context) { c throws in + // 4. Create the thread + let e = pthread_create(&handlerThread, nil, machMessageHandler, c) + guard e == 0 else { throw PthreadError.code(e) } + + // 5. Run the block + result = BadInstructionException.catchException(in: block) + } + } catch { + // Should never be reached but this is testing code, don't try to recover, just abort + fatalError("Mach port error: \(error)") + } + return result + } + +#endif + diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift new file mode 100644 index 0000000..8d99d5e --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift @@ -0,0 +1,55 @@ +// +// CwlDarwinDefinitions.swift +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +import Darwin + +#if arch(x86_64) + + // From /usr/include/mach/message.h + // #define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */ + // #define MACH_MSGH_BITS_REMOTE(bits) \ + // ((bits) & MACH_MSGH_BITS_REMOTE_MASK) + // #define MACH_MSGH_BITS(remote, local) /* legacy */ \ + // ((remote) | ((local) << 8)) + public let MACH_MSG_TYPE_MAKE_SEND: UInt32 = 20 + public func MACH_MSGH_BITS_REMOTE(_ bits: UInt32) -> UInt32 { return bits & UInt32(MACH_MSGH_BITS_REMOTE_MASK) } + public func MACH_MSGH_BITS(_ remote: UInt32, _ local: UInt32) -> UInt32 { return ((remote) | ((local) << 8)) } + + // From /usr/include/mach/exception_types.h + // #define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ + // #define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) + public let EXC_BAD_INSTRUCTION: UInt32 = 2 + public let EXC_MASK_BAD_INSTRUCTION: UInt32 = 1 << EXC_BAD_INSTRUCTION + + // From /usr/include/mach/i386/thread_status.h + // #define x86_THREAD_STATE64_COUNT ((mach_msg_type_number_t) \ + // ( sizeof (x86_thread_state64_t) / sizeof (int) )) + public let x86_THREAD_STATE64_COUNT = UInt32(MemoryLayout.size / MemoryLayout.size) + + public let EXC_TYPES_COUNT = 14 + public struct execTypesCountTuple { + // From /usr/include/mach/i386/exception.h + // #define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */ + public var value: (T, T, T, T, T, T, T, T, T, T, T, T, T, T) = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + public init() { + } + } + +#endif diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h new file mode 100644 index 0000000..f9dbedd --- /dev/null +++ b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h @@ -0,0 +1,30 @@ +// +// CwlPreconditionTesting.h +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright Š 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#import + +//! Project version number for CwlUtils. +FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber; + +//! Project version string for CwlUtils. +FOUNDATION_EXPORT const unsigned char CwlAssertingTestingVersionString[]; + +#include "CwlMachBadInstructionHandler.h" +#include "CwlCatchException.h" diff --git a/Example/Pods/Nimble/LICENSE b/Example/Pods/Nimble/LICENSE new file mode 100644 index 0000000..82b84bf --- /dev/null +++ b/Example/Pods/Nimble/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Example/Pods/Nimble/README.md b/Example/Pods/Nimble/README.md new file mode 100644 index 0000000..19c562f --- /dev/null +++ b/Example/Pods/Nimble/README.md @@ -0,0 +1,1764 @@ +# Nimble + +[![Build Status](https://travis-ci.org/Quick/Nimble.svg?branch=master)](https://travis-ci.org/Quick/Nimble) +[![CocoaPods](https://img.shields.io/cocoapods/v/Nimble.svg)](https://cocoapods.org/pods/Nimble) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Platforms](https://img.shields.io/cocoapods/p/Nimble.svg)](https://cocoapods.org/pods/Nimble) + +Use Nimble to express the expected outcomes of Swift +or Objective-C expressions. Inspired by +[Cedar](https://github.com/pivotal/cedar). + +```swift +// Swift +expect(1 + 1).to(equal(2)) +expect(1.2).to(beCloseTo(1.1, within: 0.1)) +expect(3) > 2 +expect("seahorse").to(contain("sea")) +expect(["Atlantic", "Pacific"]).toNot(contain("Mississippi")) +expect(ocean.isClean).toEventually(beTruthy()) +``` + +# How to Use Nimble + + + +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Some Background: Expressing Outcomes Using Assertions in XCTest](#some-background-expressing-outcomes-using-assertions-in-xctest) +- [Nimble: Expectations Using `expect(...).to`](#nimble-expectations-using-expectto) + - [Custom Failure Messages](#custom-failure-messages) + - [Type Safety](#type-safety) + - [Operator Overloads](#operator-overloads) + - [Lazily Computed Values](#lazily-computed-values) + - [C Primitives](#c-primitives) + - [Asynchronous Expectations](#asynchronous-expectations) + - [Objective-C Support](#objective-c-support) + - [Disabling Objective-C Shorthand](#disabling-objective-c-shorthand) +- [Built-in Matcher Functions](#built-in-matcher-functions) + - [Type Checking](#type-checking) + - [Equivalence](#equivalence) + - [Identity](#identity) + - [Comparisons](#comparisons) + - [Types/Classes](#typesclasses) + - [Truthiness](#truthiness) + - [Swift Assertions](#swift-assertions) + - [Swift Error Handling](#swift-error-handling) + - [Exceptions](#exceptions) + - [Collection Membership](#collection-membership) + - [Strings](#strings) + - [Collection Elements](#collection-elements) + - [Collection Count](#collection-count) + - [Notifications](#notifications) + - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) + - [Custom Validation](#custom-validation) +- [Writing Your Own Matchers](#writing-your-own-matchers) + - [PredicateResult](#predicateresult) + - [Lazy Evaluation](#lazy-evaluation) + - [Type Checking via Swift Generics](#type-checking-via-swift-generics) + - [Customizing Failure Messages](#customizing-failure-messages) + - [Basic Customization](#basic-customization) + - [Full Customization](#full-customization) + - [Supporting Objective-C](#supporting-objective-c) + - [Properly Handling `nil` in Objective-C Matchers](#properly-handling-nil-in-objective-c-matchers) + - [Migrating from the Old Matcher API](#migrating-from-the-old-matcher-api) + - [Minimal Step - Use `.predicate`](#minimal-step---use-predicate) + - [Convert to use `Predicate` Type with Old Matcher Constructor](#convert-to-use-predicate-type-with-old-matcher-constructor) + - [Convert to `Predicate` Type with Preferred Constructor](#convert-to-predicate-type-with-preferred-constructor) + - [Deprecation Roadmap](#deprecation-roadmap) +- [Installing Nimble](#installing-nimble) + - [Installing Nimble as a Submodule](#installing-nimble-as-a-submodule) + - [Installing Nimble via CocoaPods](#installing-nimble-via-cocoapods) + - [Using Nimble without XCTest](#using-nimble-without-xctest) + + + +# Some Background: Expressing Outcomes Using Assertions in XCTest + +Apple's Xcode includes the XCTest framework, which provides +assertion macros to test whether code behaves properly. +For example, to assert that `1 + 1 = 2`, XCTest has you write: + +```swift +// Swift + +XCTAssertEqual(1 + 1, 2, "expected one plus one to equal two") +``` + +Or, in Objective-C: + +```objc +// Objective-C + +XCTAssertEqual(1 + 1, 2, @"expected one plus one to equal two"); +``` + +XCTest assertions have a couple of drawbacks: + +1. **Not enough macros.** There's no easy way to assert that a string + contains a particular substring, or that a number is less than or + equal to another. +2. **It's hard to write asynchronous tests.** XCTest forces you to write + a lot of boilerplate code. + +Nimble addresses these concerns. + +# Nimble: Expectations Using `expect(...).to` + +Nimble allows you to express expectations using a natural, +easily understood language: + +```swift +// Swift + +import Nimble + +expect(seagull.squawk).to(equal("Squee!")) +``` + +```objc +// Objective-C + +@import Nimble; + +expect(seagull.squawk).to(equal(@"Squee!")); +``` + +> The `expect` function autocompletes to include `file:` and `line:`, + but these parameters are optional. Use the default values to have + Xcode highlight the correct line when an expectation is not met. + +To perform the opposite expectation--to assert something is *not* +equal--use `toNot` or `notTo`: + +```swift +// Swift + +import Nimble + +expect(seagull.squawk).toNot(equal("Oh, hello there!")) +expect(seagull.squawk).notTo(equal("Oh, hello there!")) +``` + +```objc +// Objective-C + +@import Nimble; + +expect(seagull.squawk).toNot(equal(@"Oh, hello there!")); +expect(seagull.squawk).notTo(equal(@"Oh, hello there!")); +``` + +## Custom Failure Messages + +Would you like to add more information to the test's failure messages? Use the `description` optional argument to add your own text: + +```swift +// Swift + +expect(1 + 1).to(equal(3)) +// failed - expected to equal <3>, got <2> + +expect(1 + 1).to(equal(3), description: "Make sure libKindergartenMath is loaded") +// failed - Make sure libKindergartenMath is loaded +// expected to equal <3>, got <2> +``` + +Or the *WithDescription version in Objective-C: + +```objc +// Objective-C + +@import Nimble; + +expect(@(1+1)).to(equal(@3)); +// failed - expected to equal <3.0000>, got <2.0000> + +expect(@(1+1)).toWithDescription(equal(@3), @"Make sure libKindergartenMath is loaded"); +// failed - Make sure libKindergartenMath is loaded +// expected to equal <3.0000>, got <2.0000> +``` + +## Type Safety + +Nimble makes sure you don't compare two types that don't match: + +```swift +// Swift + +// Does not compile: +expect(1 + 1).to(equal("Squee!")) +``` + +> Nimble uses generics--only available in Swift--to ensure + type correctness. That means type checking is + not available when using Nimble in Objective-C. :sob: + +## Operator Overloads + +Tired of so much typing? With Nimble, you can use overloaded operators +like `==` for equivalence, or `>` for comparisons: + +```swift +// Swift + +// Passes if squawk does not equal "Hi!": +expect(seagull.squawk) != "Hi!" + +// Passes if 10 is greater than 2: +expect(10) > 2 +``` + +> Operator overloads are only available in Swift, so you won't be able + to use this syntax in Objective-C. :broken_heart: + +## Lazily Computed Values + +The `expect` function doesn't evaluate the value it's given until it's +time to match. So Nimble can test whether an expression raises an +exception once evaluated: + +```swift +// Swift + +// Note: Swift currently doesn't have exceptions. +// Only Objective-C code can raise exceptions +// that Nimble will catch. +// (see https://github.com/Quick/Nimble/issues/220#issuecomment-172667064) +let exception = NSException( + name: NSInternalInconsistencyException, + reason: "Not enough fish in the sea.", + userInfo: ["something": "is fishy"]) +expect { exception.raise() }.to(raiseException()) + +// Also, you can customize raiseException to be more specific +expect { exception.raise() }.to(raiseException(named: NSInternalInconsistencyException)) +expect { exception.raise() }.to(raiseException( + named: NSInternalInconsistencyException, + reason: "Not enough fish in the sea")) +expect { exception.raise() }.to(raiseException( + named: NSInternalInconsistencyException, + reason: "Not enough fish in the sea", + userInfo: ["something": "is fishy"])) +``` + +Objective-C works the same way, but you must use the `expectAction` +macro when making an expectation on an expression that has no return +value: + +```objc +// Objective-C + +NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException + reason:@"Not enough fish in the sea." + userInfo:nil]; +expectAction(^{ [exception raise]; }).to(raiseException()); + +// Use the property-block syntax to be more specific. +expectAction(^{ [exception raise]; }).to(raiseException().named(NSInternalInconsistencyException)); +expectAction(^{ [exception raise]; }).to(raiseException(). + named(NSInternalInconsistencyException). + reason("Not enough fish in the sea")); +expectAction(^{ [exception raise]; }).to(raiseException(). + named(NSInternalInconsistencyException). + reason("Not enough fish in the sea"). + userInfo(@{@"something": @"is fishy"})); + +// You can also pass a block for custom matching of the raised exception +expectAction(exception.raise()).to(raiseException().satisfyingBlock(^(NSException *exception) { + expect(exception.name).to(beginWith(NSInternalInconsistencyException)); +})); +``` + +## C Primitives + +Some testing frameworks make it hard to test primitive C values. +In Nimble, it just works: + +```swift +// Swift + +let actual: CInt = 1 +let expectedValue: CInt = 1 +expect(actual).to(equal(expectedValue)) +``` + +In fact, Nimble uses type inference, so you can write the above +without explicitly specifying both types: + +```swift +// Swift + +expect(1 as CInt).to(equal(1)) +``` + +> In Objective-C, Nimble only supports Objective-C objects. To + make expectations on primitive C values, wrap then in an object + literal: + +```objc +expect(@(1 + 1)).to(equal(@2)); +``` + +## Asynchronous Expectations + +In Nimble, it's easy to make expectations on values that are updated +asynchronously. Just use `toEventually` or `toEventuallyNot`: + +```swift +// Swift 3.0 and later + +DispatchQueue.main.async { + ocean.add("dolphins") + ocean.add("whales") +} +expect(ocean).toEventually(contain("dolphins", "whales")) +``` + + +```swift +// Swift 2.3 and earlier + +dispatch_async(dispatch_get_main_queue()) { + ocean.add("dolphins") + ocean.add("whales") +} +expect(ocean).toEventually(contain("dolphins", "whales")) +``` + + +```objc +// Objective-C + +dispatch_async(dispatch_get_main_queue(), ^{ + [ocean add:@"dolphins"]; + [ocean add:@"whales"]; +}); +expect(ocean).toEventually(contain(@"dolphins", @"whales")); +``` + +Note: toEventually triggers its polls on the main thread. Blocking the main +thread will cause Nimble to stop the run loop. This can cause test pollution +for whatever incomplete code that was running on the main thread. Blocking the +main thread can be caused by blocking IO, calls to sleep(), deadlocks, and +synchronous IPC. + +In the above example, `ocean` is constantly re-evaluated. If it ever +contains dolphins and whales, the expectation passes. If `ocean` still +doesn't contain them, even after being continuously re-evaluated for one +whole second, the expectation fails. + +Sometimes it takes more than a second for a value to update. In those +cases, use the `timeout` parameter: + +```swift +// Swift + +// Waits three seconds for ocean to contain "starfish": +expect(ocean).toEventually(contain("starfish"), timeout: 3) + +// Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds. +expect(someValue).toEventually(equal(100), timeout: 5.5, pollInterval: 0.2) +``` + +```objc +// Objective-C + +// Waits three seconds for ocean to contain "starfish": +expect(ocean).withTimeout(3).toEventually(contain(@"starfish")); +``` + +You can also provide a callback by using the `waitUntil` function: + +```swift +// Swift + +waitUntil { done in + ocean.goFish { success in + expect(success).to(beTrue()) + done() + } +} +``` + +```objc +// Objective-C + +waitUntil(^(void (^done)(void)){ + [ocean goFishWithHandler:^(BOOL success){ + expect(success).to(beTrue()); + done(); + }]; +}); +``` + +`waitUntil` also optionally takes a timeout parameter: + +```swift +// Swift + +waitUntil(timeout: 10) { done in + ocean.goFish { success in + expect(success).to(beTrue()) + done() + } +} +``` + +```objc +// Objective-C + +waitUntilTimeout(10, ^(void (^done)(void)){ + [ocean goFishWithHandler:^(BOOL success){ + expect(success).to(beTrue()); + done(); + }]; +}); +``` + +Note: `waitUntil` triggers its timeout code on the main thread. Blocking the main +thread will cause Nimble to stop the run loop to continue. This can cause test +pollution for whatever incomplete code that was running on the main thread. +Blocking the main thread can be caused by blocking IO, calls to sleep(), +deadlocks, and synchronous IPC. + +In some cases (e.g. when running on slower machines) it can be useful to modify +the default timeout and poll interval values. This can be done as follows: + +```swift +// Swift + +// Increase the global timeout to 5 seconds: +Nimble.AsyncDefaults.Timeout = 5 + +// Slow the polling interval to 0.1 seconds: +Nimble.AsyncDefaults.PollInterval = 0.1 +``` + +## Objective-C Support + +Nimble has full support for Objective-C. However, there are two things +to keep in mind when using Nimble in Objective-C: + +1. All parameters passed to the `expect` function, as well as matcher + functions like `equal`, must be Objective-C objects or can be converted into + an `NSObject` equivalent: + + ```objc + // Objective-C + + @import Nimble; + + expect(@(1 + 1)).to(equal(@2)); + expect(@"Hello world").to(contain(@"world")); + + // Boxed as NSNumber * + expect(2).to(equal(2)); + expect(1.2).to(beLessThan(2.0)); + expect(true).to(beTruthy()); + + // Boxed as NSString * + expect("Hello world").to(equal("Hello world")); + + // Boxed as NSRange + expect(NSMakeRange(1, 10)).to(equal(NSMakeRange(1, 10))); + ``` + +2. To make an expectation on an expression that does not return a value, + such as `-[NSException raise]`, use `expectAction` instead of + `expect`: + + ```objc + // Objective-C + + expectAction(^{ [exception raise]; }).to(raiseException()); + ``` + +The following types are currently converted to an `NSObject` type: + + - **C Numeric types** are converted to `NSNumber *` + - `NSRange` is converted to `NSValue *` + - `char *` is converted to `NSString *` + +For the following matchers: + +- `equal` +- `beGreaterThan` +- `beGreaterThanOrEqual` +- `beLessThan` +- `beLessThanOrEqual` +- `beCloseTo` +- `beTrue` +- `beFalse` +- `beTruthy` +- `beFalsy` +- `haveCount` + +If you would like to see more, [file an issue](https://github.com/Quick/Nimble/issues). + +## Disabling Objective-C Shorthand + +Nimble provides a shorthand for expressing expectations using the +`expect` function. To disable this shorthand in Objective-C, define the +`NIMBLE_DISABLE_SHORT_SYNTAX` macro somewhere in your code before +importing Nimble: + +```objc +#define NIMBLE_DISABLE_SHORT_SYNTAX 1 + +@import Nimble; + +NMB_expect(^{ return seagull.squawk; }, __FILE__, __LINE__).to(NMB_equal(@"Squee!")); +``` + +> Disabling the shorthand is useful if you're testing functions with + names that conflict with Nimble functions, such as `expect` or + `equal`. If that's not the case, there's no point in disabling the + shorthand. + +# Built-in Matcher Functions + +Nimble includes a wide variety of matcher functions. + +## Type Checking + +Nimble supports checking the type membership of any kind of object, whether +Objective-C conformant or not: + +```swift +// Swift + +protocol SomeProtocol{} +class SomeClassConformingToProtocol: SomeProtocol{} +struct SomeStructConformingToProtocol: SomeProtocol{} + +// The following tests pass +expect(1).to(beAKindOf(Int.self)) +expect("turtle").to(beAKindOf(String.self)) + +let classObject = SomeClassConformingToProtocol() +expect(classObject).to(beAKindOf(SomeProtocol.self)) +expect(classObject).to(beAKindOf(SomeClassConformingToProtocol.self)) +expect(classObject).toNot(beAKindOf(SomeStructConformingToProtocol.self)) + +let structObject = SomeStructConformingToProtocol() +expect(structObject).to(beAKindOf(SomeProtocol.self)) +expect(structObject).to(beAKindOf(SomeStructConformingToProtocol.self)) +expect(structObject).toNot(beAKindOf(SomeClassConformingToProtocol.self)) +``` + +```objc +// Objective-C + +// The following tests pass +NSMutableArray *array = [NSMutableArray array]; +expect(array).to(beAKindOf([NSArray class])); +expect(@1).toNot(beAKindOf([NSNull class])); +``` + +Objects can be tested for their exact types using the `beAnInstanceOf` matcher: + +```swift +// Swift + +protocol SomeProtocol{} +class SomeClassConformingToProtocol: SomeProtocol{} +struct SomeStructConformingToProtocol: SomeProtocol{} + +// Unlike the 'beKindOf' matcher, the 'beAnInstanceOf' matcher only +// passes if the object is the EXACT type requested. The following +// tests pass -- note its behavior when working in an inheritance hierarchy. +expect(1).to(beAnInstanceOf(Int.self)) +expect("turtle").to(beAnInstanceOf(String.self)) + +let classObject = SomeClassConformingToProtocol() +expect(classObject).toNot(beAnInstanceOf(SomeProtocol.self)) +expect(classObject).to(beAnInstanceOf(SomeClassConformingToProtocol.self)) +expect(classObject).toNot(beAnInstanceOf(SomeStructConformingToProtocol.self)) + +let structObject = SomeStructConformingToProtocol() +expect(structObject).toNot(beAnInstanceOf(SomeProtocol.self)) +expect(structObject).to(beAnInstanceOf(SomeStructConformingToProtocol.self)) +expect(structObject).toNot(beAnInstanceOf(SomeClassConformingToProtocol.self)) +``` + +## Equivalence + +```swift +// Swift + +// Passes if 'actual' is equivalent to 'expected': +expect(actual).to(equal(expected)) +expect(actual) == expected + +// Passes if 'actual' is not equivalent to 'expected': +expect(actual).toNot(equal(expected)) +expect(actual) != expected +``` + +```objc +// Objective-C + +// Passes if 'actual' is equivalent to 'expected': +expect(actual).to(equal(expected)) + +// Passes if 'actual' is not equivalent to 'expected': +expect(actual).toNot(equal(expected)) +``` + +Values must be `Equatable`, `Comparable`, or subclasses of `NSObject`. +`equal` will always fail when used to compare one or more `nil` values. + +## Identity + +```swift +// Swift + +// Passes if 'actual' has the same pointer address as 'expected': +expect(actual).to(beIdenticalTo(expected)) +expect(actual) === expected + +// Passes if 'actual' does not have the same pointer address as 'expected': +expect(actual).toNot(beIdenticalTo(expected)) +expect(actual) !== expected +``` + +It is important to remember that `beIdenticalTo` only makes sense when comparing +types with reference semantics, which have a notion of identity. In Swift, +that means types that are defined as a `class`. + +This matcher will not work when comparing types with value semantics such as +those defined as a `struct` or `enum`. If you need to compare two value types, +consider what it means for instances of your type to be identical. This may mean +comparing individual properties or, if it makes sense to do so, conforming your type +to `Equatable` and using Nimble's equivalence matchers instead. + + +```objc +// Objective-C + +// Passes if 'actual' has the same pointer address as 'expected': +expect(actual).to(beIdenticalTo(expected)); + +// Passes if 'actual' does not have the same pointer address as 'expected': +expect(actual).toNot(beIdenticalTo(expected)); +``` + +## Comparisons + +```swift +// Swift + +expect(actual).to(beLessThan(expected)) +expect(actual) < expected + +expect(actual).to(beLessThanOrEqualTo(expected)) +expect(actual) <= expected + +expect(actual).to(beGreaterThan(expected)) +expect(actual) > expected + +expect(actual).to(beGreaterThanOrEqualTo(expected)) +expect(actual) >= expected +``` + +```objc +// Objective-C + +expect(actual).to(beLessThan(expected)); +expect(actual).to(beLessThanOrEqualTo(expected)); +expect(actual).to(beGreaterThan(expected)); +expect(actual).to(beGreaterThanOrEqualTo(expected)); +``` + +> Values given to the comparison matchers above must implement + `Comparable`. + +Because of how computers represent floating point numbers, assertions +that two floating point numbers be equal will sometimes fail. To express +that two numbers should be close to one another within a certain margin +of error, use `beCloseTo`: + +```swift +// Swift + +expect(actual).to(beCloseTo(expected, within: delta)) +``` + +```objc +// Objective-C + +expect(actual).to(beCloseTo(expected).within(delta)); +``` + +For example, to assert that `10.01` is close to `10`, you can write: + +```swift +// Swift + +expect(10.01).to(beCloseTo(10, within: 0.1)) +``` + +```objc +// Objective-C + +expect(@(10.01)).to(beCloseTo(@10).within(0.1)); +``` + +There is also an operator shortcut available in Swift: + +```swift +// Swift + +expect(actual) ≈ expected +expect(actual) ≈ (expected, delta) + +``` +(Type option+x to get `≈` on a U.S. keyboard) + +The former version uses the default delta of 0.0001. Here is yet another way to do this: + +```swift +// Swift + +expect(actual) ≈ expected Âą delta +expect(actual) == expected Âą delta + +``` +(Type option+shift+= to get `Âą` on a U.S. keyboard) + +If you are comparing arrays of floating point numbers, you'll find the following useful: + +```swift +// Swift + +expect([0.0, 2.0]) ≈ [0.0001, 2.0001] +expect([0.0, 2.0]).to(beCloseTo([0.1, 2.1], within: 0.1)) + +``` + +> Values given to the `beCloseTo` matcher must be coercable into a + `Double`. + +## Types/Classes + +```swift +// Swift + +// Passes if 'instance' is an instance of 'aClass': +expect(instance).to(beAnInstanceOf(aClass)) + +// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: +expect(instance).to(beAKindOf(aClass)) +``` + +```objc +// Objective-C + +// Passes if 'instance' is an instance of 'aClass': +expect(instance).to(beAnInstanceOf(aClass)); + +// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: +expect(instance).to(beAKindOf(aClass)); +``` + +> Instances must be Objective-C objects: subclasses of `NSObject`, + or Swift objects bridged to Objective-C with the `@objc` prefix. + +For example, to assert that `dolphin` is a kind of `Mammal`: + +```swift +// Swift + +expect(dolphin).to(beAKindOf(Mammal)) +``` + +```objc +// Objective-C + +expect(dolphin).to(beAKindOf([Mammal class])); +``` + +> `beAnInstanceOf` uses the `-[NSObject isMemberOfClass:]` method to + test membership. `beAKindOf` uses `-[NSObject isKindOfClass:]`. + +## Truthiness + +```swift +// Passes if 'actual' is not nil, true, or an object with a boolean value of true: +expect(actual).to(beTruthy()) + +// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): +expect(actual).to(beTrue()) + +// Passes if 'actual' is nil, false, or an object with a boolean value of false: +expect(actual).to(beFalsy()) + +// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): +expect(actual).to(beFalse()) + +// Passes if 'actual' is nil: +expect(actual).to(beNil()) +``` + +```objc +// Objective-C + +// Passes if 'actual' is not nil, true, or an object with a boolean value of true: +expect(actual).to(beTruthy()); + +// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): +expect(actual).to(beTrue()); + +// Passes if 'actual' is nil, false, or an object with a boolean value of false: +expect(actual).to(beFalsy()); + +// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): +expect(actual).to(beFalse()); + +// Passes if 'actual' is nil: +expect(actual).to(beNil()); +``` + +## Swift Assertions + +If you're using Swift, you can use the `throwAssertion` matcher to check if an assertion is thrown (e.g. `fatalError()`). This is made possible by [@mattgallagher](https://github.com/mattgallagher)'s [CwlPreconditionTesting](https://github.com/mattgallagher/CwlPreconditionTesting) library. + +```swift +// Swift + +// Passes if 'somethingThatThrows()' throws an assertion, +// such as by calling 'fatalError()' or if a precondition fails: +expect { try somethingThatThrows() }.to(throwAssertion()) +expect { () -> Void in fatalError() }.to(throwAssertion()) +expect { precondition(false) }.to(throwAssertion()) + +// Passes if throwing an NSError is not equal to throwing an assertion: +expect { throw NSError(domain: "test", code: 0, userInfo: nil) }.toNot(throwAssertion()) + +// Passes if the code after the precondition check is not run: +var reachedPoint1 = false +var reachedPoint2 = false +expect { + reachedPoint1 = true + precondition(false, "condition message") + reachedPoint2 = true +}.to(throwAssertion()) + +expect(reachedPoint1) == true +expect(reachedPoint2) == false +``` + +Notes: + +* This feature is only available in Swift. +* It is only supported for `x86_64` binaries, meaning _you cannot run this matcher on iOS devices, only simulators_. +* The tvOS simulator is supported, but using a different mechanism, requiring you to turn off the `Debug executable` scheme setting for your tvOS scheme's Test configuration. + +## Swift Error Handling + +If you're using Swift 2.0 or newer, you can use the `throwError` matcher to check if an error is thrown. + +Note: +The following code sample references the `Swift.Error` protocol. +This is `Swift.ErrorProtocol` in versions of Swift prior to version 3.0. + +```swift +// Swift + +// Passes if 'somethingThatThrows()' throws an 'Error': +expect { try somethingThatThrows() }.to(throwError()) + +// Passes if 'somethingThatThrows()' throws an error within a particular domain: +expect { try somethingThatThrows() }.to(throwError { (error: Error) in + expect(error._domain).to(equal(NSCocoaErrorDomain)) +}) + +// Passes if 'somethingThatThrows()' throws a particular error enum case: +expect { try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) + +// Passes if 'somethingThatThrows()' throws an error of a particular type: +expect { try somethingThatThrows() }.to(throwError(errorType: NimbleError.self)) +``` + +When working directly with `Error` values, using the `matchError` matcher +allows you to perform certain checks on the error itself without having to +explicitly cast the error. + +The `matchError` matcher allows you to check whether or not the error: + +- is the same _type_ of error you are expecting. +- represents a particular error value that you are expecting. + +This can be useful when using `Result` or `Promise` types, for example. + +```swift +// Swift + +let actual: Error = ... + +// Passes if 'actual' represents any error value from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum.self)) + +// Passes if 'actual' represents the case 'timeout' from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum.timeout)) + +// Passes if 'actual' contains an NSError equal to the one provided: +expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil))) +``` + +Note: This feature is only available in Swift. + +## Exceptions + +```swift +// Swift + +// Passes if 'actual', when evaluated, raises an exception: +expect(actual).to(raiseException()) + +// Passes if 'actual' raises an exception with the given name: +expect(actual).to(raiseException(named: name)) + +// Passes if 'actual' raises an exception with the given name and reason: +expect(actual).to(raiseException(named: name, reason: reason)) + +// Passes if 'actual' raises an exception which passes expectations defined in the given closure: +// (in this case, if the exception's name begins with "a r") +expect { exception.raise() }.to(raiseException { (exception: NSException) in + expect(exception.name).to(beginWith("a r")) +}) +``` + +```objc +// Objective-C + +// Passes if 'actual', when evaluated, raises an exception: +expect(actual).to(raiseException()) + +// Passes if 'actual' raises an exception with the given name +expect(actual).to(raiseException().named(name)) + +// Passes if 'actual' raises an exception with the given name and reason: +expect(actual).to(raiseException().named(name).reason(reason)) + +// Passes if 'actual' raises an exception and it passes expectations defined in the given block: +// (in this case, if name begins with "a r") +expect(actual).to(raiseException().satisfyingBlock(^(NSException *exception) { + expect(exception.name).to(beginWith(@"a r")); +})); +``` + +Note: Swift currently doesn't have exceptions (see [#220](https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)). +Only Objective-C code can raise exceptions that Nimble will catch. + +## Collection Membership + +```swift +// Swift + +// Passes if all of the expected values are members of 'actual': +expect(actual).to(contain(expected...)) + +// Passes if 'actual' is empty (i.e. it contains no elements): +expect(actual).to(beEmpty()) +``` + +```objc +// Objective-C + +// Passes if expected is a member of 'actual': +expect(actual).to(contain(expected)); + +// Passes if 'actual' is empty (i.e. it contains no elements): +expect(actual).to(beEmpty()); +``` + +> In Swift `contain` takes any number of arguments. The expectation + passes if all of them are members of the collection. In Objective-C, + `contain` only takes one argument [for now](https://github.com/Quick/Nimble/issues/27). + +For example, to assert that a list of sea creature names contains +"dolphin" and "starfish": + +```swift +// Swift + +expect(["whale", "dolphin", "starfish"]).to(contain("dolphin", "starfish")) +``` + +```objc +// Objective-C + +expect(@[@"whale", @"dolphin", @"starfish"]).to(contain(@"dolphin")); +expect(@[@"whale", @"dolphin", @"starfish"]).to(contain(@"starfish")); +``` + +> `contain` and `beEmpty` expect collections to be instances of + `NSArray`, `NSSet`, or a Swift collection composed of `Equatable` elements. + +To test whether a set of elements is present at the beginning or end of +an ordered collection, use `beginWith` and `endWith`: + +```swift +// Swift + +// Passes if the elements in expected appear at the beginning of 'actual': +expect(actual).to(beginWith(expected...)) + +// Passes if the the elements in expected come at the end of 'actual': +expect(actual).to(endWith(expected...)) +``` + +```objc +// Objective-C + +// Passes if the elements in expected appear at the beginning of 'actual': +expect(actual).to(beginWith(expected)); + +// Passes if the the elements in expected come at the end of 'actual': +expect(actual).to(endWith(expected)); +``` + +> `beginWith` and `endWith` expect collections to be instances of + `NSArray`, or ordered Swift collections composed of `Equatable` + elements. + + Like `contain`, in Objective-C `beginWith` and `endWith` only support + a single argument [for now](https://github.com/Quick/Nimble/issues/27). + +For code that returns collections of complex objects without a strict +ordering, there is the `containElementSatisfying` matcher: + +```swift +// Swift + +struct Turtle { + let color: String +} + +let turtles: [Turtle] = functionThatReturnsSomeTurtlesInAnyOrder() + +// This set of matchers passes regardless of whether the array is +// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: + +expect(turtles).to(containElementSatisfying({ turtle in + return turtle.color == "green" +})) +expect(turtles).to(containElementSatisfying({ turtle in + return turtle.color == "blue" +}, "that is a turtle with color 'blue'")) + +// The second matcher will incorporate the provided string in the error message +// should it fail +``` + +```objc +// Objective-C + +@interface Turtle : NSObject +@property (nonatomic, readonly, nonnull) NSString *color; +@end + +@implementation Turtle +@end + +NSArray * __nonnull turtles = functionThatReturnsSomeTurtlesInAnyOrder(); + +// This set of matchers passes regardless of whether the array is +// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: + +expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { + return [[turtle color] isEqualToString:@"green"]; +})); +expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { + return [[turtle color] isEqualToString:@"blue"]; +})); +``` + +## Strings + +```swift +// Swift + +// Passes if 'actual' contains 'substring': +expect(actual).to(contain(substring)) + +// Passes if 'actual' begins with 'prefix': +expect(actual).to(beginWith(prefix)) + +// Passes if 'actual' ends with 'suffix': +expect(actual).to(endWith(suffix)) + +// Passes if 'actual' represents the empty string, "": +expect(actual).to(beEmpty()) + +// Passes if 'actual' matches the regular expression defined in 'expected': +expect(actual).to(match(expected)) +``` + +```objc +// Objective-C + +// Passes if 'actual' contains 'substring': +expect(actual).to(contain(expected)); + +// Passes if 'actual' begins with 'prefix': +expect(actual).to(beginWith(prefix)); + +// Passes if 'actual' ends with 'suffix': +expect(actual).to(endWith(suffix)); + +// Passes if 'actual' represents the empty string, "": +expect(actual).to(beEmpty()); + +// Passes if 'actual' matches the regular expression defined in 'expected': +expect(actual).to(match(expected)) +``` + +## Collection Elements + +Nimble provides a means to check that all elements of a collection pass a given expectation. + +### Swift + +In Swift, the collection must be an instance of a type conforming to +`Sequence`. + +```swift +// Swift + +// Providing a custom function: +expect([1, 2, 3, 4]).to(allPass { $0! < 5 }) + +// Composing the expectation with another matcher: +expect([1, 2, 3, 4]).to(allPass(beLessThan(5))) +``` + +### Objective-C + +In Objective-C, the collection must be an instance of a type which implements +the `NSFastEnumeration` protocol, and whose elements are instances of a type +which subclasses `NSObject`. + +Additionally, unlike in Swift, there is no override to specify a custom +matcher function. + +```objc +// Objective-C + +expect(@[@1, @2, @3, @4]).to(allPass(beLessThan(@5))); +``` + +## Collection Count + +```swift +// Swift + +// Passes if 'actual' contains the 'expected' number of elements: +expect(actual).to(haveCount(expected)) + +// Passes if 'actual' does _not_ contain the 'expected' number of elements: +expect(actual).notTo(haveCount(expected)) +``` + +```objc +// Objective-C + +// Passes if 'actual' contains the 'expected' number of elements: +expect(actual).to(haveCount(expected)) + +// Passes if 'actual' does _not_ contain the 'expected' number of elements: +expect(actual).notTo(haveCount(expected)) +``` + +For Swift, the actual value must be an instance of a type conforming to `Collection`. +For example, instances of `Array`, `Dictionary`, or `Set`. + +For Objective-C, the actual value must be one of the following classes, or their subclasses: + + - `NSArray`, + - `NSDictionary`, + - `NSSet`, or + - `NSHashTable`. + +## Notifications + +```swift +// Swift +let testNotification = Notification(name: "Foo", object: nil) + +// passes if the closure in expect { ... } posts a notification to the default +// notification center. +expect { + NotificationCenter.default.postNotification(testNotification) +}.to(postNotifications(equal([testNotification])) + +// passes if the closure in expect { ... } posts a notification to a given +// notification center +let notificationCenter = NotificationCenter() +expect { + notificationCenter.postNotification(testNotification) +}.to(postNotifications(equal([testNotification]), fromNotificationCenter: notificationCenter)) +``` + +> This matcher is only available in Swift. + +## Matching a value to any of a group of matchers + +```swift +// Swift + +// passes if actual is either less than 10 or greater than 20 +expect(actual).to(satisfyAnyOf(beLessThan(10), beGreaterThan(20))) + +// can include any number of matchers -- the following will pass +// **be careful** -- too many matchers can be the sign of an unfocused test +expect(6).to(satisfyAnyOf(equal(2), equal(3), equal(4), equal(5), equal(6), equal(7))) + +// in Swift you also have the option to use the || operator to achieve a similar function +expect(82).to(beLessThan(50) || beGreaterThan(80)) +``` + +```objc +// Objective-C + +// passes if actual is either less than 10 or greater than 20 +expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20))) + +// can include any number of matchers -- the following will pass +// **be careful** -- too many matchers can be the sign of an unfocused test +expect(@6).to(satisfyAnyOf(equal(@2), equal(@3), equal(@4), equal(@5), equal(@6), equal(@7))) +``` + +Note: This matcher allows you to chain any number of matchers together. This provides flexibility, + but if you find yourself chaining many matchers together in one test, consider whether you + could instead refactor that single test into multiple, more precisely focused tests for + better coverage. + +## Custom Validation + +```swift +// Swift + +// passes if .succeeded is returned from the closure +expect({ + guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { + return .failed(reason: "wrong enum case") + } + + return .succeeded +}).to(succeed()) + +// passes if .failed is returned from the closure +expect({ + guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { + return .failed(reason: "wrong enum case") + } + + return .succeeded +}).notTo(succeed()) +``` + +The `String` provided with `.failed()` is shown when the test fails. + +When using `toEventually()` be careful not to make state changes or run process intensive code since this closure will be ran many times. + +# Writing Your Own Matchers + +In Nimble, matchers are Swift functions that take an expected +value and return a `Predicate` closure. Take `equal`, for example: + +```swift +// Swift + +public func equal(expectedValue: T?) -> Predicate { + // Can be shortened to: + // Predicate { actual in ... } + // + // But shown with types here for clarity. + return Predicate { (actual: Expression) throws -> PredicateResult in + let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>") + if let actualValue = try actualExpression.evaluate() { + return PredicateResult( + bool: actualValue == expectedValue!, + message: msg + ) + } else { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } + } +} +``` + +The return value of a `Predicate` closure is a `PredicateResult` that indicates +whether the actual value matches the expectation and what error message to +display on failure. + +> The actual `equal` matcher function does not match when + `expected` are nil; the example above has been edited for brevity. + +Since matchers are just Swift functions, you can define them anywhere: +at the top of your test file, in a file shared by all of your tests, or +in an Xcode project you distribute to others. + +> If you write a matcher you think everyone can use, consider adding it + to Nimble's built-in set of matchers by sending a pull request! Or + distribute it yourself via GitHub. + +For examples of how to write your own matchers, just check out the +[`Matchers` directory](https://github.com/Quick/Nimble/tree/master/Sources/Nimble/Matchers) +to see how Nimble's built-in set of matchers are implemented. You can +also check out the tips below. + +## PredicateResult + +`PredicateResult` is the return struct that `Predicate` return to indicate +success and failure. A `PredicateResult` is made up of two values: +`PredicateStatus` and `ExpectationMessage`. + +Instead of a boolean, `PredicateStatus` captures a trinary set of values: + +```swift +// Swift + +public enum PredicateStatus { +// The predicate "passes" with the given expression +// eg - expect(1).to(equal(1)) +case matches + +// The predicate "fails" with the given expression +// eg - expect(1).toNot(equal(1)) +case doesNotMatch + +// The predicate never "passes" with the given expression, even if negated +// eg - expect(nil as Int?).toNot(equal(1)) +case fail + +// ... +} +``` + +Meanwhile, `ExpectationMessage` provides messaging semantics for error reporting. + +```swift +// Swift + +public indirect enum ExpectationMessage { +// Emits standard error message: +// eg - "expected to , got " +case expectedActualValueTo(/* message: */ String) + +// Allows any free-form message +// eg - "" +case fail(/* message: */ String) + +// ... +} +``` + +Predicates should usually depend on either `.expectedActualValueTo(..)` or +`.fail(..)` when reporting errors. Special cases can be used for the other enum +cases. + +Finally, if your Predicate utilizes other Predicates, you can utilize +`.appended(details:)` and `.appended(message:)` methods to annotate an existing +error with more details. + +A common message to append is failing on nils. For that, `.appendedBeNilHint()` +can be used. + +## Lazy Evaluation + +`actualExpression` is a lazy, memoized closure around the value provided to the +`expect` function. The expression can either be a closure or a value directly +passed to `expect(...)`. In order to determine whether that value matches, +custom matchers should call `actualExpression.evaluate()`: + +```swift +// Swift + +public func beNil() -> Predicate { + // Predicate.simpleNilable(..) automatically generates ExpectationMessage for + // us based on the string we provide to it. Also, the 'Nilable' postfix indicates + // that this Predicate supports matching against nil actualExpressions, instead of + // always resulting in a PredicateStatus.fail result -- which is true for + // Predicate.simple(..) + return Predicate.simpleNilable("be nil") { actualExpression in + let actualValue = try actualExpression.evaluate() + return PredicateStatus(bool: actualValue == nil) + } +} +``` + +In the above example, `actualExpression` is not `nil` -- it is a closure +that returns a value. The value it returns, which is accessed via the +`evaluate()` method, may be `nil`. If that value is `nil`, the `beNil` +matcher function returns `true`, indicating that the expectation passed. + +## Type Checking via Swift Generics + +Using Swift's generics, matchers can constrain the type of the actual value +passed to the `expect` function by modifying the return type. + +For example, the following matcher, `haveDescription`, only accepts actual +values that implement the `Printable` protocol. It checks their `description` +against the one provided to the matcher function, and passes if they are the same: + +```swift +// Swift + +public func haveDescription(description: String) -> Predicate { + return Predicate.simple("have description") { actual in + return PredicateStatus(bool: actual.evaluate().description == description) + } +} +``` + +## Customizing Failure Messages + +When using `Predicate.simple(..)` or `Predicate.simpleNilable(..)`, Nimble +outputs the following failure message when an expectation fails: + +```swift +// where `message` is the first string argument and +// `actual` is the actual value received in `expect(..)` +"expected to \(message), got <\(actual)>" +``` + +You can customize this message by modifying the way you create a `Predicate`. + +### Basic Customization + +For slightly more complex error messaging, receive the created failure message +with `Predicate.define(..)`: + +```swift +// Swift + +public func equal(_ expectedValue: T?) -> Predicate { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + let actualValue = try actualExpression.evaluate() + let matches = actualValue == expectedValue && expectedValue != nil + if expectedValue == nil || actualValue == nil { + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } + return PredicateResult(status: .fail, message: msg) + } + return PredicateResult(bool: matches, message: msg) + } +} +``` + +In the example above, `msg` is defined based on the string given to +`Predicate.define`. The code looks akin to: + +```swift +// Swift + +let msg = ExpectationMessage.expectedActualValueTo("equal <\(stringify(expectedValue))>") +``` + +### Full Customization + +To fully customize the behavior of the Predicate, use the overload that expects +a `PredicateResult` to be returned. + +Along with `PredicateResult`, there are other `ExpectationMessage` enum values you can use: + +```swift +public indirect enum ExpectationMessage { +// Emits standard error message: +// eg - "expected to , got " +case expectedActualValueTo(/* message: */ String) + +// Allows any free-form message +// eg - "" +case fail(/* message: */ String) + +// Emits standard error message with a custom actual value instead of the default. +// eg - "expected to , got " +case expectedCustomValueTo(/* message: */ String, /* actual: */ String) + +// Emits standard error message without mentioning the actual value +// eg - "expected to " +case expectedTo(/* message: */ String) + +// ... +} +``` + +For matchers that compose other matchers, there are a handful of helper +functions to annotate messages. + +`appended(message: String)` is used to append to the original failure message: + +```swift +// produces "expected to be true, got (use beFalse() for inverse)" +// appended message do show up inline in Xcode. +.expectedActualValueTo("be true").appended(message: " (use beFalse() for inverse)") +``` + +For a more comprehensive message that spans multiple lines, use +`appended(details: String)` instead: + +```swift +// produces "expected to be true, got \n\nuse beFalse() for inverse\nor use beNil()" +// details do not show inline in Xcode, but do show up in test logs. +.expectedActualValueTo("be true").appended(details: "use beFalse() for inverse\nor use beNil()") +``` + +## Supporting Objective-C + +To use a custom matcher written in Swift from Objective-C, you'll have +to extend the `NMBObjCMatcher` class, adding a new class method for your +custom matcher. The example below defines the class method +`+[NMBObjCMatcher beNilMatcher]`: + +```swift +// Swift + +extension NMBObjCMatcher { + public class func beNilMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualBlock, failureMessage, location in + let block = ({ actualBlock() as NSObject? }) + let expr = Expression(expression: block, location: location) + return beNil().matches(expr, failureMessage: failureMessage) + } + } +} +``` + +The above allows you to use the matcher from Objective-C: + +```objc +// Objective-C + +expect(actual).to([NMBObjCMatcher beNilMatcher]()); +``` + +To make the syntax easier to use, define a C function that calls the +class method: + +```objc +// Objective-C + +FOUNDATION_EXPORT id beNil() { + return [NMBObjCMatcher beNilMatcher]; +} +``` + +### Properly Handling `nil` in Objective-C Matchers + +When supporting Objective-C, make sure you handle `nil` appropriately. +Like [Cedar](https://github.com/pivotal/cedar/issues/100), +**most matchers do not match with nil**. This is to bring prevent test +writers from being surprised by `nil` values where they did not expect +them. + +Nimble provides the `beNil` matcher function for test writer that want +to make expectations on `nil` objects: + +```objc +// Objective-C + +expect(nil).to(equal(nil)); // fails +expect(nil).to(beNil()); // passes +``` + +If your matcher does not want to match with nil, you use `NonNilMatcherFunc` +and the `canMatchNil` constructor on `NMBObjCMatcher`. Using both types will +automatically generate expected value failure messages when they're nil. + +```swift + +public func beginWith(startingElement: T) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + failureMessage.postfixMessage = "begin with <\(startingElement)>" + if let actualValue = actualExpression.evaluate() { + var actualGenerator = actualValue.makeIterator() + return actualGenerator.next() == startingElement + } + return false + } +} + +extension NMBObjCMatcher { + public class func beginWithMatcher(expected: AnyObject) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let actual = actualExpression.evaluate() + let expr = actualExpression.cast { $0 as? NMBOrderedCollection } + return beginWith(expected).matches(expr, failureMessage: failureMessage) + } + } +} +``` + +## Migrating from the Old Matcher API + +Previously (`<7.0.0`), Nimble supported matchers via the following types: + +- `Matcher` +- `NonNilMatcherFunc` +- `MatcherFunc` + +All of those types have been replaced by `Predicate`. While migrating can be a +lot of work, Nimble currently provides several steps to aid migration of your +custom matchers: + +### Minimal Step - Use `.predicate` + +Nimble provides an extension to the old types that automatically naively +converts those types to the newer `Predicate`. + +```swift +// Swift +public func beginWith(startingElement: T) -> Predicate { + return NonNilMatcherFunc { actualExpression, failureMessage in + failureMessage.postfixMessage = "begin with <\(startingElement)>" + if let actualValue = actualExpression.evaluate() { + var actualGenerator = actualValue.makeIterator() + return actualGenerator.next() == startingElement + } + return false + }.predicate +} +``` + +This is the simpliest way to externally support `Predicate` which allows easier +composition than the old Nimble matcher interface, with minimal effort to change. + +### Convert to use `Predicate` Type with Old Matcher Constructor + +The second most convenient step is to utilize special constructors that +`Predicate` supports that closely align to the constructors of the old Nimble +matcher types. + +```swift +// Swift +public func beginWith(startingElement: T) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "begin with <\(startingElement)>" + if let actualValue = actualExpression.evaluate() { + var actualGenerator = actualValue.makeIterator() + return actualGenerator.next() == startingElement + } + return false + } +} +``` + +This allows you to completely drop the old types from your code, although the +intended behavior may alter slightly to what is desired. + +### Convert to `Predicate` Type with Preferred Constructor + +Finally, you can convert to the native `Predicate` format using one of the +constructors not used to assist in the migration. + +### Deprecation Roadmap + +Nimble 7 introduces `Predicate` but will support the old types with warning +deprecations. A couple major releases of Nimble will remain backwards +compatible with the old matcher api, although new features may not be +backported. + +The deprecating plan is a 3 major versions removal. Which is as follows: + + 1. Introduce new `Predicate` API, deprecation warning for old matcher APIs. + (Nimble `v7.x.x`) + 2. Introduce warnings on migration-path features (`.predicate`, + `Predicate`-constructors with similar arguments to old API). (Nimble + `v8.x.x`) + 3. Remove old API. (Nimble `v9.x.x`) + + +# Installing Nimble + +> Nimble can be used on its own, or in conjunction with its sister + project, [Quick](https://github.com/Quick/Quick). To install both + Quick and Nimble, follow [the installation instructions in the Quick + Documentation](https://github.com/Quick/Quick/blob/master/Documentation/en-us/InstallingQuick.md). + +Nimble can currently be installed in one of two ways: using CocoaPods, or with +git submodules. + +## Installing Nimble as a Submodule + +To use Nimble as a submodule to test your macOS, iOS or tvOS applications, follow +these 4 easy steps: + +1. Clone the Nimble repository +2. Add Nimble.xcodeproj to the Xcode workspace for your project +3. Link Nimble.framework to your test target +4. Start writing expectations! + +For more detailed instructions on each of these steps, +read [How to Install Quick](https://github.com/Quick/Quick#how-to-install-quick). +Ignore the steps involving adding Quick to your project in order to +install just Nimble. + +## Installing Nimble via CocoaPods + +To use Nimble in CocoaPods to test your macOS, iOS or tvOS applications, add +Nimble to your podfile and add the ```use_frameworks!``` line to enable Swift +support for CocoaPods. + +```ruby +platform :ios, '8.0' + +source 'https://github.com/CocoaPods/Specs.git' + +# Whatever pods you need for your app go here + +target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do + use_frameworks! + pod 'Nimble', '~> 6.0.0' +end +``` + +Finally run `pod install`. + +## Using Nimble without XCTest + +Nimble is integrated with XCTest to allow it work well when used in Xcode test +bundles, however it can also be used in a standalone app. After installing +Nimble using one of the above methods, there are two additional steps required +to make this work. + +1. Create a custom assertion handler and assign an instance of it to the + global `NimbleAssertionHandler` variable. For example: + +```swift +class MyAssertionHandler : AssertionHandler { + func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + if (!assertion) { + print("Expectation failed: \(message.stringValue)") + } + } +} +``` +```swift +// Somewhere before you use any assertions +NimbleAssertionHandler = MyAssertionHandler() +``` + +2. Add a post-build action to fix an issue with the Swift XCTest support + library being unnecessarily copied into your app + * Edit your scheme in Xcode, and navigate to Build -> Post-actions + * Click the "+" icon and select "New Run Script Action" + * Open the "Provide build settings from" dropdown and select your target + * Enter the following script contents: +``` +rm "${SWIFT_STDLIB_TOOL_DESTINATION_DIR}/libswiftXCTest.dylib" +``` + +You can now use Nimble assertions in your code and handle failures as you see +fit. diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift new file mode 100644 index 0000000..2e58fdf --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift @@ -0,0 +1,17 @@ +import Foundation + +/// Protocol for the assertion handler that Nimble uses for all expectations. +public protocol AssertionHandler { + func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) +} + +/// Global backing interface for assertions that Nimble creates. +/// Defaults to a private test handler that passes through to XCTest. +/// +/// If XCTest is not available, you must assign your own assertion handler +/// before using any matchers, otherwise Nimble will abort the program. +/// +/// @see AssertionHandler +public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in + return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() +}() diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift new file mode 100644 index 0000000..94a9030 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift @@ -0,0 +1,19 @@ +/// AssertionDispatcher allows multiple AssertionHandlers to receive +/// assertion messages. +/// +/// @warning Does not fully dispatch if one of the handlers raises an exception. +/// This is possible with XCTest-based assertion handlers. +/// +public class AssertionDispatcher: AssertionHandler { + let handlers: [AssertionHandler] + + public init(handlers: [AssertionHandler]) { + self.handlers = handlers + } + + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { + for handler in handlers { + handler.assert(assertion, message: message, location: location) + } + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift new file mode 100644 index 0000000..740c392 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift @@ -0,0 +1,100 @@ +import Foundation + +/// A data structure that stores information about an assertion when +/// AssertionRecorder is set as the Nimble assertion handler. +/// +/// @see AssertionRecorder +/// @see AssertionHandler +public struct AssertionRecord: CustomStringConvertible { + /// Whether the assertion succeeded or failed + public let success: Bool + /// The failure message the assertion would display on failure. + public let message: FailureMessage + /// The source location the expectation occurred on. + public let location: SourceLocation + + public var description: String { + return "AssertionRecord { success=\(success), message='\(message.stringValue)', location=\(location) }" + } +} + +/// An AssertionHandler that silently records assertions that Nimble makes. +/// This is useful for testing failure messages for matchers. +/// +/// @see AssertionHandler +public class AssertionRecorder: AssertionHandler { + /// All the assertions that were captured by this recorder + public var assertions = [AssertionRecord]() + + public init() {} + + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { + assertions.append( + AssertionRecord( + success: assertion, + message: message, + location: location)) + } +} + +/// Allows you to temporarily replace the current Nimble assertion handler with +/// the one provided for the scope of the closure. +/// +/// Once the closure finishes, then the original Nimble assertion handler is restored. +/// +/// @see AssertionHandler +public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, closure: () throws -> Void) { + let environment = NimbleEnvironment.activeInstance + let oldRecorder = environment.assertionHandler + let capturer = NMBExceptionCapture(handler: nil, finally: ({ + environment.assertionHandler = oldRecorder + })) + environment.assertionHandler = tempAssertionHandler + capturer.tryBlock { + try! closure() + } +} + +/// Captures expectations that occur in the given closure. Note that all +/// expectations will still go through to the default Nimble handler. +/// +/// This can be useful if you want to gather information about expectations +/// that occur within a closure. +/// +/// @param silently expectations are no longer send to the default Nimble +/// assertion handler when this is true. Defaults to false. +/// +/// @see gatherFailingExpectations +public func gatherExpectations(silently: Bool = false, closure: @escaping () -> Void) -> [AssertionRecord] { + let previousRecorder = NimbleEnvironment.activeInstance.assertionHandler + let recorder = AssertionRecorder() + let handlers: [AssertionHandler] + + if silently { + handlers = [recorder] + } else { + handlers = [recorder, previousRecorder] + } + + let dispatcher = AssertionDispatcher(handlers: handlers) + withAssertionHandler(dispatcher, closure: closure) + return recorder.assertions +} + +/// Captures failed expectations that occur in the given closure. Note that all +/// expectations will still go through to the default Nimble handler. +/// +/// This can be useful if you want to gather information about failed +/// expectations that occur within a closure. +/// +/// @param silently expectations are no longer send to the default Nimble +/// assertion handler when this is true. Defaults to false. +/// +/// @see gatherExpectations +/// @see raiseException source for an example use case. +public func gatherFailingExpectations(silently: Bool = false, closure: @escaping () -> Void) -> [AssertionRecord] { + let assertions = gatherExpectations(silently: silently, closure: closure) + return assertions.filter { assertion in + !assertion.success + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift new file mode 100644 index 0000000..88d9406 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift @@ -0,0 +1,187 @@ +import Foundation + +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + +private func from(objcPredicate: NMBPredicate) -> Predicate { + return Predicate { actualExpression in + let result = objcPredicate.satisfies(({ try! actualExpression.evaluate() }), + location: actualExpression.location) + return result.toSwift() + } +} + +internal struct ObjCMatcherWrapper: Matcher { + let matcher: NMBMatcher + + func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return matcher.matches( + ({ try! actualExpression.evaluate() }), + failureMessage: failureMessage, + location: actualExpression.location) + } + + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return matcher.doesNotMatch( + ({ try! actualExpression.evaluate() }), + failureMessage: failureMessage, + location: actualExpression.location) + } +} + +// Equivalent to Expectation, but for Nimble's Objective-C interface +public class NMBExpectation: NSObject { + internal let _actualBlock: () -> NSObject! + internal var _negative: Bool + internal let _file: FileString + internal let _line: UInt + internal var _timeout: TimeInterval = 1.0 + + @objc public init(actualBlock: @escaping () -> NSObject!, negative: Bool, file: FileString, line: UInt) { + self._actualBlock = actualBlock + self._negative = negative + self._file = file + self._line = line + } + + private var expectValue: Expectation { + return expect(_file, line: _line) { + self._actualBlock() as NSObject? + } + } + + @objc public var withTimeout: (TimeInterval) -> NMBExpectation { + return ({ timeout in self._timeout = timeout + return self + }) + } + + @objc public var to: (NMBMatcher) -> Void { + return ({ matcher in + if let pred = matcher as? NMBPredicate { + self.expectValue.to(from(objcPredicate: pred)) + } else { + self.expectValue.to(ObjCMatcherWrapper(matcher: matcher)) + } + }) + } + + @objc public var toWithDescription: (NMBMatcher, String) -> Void { + return ({ matcher, description in + if let pred = matcher as? NMBPredicate { + self.expectValue.to(from(objcPredicate: pred), description: description) + } else { + self.expectValue.to(ObjCMatcherWrapper(matcher: matcher), description: description) + } + }) + } + + @objc public var toNot: (NMBMatcher) -> Void { + return ({ matcher in + if let pred = matcher as? NMBPredicate { + self.expectValue.toNot(from(objcPredicate: pred)) + } else { + self.expectValue.toNot(ObjCMatcherWrapper(matcher: matcher)) + } + }) + } + + @objc public var toNotWithDescription: (NMBMatcher, String) -> Void { + return ({ matcher, description in + if let pred = matcher as? NMBPredicate { + self.expectValue.toNot(from(objcPredicate: pred), description: description) + } else { + self.expectValue.toNot(ObjCMatcherWrapper(matcher: matcher), description: description) + } + }) + } + + @objc public var notTo: (NMBMatcher) -> Void { return toNot } + + @objc public var notToWithDescription: (NMBMatcher, String) -> Void { return toNotWithDescription } + + @objc public var toEventually: (NMBMatcher) -> Void { + return ({ matcher in + if let pred = matcher as? NMBPredicate { + self.expectValue.toEventually( + from(objcPredicate: pred), + timeout: self._timeout, + description: nil + ) + } else { + self.expectValue.toEventually( + ObjCMatcherWrapper(matcher: matcher), + timeout: self._timeout, + description: nil + ) + } + }) + } + + @objc public var toEventuallyWithDescription: (NMBMatcher, String) -> Void { + return ({ matcher, description in + if let pred = matcher as? NMBPredicate { + self.expectValue.toEventually( + from(objcPredicate: pred), + timeout: self._timeout, + description: description + ) + } else { + self.expectValue.toEventually( + ObjCMatcherWrapper(matcher: matcher), + timeout: self._timeout, + description: description + ) + } + }) + } + + @objc public var toEventuallyNot: (NMBMatcher) -> Void { + return ({ matcher in + if let pred = matcher as? NMBPredicate { + self.expectValue.toEventuallyNot( + from(objcPredicate: pred), + timeout: self._timeout, + description: nil + ) + } else { + self.expectValue.toEventuallyNot( + ObjCMatcherWrapper(matcher: matcher), + timeout: self._timeout, + description: nil + ) + } + }) + } + + @objc public var toEventuallyNotWithDescription: (NMBMatcher, String) -> Void { + return ({ matcher, description in + if let pred = matcher as? NMBPredicate { + self.expectValue.toEventuallyNot( + from(objcPredicate: pred), + timeout: self._timeout, + description: description + ) + } else { + self.expectValue.toEventuallyNot( + ObjCMatcherWrapper(matcher: matcher), + timeout: self._timeout, + description: description + ) + } + }) + } + + @objc public var toNotEventually: (NMBMatcher) -> Void { + return toEventuallyNot + } + + @objc public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { + return toEventuallyNotWithDescription + } + + @objc public class func failWithMessage(_ message: String, file: FileString, line: UInt) { + fail(message, location: SourceLocation(file: file, line: line)) + } +} + +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift new file mode 100644 index 0000000..9ba2ffa --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift @@ -0,0 +1,83 @@ +import Foundation + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + +// swiftlint:disable line_length +public typealias MatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage) -> Bool +public typealias FullMatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage, _ shouldNotMatch: Bool) -> Bool +// swiftlint:enable line_length + +public class NMBObjCMatcher: NSObject, NMBMatcher { + let _match: MatcherBlock + let _doesNotMatch: MatcherBlock + let canMatchNil: Bool + + public init(canMatchNil: Bool, matcher: @escaping MatcherBlock, notMatcher: @escaping MatcherBlock) { + self.canMatchNil = canMatchNil + self._match = matcher + self._doesNotMatch = notMatcher + } + + public convenience init(matcher: @escaping MatcherBlock) { + self.init(canMatchNil: true, matcher: matcher) + } + + public convenience init(canMatchNil: Bool, matcher: @escaping MatcherBlock) { + self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage in + return !matcher(actualExpression, failureMessage) + })) + } + + public convenience init(matcher: @escaping FullMatcherBlock) { + self.init(canMatchNil: true, matcher: matcher) + } + + public convenience init(canMatchNil: Bool, matcher: @escaping FullMatcherBlock) { + self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage in + return matcher(actualExpression, failureMessage, false) + }), notMatcher: ({ actualExpression, failureMessage in + return matcher(actualExpression, failureMessage, true) + })) + } + + private func canMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + do { + if !canMatchNil { + if try actualExpression.evaluate() == nil { + failureMessage.postfixActual = " (use beNil() to match nils)" + return false + } + } + } catch let error { + failureMessage.actualValue = "an unexpected error thrown: \(error)" + return false + } + return true + } + + public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let expr = Expression(expression: actualBlock, location: location) + let result = _match( + expr, + failureMessage) + if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { + return result + } else { + return false + } + } + + public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let expr = Expression(expression: actualBlock, location: location) + let result = _doesNotMatch( + expr, + failureMessage) + if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { + return result + } else { + return false + } + } +} + +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift new file mode 100644 index 0000000..e1b5432 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift @@ -0,0 +1,45 @@ +import Dispatch +import Foundation + +/// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this +/// class' existence +internal class NimbleEnvironment { + static var activeInstance: NimbleEnvironment { + get { + let env = Thread.current.threadDictionary["NimbleEnvironment"] + if let env = env as? NimbleEnvironment { + return env + } else { + let newEnv = NimbleEnvironment() + self.activeInstance = newEnv + return newEnv + } + } + set { + Thread.current.threadDictionary["NimbleEnvironment"] = newValue + } + } + + // TODO: eventually migrate the global to this environment value + var assertionHandler: AssertionHandler { + get { return NimbleAssertionHandler } + set { NimbleAssertionHandler = newValue } + } + + var suppressTVOSAssertionWarning: Bool = false + var awaiter: Awaiter + + init() { + let timeoutQueue: DispatchQueue + if #available(OSX 10.10, *) { + timeoutQueue = DispatchQueue.global(qos: .userInitiated) + } else { + timeoutQueue = DispatchQueue.global(priority: .high) + } + + awaiter = Awaiter( + waitLock: AssertionWaitLock(), + asyncQueue: .main, + timeoutQueue: timeoutQueue) + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift new file mode 100644 index 0000000..0ad8590 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift @@ -0,0 +1,81 @@ +import Foundation +import XCTest + +/// Default handler for Nimble. This assertion handler passes failures along to +/// XCTest. +public class NimbleXCTestHandler: AssertionHandler { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { + if !assertion { + recordFailure("\(message.stringValue)\n", location: location) + } + } +} + +/// Alternative handler for Nimble. This assertion handler passes failures along +/// to XCTest by attempting to reduce the failure message size. +public class NimbleShortXCTestHandler: AssertionHandler { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { + if !assertion { + let msg: String + if let actual = message.actualValue { + msg = "got: \(actual) \(message.postfixActual)" + } else { + msg = "expected \(message.to) \(message.postfixMessage)" + } + recordFailure("\(msg)\n", location: location) + } + } +} + +/// Fallback handler in case XCTest is unavailable. This assertion handler will abort +/// the program if it is invoked. +class NimbleXCTestUnavailableHandler: AssertionHandler { + func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { + fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") + } +} + +#if !SWIFT_PACKAGE +/// Helper class providing access to the currently executing XCTestCase instance, if any +@objc final internal class CurrentTestCaseTracker: NSObject, XCTestObservation { + @objc static let sharedInstance = CurrentTestCaseTracker() + + private(set) var currentTestCase: XCTestCase? + + @objc func testCaseWillStart(_ testCase: XCTestCase) { + currentTestCase = testCase + } + + @objc func testCaseDidFinish(_ testCase: XCTestCase) { + currentTestCase = nil + } +} +#endif + +func isXCTestAvailable() -> Bool { +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + // XCTest is weakly linked and so may not be present + return NSClassFromString("XCTestCase") != nil +#else + return true +#endif +} + +private func recordFailure(_ message: String, location: SourceLocation) { +#if SWIFT_PACKAGE + XCTFail("\(message)", file: location.file, line: location.line) +#else + if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { + #if swift(>=4) + let line = Int(location.line) + #else + let line = location.line + #endif + testCase.recordFailure(withDescription: message, inFile: location.file, atLine: line, expected: true) + } else { + let msg = "Attempted to report a test failure to XCTest while no test case was running. " + + "The failure was:\n\"\(message)\"\nIt occurred at: \(location.file):\(location.line)" + NSException(name: .internalInconsistencyException, reason: msg, userInfo: nil).raise() + } +#endif +} diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift new file mode 100644 index 0000000..e874136 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift @@ -0,0 +1,116 @@ +import Dispatch +import Foundation + +private enum ErrorResult { + case exception(NSException) + case error(Error) + case none +} + +/// Only classes, protocols, methods, properties, and subscript declarations can be +/// bridges to Objective-C via the @objc keyword. This class encapsulates callback-style +/// asynchronous waiting logic so that it may be called from Objective-C and Swift. +internal class NMBWait: NSObject { +// About these kind of lines, `@objc` attributes are only required for Objective-C +// support, so that should be conditional on Darwin platforms and normal Xcode builds +// (non-SwiftPM builds). +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objc + internal class func until( + timeout: TimeInterval, + file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) -> Void) { + return throwableUntil(timeout: timeout, file: file, line: line) { done in + action(done) + } + } +#else + internal class func until( + timeout: TimeInterval, + file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) -> Void) { + return throwableUntil(timeout: timeout, file: file, line: line) { done in + action(done) + } + } +#endif + + // Using a throwable closure makes this method not objc compatible. + internal class func throwableUntil( + timeout: TimeInterval, + file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) throws -> Void) { + let awaiter = NimbleEnvironment.activeInstance.awaiter + let leeway = timeout / 2.0 + // swiftlint:disable:next line_length + let result = awaiter.performBlock(file: file, line: line) { (done: @escaping (ErrorResult) -> Void) throws -> Void in + DispatchQueue.main.async { + let capture = NMBExceptionCapture( + handler: ({ exception in + done(.exception(exception)) + }), + finally: ({ }) + ) + capture.tryBlock { + do { + try action { + done(.none) + } + } catch let e { + done(.error(e)) + } + } + } + }.timeout(timeout, forcefullyAbortTimeout: leeway).wait("waitUntil(...)", file: file, line: line) + + switch result { + case .incomplete: internalError("Reached .incomplete state for waitUntil(...).") + case .blockedRunLoop: + fail(blockedRunLoopErrorMessageFor("-waitUntil()", leeway: leeway), + file: file, line: line) + case .timedOut: + let pluralize = (timeout == 1 ? "" : "s") + fail("Waited more than \(timeout) second\(pluralize)", file: file, line: line) + case let .raisedException(exception): + fail("Unexpected exception raised: \(exception)") + case let .errorThrown(error): + fail("Unexpected error thrown: \(error)") + case .completed(.exception(let exception)): + fail("Unexpected exception raised: \(exception)") + case .completed(.error(let error)): + fail("Unexpected error thrown: \(error)") + case .completed(.none): // success + break + } + } + +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objc(untilFile:line:action:) + internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) { + until(timeout: 1, file: file, line: line, action: action) + } +#else + internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) { + until(timeout: 1, file: file, line: line, action: action) + } +#endif +} + +internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: TimeInterval) -> String { + // swiftlint:disable:next line_length + return "\(fnName) timed out but was unable to run the timeout handler because the main thread is unresponsive (\(leeway) seconds is allow after the wait times out). Conditions that may cause this include processing blocking IO on the main thread, calls to sleep(), deadlocks, and synchronous IPC. Nimble forcefully stopped run loop which may cause future failures in test run." +} + +/// Wait asynchronously until the done closure is called or the timeout has been reached. +/// +/// @discussion +/// Call the done() closure to indicate the waiting has completed. +/// +/// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function +/// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. +public func waitUntil(timeout: TimeInterval = AsyncDefaults.Timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { + NMBWait.until(timeout: timeout, file: file, line: line, action: action) +} diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL.swift b/Example/Pods/Nimble/Sources/Nimble/DSL.swift new file mode 100644 index 0000000..e49bb0c --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/DSL.swift @@ -0,0 +1,64 @@ +import Foundation + +/// Make an expectation on a given actual value. The value given is lazily evaluated. +public func expect(_ expression: @autoclosure @escaping () throws -> T?, file: FileString = #file, line: UInt = #line) -> Expectation { + return Expectation( + expression: Expression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an expectation on a given actual value. The closure is lazily invoked. +public func expect(_ file: FileString = #file, line: UInt = #line, expression: @escaping () throws -> T?) -> Expectation { + return Expectation( + expression: Expression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Always fails the test with a message and a specified location. +public func fail(_ message: String, location: SourceLocation) { + let handler = NimbleEnvironment.activeInstance.assertionHandler + handler.assert(false, message: FailureMessage(stringValue: message), location: location) +} + +/// Always fails the test with a message. +public func fail(_ message: String, file: FileString = #file, line: UInt = #line) { + fail(message, location: SourceLocation(file: file, line: line)) +} + +/// Always fails the test. +public func fail(_ file: FileString = #file, line: UInt = #line) { + fail("fail() always fails", file: file, line: line) +} + +/// Like Swift's precondition(), but raises NSExceptions instead of sigaborts +internal func nimblePrecondition( + _ expr: @autoclosure() -> Bool, + _ name: @autoclosure() -> String, + _ message: @autoclosure() -> String, + file: StaticString = #file, + line: UInt = #line) { + let result = expr() + if !result { +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + let e = NSException( + name: NSExceptionName(name()), + reason: message(), + userInfo: nil) + e.raise() +#else + preconditionFailure("\(name()) - \(message())", file: file, line: line) +#endif + } +} + +internal func internalError(_ msg: String, file: FileString = #file, line: UInt = #line) -> Never { + fatalError( + "Nimble Bug Found: \(msg) at \(file):\(line).\n" + + "Please file a bug to Nimble: https://github.com/Quick/Nimble/issues with the " + + "code snippet that caused this error." + ) +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift b/Example/Pods/Nimble/Sources/Nimble/Expectation.swift new file mode 100644 index 0000000..e3f616a --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Expectation.swift @@ -0,0 +1,132 @@ +import Foundation + +// Deprecated +internal func expressionMatches(_ expression: Expression, matcher: U, to: String, description: String?) -> (Bool, FailureMessage) + where U: Matcher, U.ValueType == T { + let msg = FailureMessage() + msg.userDescription = description + msg.to = to + do { + let pass = try matcher.matches(expression, failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(try expression.evaluate()))>" + } + return (pass, msg) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg) + } +} + +// Deprecated +internal func expressionDoesNotMatch(_ expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) + where U: Matcher, U.ValueType == T { + let msg = FailureMessage() + msg.userDescription = description + msg.to = toNot + do { + let pass = try matcher.doesNotMatch(expression, failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(try expression.evaluate()))>" + } + return (pass, msg) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg) + } +} + +internal func execute(_ expression: Expression, _ style: ExpectationStyle, _ predicate: Predicate, to: String, description: String?, captureExceptions: Bool = true) -> (Bool, FailureMessage) { + func run() -> (Bool, FailureMessage) { + let msg = FailureMessage() + msg.userDescription = description + msg.to = to + do { + let result = try predicate.satisfies(expression) + result.message.update(failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(try expression.evaluate()))>" + } + return (result.toBoolean(expectation: style), msg) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg) + } + } + + var result: (Bool, FailureMessage) = (false, FailureMessage()) + if captureExceptions { + let capture = NMBExceptionCapture(handler: ({ exception -> Void in + let msg = FailureMessage() + msg.stringValue = "unexpected exception raised: \(exception)" + result = (false, msg) + }), finally: nil) + capture.tryBlock { + result = run() + } + } else { + result = run() + } + + return result +} + +public struct Expectation { + + public let expression: Expression + + public func verify(_ pass: Bool, _ message: FailureMessage) { + let handler = NimbleEnvironment.activeInstance.assertionHandler + handler.assert(pass, message: message, location: expression.location) + } + + ////////////////// OLD API ///////////////////// + + /// DEPRECATED: Tests the actual value using a matcher to match. + public func to(_ matcher: U, description: String? = nil) + where U: Matcher, U.ValueType == T { + let (pass, msg) = expressionMatches(expression, matcher: matcher, to: "to", description: description) + verify(pass, msg) + } + + /// DEPRECATED: Tests the actual value using a matcher to not match. + public func toNot(_ matcher: U, description: String? = nil) + where U: Matcher, U.ValueType == T { + // swiftlint:disable:next line_length + let (pass, msg) = expressionDoesNotMatch(expression, matcher: matcher, toNot: "to not", description: description) + verify(pass, msg) + } + + /// DEPRECATED: Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + public func notTo(_ matcher: U, description: String? = nil) + where U: Matcher, U.ValueType == T { + toNot(matcher, description: description) + } + + ////////////////// NEW API ///////////////////// + + /// Tests the actual value using a matcher to match. + public func to(_ predicate: Predicate, description: String? = nil) { + let (pass, msg) = execute(expression, .toMatch, predicate, to: "to", description: description) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + public func toNot(_ predicate: Predicate, description: String? = nil) { + let (pass, msg) = execute(expression, .toNotMatch, predicate, to: "to not", description: description) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + public func notTo(_ predicate: Predicate, description: String? = nil) { + toNot(predicate, description: description) + } + + // see: + // - AsyncMatcherWrapper for extension + // - NMBExpectation for Objective-C interface +} diff --git a/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift b/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift new file mode 100644 index 0000000..992ee0e --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift @@ -0,0 +1,262 @@ +import Foundation + +public indirect enum ExpectationMessage { + // --- Primary Expectations --- + /// includes actual value in output ("expected to , got ") + case expectedActualValueTo(/* message: */ String) + /// uses a custom actual value string in output ("expected to , got ") + case expectedCustomValueTo(/* message: */ String, /* actual: */ String) + /// excludes actual value in output ("expected to ") + case expectedTo(/* message: */ String) + /// allows any free-form message ("") + case fail(/* message: */ String) + + // --- Composite Expectations --- + // Generally, you'll want the methods, appended(message:) and appended(details:) instead. + + /// Not Fully Implemented Yet. + case prepends(/* Prepended Message */ String, ExpectationMessage) + + /// appends after an existing message (" (use beNil() to match nils)") + case appends(ExpectationMessage, /* Appended Message */ String) + + /// provides long-form multi-line explainations ("\n\n") + case details(ExpectationMessage, String) + + internal var sampleMessage: String { + let asStr = toString(actual: "", expected: "expected", to: "to") + let asFailureMessage = FailureMessage() + update(failureMessage: asFailureMessage) + // swiftlint:disable:next line_length + return "(toString(actual:expected:to:) -> \(asStr) || update(failureMessage:) -> \(asFailureMessage.stringValue))" + } + + /// Returns the smallest message after the "expected to" string that summarizes the error. + /// + /// Returns the message part from ExpectationMessage, ignoring all .appends and .details. + public var expectedMessage: String { + switch self { + case let .fail(msg): + return msg + case let .expectedTo(msg): + return msg + case let .expectedActualValueTo(msg): + return msg + case let .expectedCustomValueTo(msg, _): + return msg + case let .prepends(_, expectation): + return expectation.expectedMessage + case let .appends(expectation, msg): + return "\(expectation.expectedMessage)\(msg)" + case let .details(expectation, _): + return expectation.expectedMessage + } + } + + /// Appends a message after the primary expectation message + public func appended(message: String) -> ExpectationMessage { + switch self { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo, .appends, .prepends: + return .appends(self, message) + case let .details(expectation, msg): + return .details(expectation.appended(message: message), msg) + } + } + + /// Appends a message hinting to use beNil() for when the actual value given was nil. + public func appendedBeNilHint() -> ExpectationMessage { + return appended(message: " (use beNil() to match nils)") + } + + /// Appends a detailed (aka - multiline) message after the primary expectation message + /// Detailed messages will be placed after .appended(message:) calls. + public func appended(details: String) -> ExpectationMessage { + return .details(self, details) + } + + internal func visitLeafs(_ f: (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { + switch self { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: + return f(self) + case let .prepends(msg, expectation): + return .prepends(msg, expectation.visitLeafs(f)) + case let .appends(expectation, msg): + return .appends(expectation.visitLeafs(f), msg) + case let .details(expectation, msg): + return .details(expectation.visitLeafs(f), msg) + } + } + + /// Replaces a primary expectation with one returned by f. Preserves all composite expectations + /// that were built upon it (aka - all appended(message:) and appended(details:). + public func replacedExpectation(_ f: @escaping (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { + func walk(_ msg: ExpectationMessage) -> ExpectationMessage { + switch msg { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: + return f(msg) + default: + return msg + } + } + return visitLeafs(walk) + } + + /// Wraps a primary expectation with text before and after it. + /// Alias to prepended(message: before).appended(message: after) + public func wrappedExpectation(before: String, after: String) -> ExpectationMessage { + return prepended(expectation: before).appended(message: after) + } + + /// Prepends a message by modifying the primary expectation + public func prepended(expectation message: String) -> ExpectationMessage { + func walk(_ msg: ExpectationMessage) -> ExpectationMessage { + switch msg { + case let .expectedTo(msg): + return .expectedTo(message + msg) + case let .expectedActualValueTo(msg): + return .expectedActualValueTo(message + msg) + case let .expectedCustomValueTo(msg, actual): + return .expectedCustomValueTo(message + msg, actual) + default: + return msg.visitLeafs(walk) + } + } + return visitLeafs(walk) + } + + // TODO: test & verify correct behavior + internal func prepended(message: String) -> ExpectationMessage { + return .prepends(message, self) + } + + /// Converts the tree of ExpectationMessages into a final built string. + public func toString(actual: String, expected: String = "expected", to: String = "to") -> String { + switch self { + case let .fail(msg): + return msg + case let .expectedTo(msg): + return "\(expected) \(to) \(msg)" + case let .expectedActualValueTo(msg): + return "\(expected) \(to) \(msg), got \(actual)" + case let .expectedCustomValueTo(msg, actual): + return "\(expected) \(to) \(msg), got \(actual)" + case let .prepends(msg, expectation): + return "\(msg)\(expectation.toString(actual: actual, expected: expected, to: to))" + case let .appends(expectation, msg): + return "\(expectation.toString(actual: actual, expected: expected, to: to))\(msg)" + case let .details(expectation, msg): + return "\(expectation.toString(actual: actual, expected: expected, to: to))\n\n\(msg)" + } + } + + // Backwards compatibility: converts ExpectationMessage tree to FailureMessage + internal func update(failureMessage: FailureMessage) { + switch self { + case let .fail(msg): + failureMessage.stringValue = msg + case let .expectedTo(msg): + failureMessage.actualValue = nil + failureMessage.postfixMessage = msg + case let .expectedActualValueTo(msg): + failureMessage.postfixMessage = msg + case let .expectedCustomValueTo(msg, actual): + failureMessage.postfixMessage = msg + failureMessage.actualValue = actual + case let .prepends(msg, expectation): + expectation.update(failureMessage: failureMessage) + if let desc = failureMessage.userDescription { + failureMessage.userDescription = "\(msg)\(desc)" + } else { + failureMessage.userDescription = msg + } + case let .appends(expectation, msg): + expectation.update(failureMessage: failureMessage) + failureMessage.appendMessage(msg) + case let .details(expectation, msg): + expectation.update(failureMessage: failureMessage) + failureMessage.appendDetails(msg) + } + } +} + +extension FailureMessage { + internal func toExpectationMessage() -> ExpectationMessage { + let defaultMsg = FailureMessage() + if expected != defaultMsg.expected || _stringValueOverride != nil { + return .fail(stringValue) + } + + var msg: ExpectationMessage = .fail(userDescription ?? "") + if actualValue != "" && actualValue != nil { + msg = .expectedCustomValueTo(postfixMessage, actualValue ?? "") + } else if postfixMessage != defaultMsg.postfixMessage { + if actualValue == nil { + msg = .expectedTo(postfixMessage) + } else { + msg = .expectedActualValueTo(postfixMessage) + } + } + if postfixActual != defaultMsg.postfixActual { + msg = .appends(msg, postfixActual) + } + if let m = extendedMessage { + msg = .details(msg, m) + } + return msg + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + +public class NMBExpectationMessage: NSObject { + private let msg: ExpectationMessage + + internal init(swift msg: ExpectationMessage) { + self.msg = msg + } + + public init(expectedTo message: String) { + self.msg = .expectedTo(message) + } + public init(expectedActualValueTo message: String) { + self.msg = .expectedActualValueTo(message) + } + + public init(expectedActualValueTo message: String, customActualValue actual: String) { + self.msg = .expectedCustomValueTo(message, actual) + } + + public init(fail message: String) { + self.msg = .fail(message) + } + + public init(prepend message: String, child: NMBExpectationMessage) { + self.msg = .prepends(message, child.msg) + } + + public init(appendedMessage message: String, child: NMBExpectationMessage) { + self.msg = .appends(child.msg, message) + } + + public init(prependedMessage message: String, child: NMBExpectationMessage) { + self.msg = .prepends(message, child.msg) + } + + public init(details message: String, child: NMBExpectationMessage) { + self.msg = .details(child.msg, message) + } + + public func appendedBeNilHint() -> NMBExpectationMessage { + return NMBExpectationMessage(swift: msg.appendedBeNilHint()) + } + + public func toSwift() -> ExpectationMessage { return self.msg } +} + +extension ExpectationMessage { + func toObjectiveC() -> NMBExpectationMessage { + return NMBExpectationMessage(swift: self) + } +} + +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Expression.swift b/Example/Pods/Nimble/Sources/Nimble/Expression.swift new file mode 100644 index 0000000..5a233fd --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Expression.swift @@ -0,0 +1,99 @@ +import Foundation + +// Memoizes the given closure, only calling the passed +// closure once; even if repeat calls to the returned closure +internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { + var cache: T? + return ({ withoutCaching in + if withoutCaching || cache == nil { + cache = try closure() + } + return cache! + }) +} + +/// Expression represents the closure of the value inside expect(...). +/// Expressions are memoized by default. This makes them safe to call +/// evaluate() multiple times without causing a re-evaluation of the underlying +/// closure. +/// +/// @warning Since the closure can be any code, Objective-C code may choose +/// to raise an exception. Currently, Expression does not memoize +/// exception raising. +/// +/// This provides a common consumable API for matchers to utilize to allow +/// Nimble to change internals to how the captured closure is managed. +public struct Expression { + internal let _expression: (Bool) throws -> T? + internal let _withoutCaching: Bool + public let location: SourceLocation + public let isClosure: Bool + + /// Creates a new expression struct. Normally, expect(...) will manage this + /// creation process. The expression is memoized. + /// + /// @param expression The closure that produces a given value. + /// @param location The source location that this closure originates from. + /// @param isClosure A bool indicating if the captured expression is a + /// closure or internally produced closure. Some matchers + /// may require closures. For example, toEventually() + /// requires an explicit closure. This gives Nimble + /// flexibility if @autoclosure behavior changes between + /// Swift versions. Nimble internals always sets this true. + public init(expression: @escaping () throws -> T?, location: SourceLocation, isClosure: Bool = true) { + self._expression = memoizedClosure(expression) + self.location = location + self._withoutCaching = false + self.isClosure = isClosure + } + + /// Creates a new expression struct. Normally, expect(...) will manage this + /// creation process. + /// + /// @param expression The closure that produces a given value. + /// @param location The source location that this closure originates from. + /// @param withoutCaching Indicates if the struct should memoize the given + /// closure's result. Subsequent evaluate() calls will + /// not call the given closure if this is true. + /// @param isClosure A bool indicating if the captured expression is a + /// closure or internally produced closure. Some matchers + /// may require closures. For example, toEventually() + /// requires an explicit closure. This gives Nimble + /// flexibility if @autoclosure behavior changes between + /// Swift versions. Nimble internals always sets this true. + public init(memoizedExpression: @escaping (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { + self._expression = memoizedExpression + self.location = location + self._withoutCaching = withoutCaching + self.isClosure = isClosure + } + + /// Returns a new Expression from the given expression. Identical to a map() + /// on this type. This should be used only to typecast the Expression's + /// closure value. + /// + /// The returned expression will preserve location and isClosure. + /// + /// @param block The block that can cast the current Expression value to a + /// new type. + public func cast(_ block: @escaping (T?) throws -> U?) -> Expression { + return Expression( + expression: ({ try block(self.evaluate()) }), + location: self.location, + isClosure: self.isClosure + ) + } + + public func evaluate() throws -> T? { + return try self._expression(_withoutCaching) + } + + public func withoutCaching() -> Expression { + return Expression( + memoizedExpression: self._expression, + location: location, + withoutCaching: true, + isClosure: isClosure + ) + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift b/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift new file mode 100644 index 0000000..2bc57eb --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift @@ -0,0 +1,92 @@ +import Foundation + +/// Encapsulates the failure message that matchers can report to the end user. +/// +/// This is shared state between Nimble and matchers that mutate this value. +public class FailureMessage: NSObject { + public var expected: String = "expected" + public var actualValue: String? = "" // empty string -> use default; nil -> exclude + public var to: String = "to" + public var postfixMessage: String = "match" + public var postfixActual: String = "" + /// An optional message that will be appended as a new line and provides additional details + /// about the failure. This message will only be visible in the issue navigator / in logs but + /// not directly in the source editor since only a single line is presented there. + public var extendedMessage: String? + public var userDescription: String? + + public var stringValue: String { + get { + if let value = _stringValueOverride { + return value + } else { + return computeStringValue() + } + } + set { + _stringValueOverride = newValue + } + } + + internal var _stringValueOverride: String? + internal var hasOverriddenStringValue: Bool { + return _stringValueOverride != nil + } + + public override init() { + } + + public init(stringValue: String) { + _stringValueOverride = stringValue + } + + internal func stripNewlines(_ str: String) -> String { + let whitespaces = CharacterSet.whitespacesAndNewlines + return str + .components(separatedBy: "\n") + .map { line in line.trimmingCharacters(in: whitespaces) } + .joined(separator: "") + } + + internal func computeStringValue() -> String { + var value = "\(expected) \(to) \(postfixMessage)" + if let actualValue = actualValue { + value = "\(expected) \(to) \(postfixMessage), got \(actualValue)\(postfixActual)" + } + value = stripNewlines(value) + + if let extendedMessage = extendedMessage { + value += "\n\(stripNewlines(extendedMessage))" + } + + if let userDescription = userDescription { + return "\(userDescription)\n\(value)" + } + + return value + } + + internal func appendMessage(_ msg: String) { + if hasOverriddenStringValue { + stringValue += "\(msg)" + } else if actualValue != nil { + postfixActual += msg + } else { + postfixMessage += msg + } + } + + internal func appendDetails(_ msg: String) { + if hasOverriddenStringValue { + if let desc = userDescription { + stringValue = "\(desc)\n\(stringValue)" + } + stringValue += "\n\(msg)" + } else { + if let desc = userDescription { + userDescription = desc + } + extendedMessage = msg + } + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift new file mode 100644 index 0000000..8affa62 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift @@ -0,0 +1,121 @@ +import Foundation + +public func allPass + (_ passFunc: @escaping (T?) throws -> Bool) -> Predicate + where U: Sequence, T == U.Iterator.Element { + let matcher = Predicate.simpleNilable("pass a condition") { actualExpression in + return PredicateStatus(bool: try passFunc(try actualExpression.evaluate())) + } + return createPredicate(matcher) +} + +public func allPass + (_ passName: String, _ passFunc: @escaping (T?) throws -> Bool) -> Predicate + where U: Sequence, T == U.Iterator.Element { + let matcher = Predicate.simpleNilable(passName) { actualExpression in + return PredicateStatus(bool: try passFunc(try actualExpression.evaluate())) + } + return createPredicate(matcher) +} + +public func allPass(_ elementMatcher: M) -> Predicate + where S: Sequence, M: Matcher, S.Iterator.Element == M.ValueType { + return createPredicate(elementMatcher.predicate) +} + +public func allPass(_ elementPredicate: Predicate) -> Predicate + where S: Sequence { + return createPredicate(elementPredicate) +} + +private func createPredicate(_ elementMatcher: Predicate) -> Predicate + where S: Sequence { + return Predicate { actualExpression in + guard let actualValue = try actualExpression.evaluate() else { + return PredicateResult( + status: .fail, + message: .appends(.expectedTo("all pass"), " (use beNil() to match nils)") + ) + } + + var failure: ExpectationMessage = .expectedTo("all pass") + for currentElement in actualValue { + let exp = Expression( + expression: {currentElement}, location: actualExpression.location) + let predicateResult = try elementMatcher.satisfies(exp) + if predicateResult.status == .matches { + failure = predicateResult.message.prepended(expectation: "all ") + } else { + failure = predicateResult.message + .replacedExpectation({ .expectedTo($0.expectedMessage) }) + .wrappedExpectation( + before: "all ", + after: ", but failed first at element <\(stringify(currentElement))>" + + " in <\(stringify(actualValue))>" + ) + return PredicateResult(status: .doesNotMatch, message: failure) + } + } + failure = failure.replacedExpectation({ expectation in + return .expectedTo(expectation.expectedMessage) + }) + return PredicateResult(status: .matches, message: failure) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func allPassMatcher(_ matcher: NMBMatcher) -> NMBPredicate { + return NMBPredicate { actualExpression in + let location = actualExpression.location + let actualValue = try! actualExpression.evaluate() + var nsObjects = [NSObject]() + + var collectionIsUsable = true + if let value = actualValue as? NSFastEnumeration { + var generator = NSFastEnumerationIterator(value) + while let obj = generator.next() { + if let nsObject = obj as? NSObject { + nsObjects.append(nsObject) + } else { + collectionIsUsable = false + break + } + } + } else { + collectionIsUsable = false + } + + if !collectionIsUsable { + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + // swiftlint:disable:next line_length + fail: "allPass can only be used with types which implement NSFastEnumeration (NSArray, NSSet, ...), and whose elements subclass NSObject, got <\(actualValue?.description ?? "nil")>" + ) + ) + } + + let expr = Expression(expression: ({ nsObjects }), location: location) + let pred: Predicate<[NSObject]> = createPredicate(Predicate { expr in + if let predicate = matcher as? NMBPredicate { + return predicate.satisfies(({ try! expr.evaluate() }), location: expr.location).toSwift() + } else { + let failureMessage = FailureMessage() + let result = matcher.matches( + ({ try! expr.evaluate() }), + failureMessage: failureMessage, + location: expr.location + ) + let expectationMsg = failureMessage.toExpectationMessage() + return PredicateResult( + bool: result, + message: expectationMsg + ) + } + }) + return try! pred.satisfies(expr).toObjectiveC() + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift new file mode 100644 index 0000000..3cba8b0 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift @@ -0,0 +1,236 @@ +import Foundation + +/// If you are running on a slower machine, it could be useful to increase the default timeout value +/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. +public struct AsyncDefaults { + public static var Timeout: TimeInterval = 1 + public static var PollInterval: TimeInterval = 0.01 +} + +private func async(style: ExpectationStyle, predicate: Predicate, timeout: TimeInterval, poll: TimeInterval, fnName: String) -> Predicate { + return Predicate { actualExpression in + let uncachedExpression = actualExpression.withoutCaching() + let fnName = "expect(...).\(fnName)(...)" + var lastPredicateResult: PredicateResult? + let result = pollBlock( + pollInterval: poll, + timeoutInterval: timeout, + file: actualExpression.location.file, + line: actualExpression.location.line, + fnName: fnName) { + lastPredicateResult = try predicate.satisfies(uncachedExpression) + return lastPredicateResult!.toBoolean(expectation: style) + } + switch result { + case .completed: return lastPredicateResult! + case .timedOut: return PredicateResult(status: .fail, message: lastPredicateResult!.message) + case let .errorThrown(error): + return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) + case let .raisedException(exception): + return PredicateResult(status: .fail, message: .fail("unexpected exception raised: \(exception)")) + case .blockedRunLoop: + // swiftlint:disable:next line_length + return PredicateResult(status: .fail, message: lastPredicateResult!.message.appended(message: " (timed out, but main thread was unresponsive).")) + case .incomplete: + internalError("Reached .incomplete state for toEventually(...).") + } + } +} + +// Deprecated +internal struct AsyncMatcherWrapper: Matcher + where U: Matcher, U.ValueType == T { + let fullMatcher: U + let timeoutInterval: TimeInterval + let pollInterval: TimeInterval + + init(fullMatcher: U, timeoutInterval: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval) { + self.fullMatcher = fullMatcher + self.timeoutInterval = timeoutInterval + self.pollInterval = pollInterval + } + + func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + let uncachedExpression = actualExpression.withoutCaching() + let fnName = "expect(...).toEventually(...)" + let result = pollBlock( + pollInterval: pollInterval, + timeoutInterval: timeoutInterval, + file: actualExpression.location.file, + line: actualExpression.location.line, + fnName: fnName) { + try self.fullMatcher.matches(uncachedExpression, failureMessage: failureMessage) + } + switch result { + case let .completed(isSuccessful): return isSuccessful + case .timedOut: return false + case let .errorThrown(error): + failureMessage.stringValue = "an unexpected error thrown: <\(error)>" + return false + case let .raisedException(exception): + failureMessage.stringValue = "an unexpected exception thrown: <\(exception)>" + return false + case .blockedRunLoop: + failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." + return false + case .incomplete: + internalError("Reached .incomplete state for toEventually(...).") + } + } + + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + let uncachedExpression = actualExpression.withoutCaching() + let result = pollBlock( + pollInterval: pollInterval, + timeoutInterval: timeoutInterval, + file: actualExpression.location.file, + line: actualExpression.location.line, + fnName: "expect(...).toEventuallyNot(...)") { + try self.fullMatcher.doesNotMatch(uncachedExpression, failureMessage: failureMessage) + } + switch result { + case let .completed(isSuccessful): return isSuccessful + case .timedOut: return false + case let .errorThrown(error): + failureMessage.stringValue = "an unexpected error thrown: <\(error)>" + return false + case let .raisedException(exception): + failureMessage.stringValue = "an unexpected exception thrown: <\(exception)>" + return false + case .blockedRunLoop: + failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." + return false + case .incomplete: + internalError("Reached .incomplete state for toEventuallyNot(...).") + } + } +} + +private let toEventuallyRequiresClosureError = FailureMessage( + // swiftlint:disable:next line_length + stringValue: "expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) )\nSwift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function" +) + +extension Expectation { + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toEventually(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toMatch, + async(style: .toMatch, predicate: predicate, timeout: timeout, poll: pollInterval, fnName: "toEventually"), + to: "to eventually", + description: description, + captureExceptions: false + ) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toEventuallyNot(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toNotMatch, + async( + style: .toNotMatch, + predicate: predicate, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot" + ), + to: "to eventually not", + description: description, + captureExceptions: false + ) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toEventuallyNot() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toNotEventually(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + return toEventuallyNot(predicate, timeout: timeout, pollInterval: pollInterval, description: description) + } +} + +// Deprecated +extension Expectation { + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) + where U: Matcher, U.ValueType == T { + if expression.isClosure { + let (pass, msg) = expressionMatches( + expression, + matcher: AsyncMatcherWrapper( + fullMatcher: matcher, + timeoutInterval: timeout, + pollInterval: pollInterval), + to: "to eventually", + description: description + ) + verify(pass, msg) + } else { + verify(false, toEventuallyRequiresClosureError) + } + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toEventuallyNot(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) + where U: Matcher, U.ValueType == T { + if expression.isClosure { + let (pass, msg) = expressionDoesNotMatch( + expression, + matcher: AsyncMatcherWrapper( + fullMatcher: matcher, + timeoutInterval: timeout, + pollInterval: pollInterval), + toNot: "to eventually not", + description: description + ) + verify(pass, msg) + } else { + verify(false, toEventuallyRequiresClosureError) + } + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toEventuallyNot() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toNotEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) + where U: Matcher, U.ValueType == T { + return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift new file mode 100644 index 0000000..5674525 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift @@ -0,0 +1,68 @@ +import Foundation + +private func matcherMessage(forType expectedType: T.Type) -> String { + return "be a kind of \(String(describing: expectedType))" +} +private func matcherMessage(forClass expectedClass: AnyClass) -> String { + return "be a kind of \(String(describing: expectedClass))" +} + +/// A Nimble matcher that succeeds when the actual value is an instance of the given class. +public func beAKindOf(_ expectedType: T.Type) -> Predicate { + return Predicate.define { actualExpression in + let message: ExpectationMessage + + let instance = try actualExpression.evaluate() + guard let validInstance = instance else { + message = .expectedCustomValueTo(matcherMessage(forType: expectedType), "") + return PredicateResult(status: .fail, message: message) + } + message = .expectedCustomValueTo( + "be a kind of \(String(describing: expectedType))", + "<\(String(describing: type(of: validInstance))) instance>" + ) + + return PredicateResult( + bool: validInstance is T, + message: message + ) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + +/// A Nimble matcher that succeeds when the actual value is an instance of the given class. +/// @see beAnInstanceOf if you want to match against the exact class +public func beAKindOf(_ expectedClass: AnyClass) -> Predicate { + return Predicate.define { actualExpression in + let message: ExpectationMessage + let status: PredicateStatus + + let instance = try actualExpression.evaluate() + if let validInstance = instance { + status = PredicateStatus(bool: instance != nil && instance!.isKind(of: expectedClass)) + message = .expectedCustomValueTo( + matcherMessage(forClass: expectedClass), + "<\(String(describing: type(of: validInstance))) instance>" + ) + } else { + status = .fail + message = .expectedCustomValueTo( + matcherMessage(forClass: expectedClass), + "" + ) + } + + return PredicateResult(status: status, message: message) + } +} + +extension NMBObjCMatcher { + @objc public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + return try! beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage) + } + } +} + +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift new file mode 100644 index 0000000..70c5661 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift @@ -0,0 +1,56 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is an _exact_ instance of the given class. +public func beAnInstanceOf(_ expectedType: T.Type) -> Predicate { + let errorMessage = "be an instance of \(String(describing: expectedType))" + return Predicate.define { actualExpression in + let instance = try actualExpression.evaluate() + guard let validInstance = instance else { + return PredicateResult( + status: .doesNotMatch, + message: .expectedActualValueTo(errorMessage) + ) + } + + let actualString = "<\(String(describing: type(of: validInstance))) instance>" + + return PredicateResult( + status: PredicateStatus(bool: type(of: validInstance) == expectedType), + message: .expectedCustomValueTo(errorMessage, actualString) + ) + } +} + +/// A Nimble matcher that succeeds when the actual value is an instance of the given class. +/// @see beAKindOf if you want to match against subclasses +public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate { + let errorMessage = "be an instance of \(String(describing: expectedClass))" + return Predicate.define { actualExpression in + let instance = try actualExpression.evaluate() + let actualString: String + if let validInstance = instance { + actualString = "<\(String(describing: type(of: validInstance))) instance>" + } else { + actualString = "" + } + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + let matches = instance != nil && instance!.isMember(of: expectedClass) + #else + let matches = instance != nil && type(of: instance!) == expectedClass + #endif + return PredicateResult( + status: PredicateStatus(bool: matches), + message: .expectedCustomValueTo(errorMessage, actualString) + ) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + return try! beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift new file mode 100644 index 0000000..dfb4e28 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift @@ -0,0 +1,126 @@ +import Foundation + +public let DefaultDelta = 0.0001 + +internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, + expectedValue: NMBDoubleConvertible, + delta: Double) + -> PredicateResult { + let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" + return PredicateResult( + bool: actualValue != nil && + abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta, + message: .expectedCustomValueTo(errorMessage, "<\(stringify(actualValue))>") + ) +} + +/// A Nimble matcher that succeeds when a value is close to another. This is used for floating +/// point values which can have imprecise results when doing arithmetic on them. +/// +/// @see equal +public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDelta) -> Predicate { + return Predicate.define { actualExpression in + return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) + } +} + +/// A Nimble matcher that succeeds when a value is close to another. This is used for floating +/// point values which can have imprecise results when doing arithmetic on them. +/// +/// @see equal +public func beCloseTo(_ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> Predicate { + return Predicate.define { actualExpression in + return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +public class NMBObjCBeCloseToMatcher: NSObject, NMBMatcher { + var _expected: NSNumber + var _delta: CDouble + init(expected: NSNumber, within: CDouble) { + _expected = expected + _delta = within + } + + @objc public func matches(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let actualBlock: () -> NMBDoubleConvertible? = ({ + return actualExpression() as? NMBDoubleConvertible + }) + let expr = Expression(expression: actualBlock, location: location) + let matcher = beCloseTo(self._expected, within: self._delta) + return try! matcher.matches(expr, failureMessage: failureMessage) + } + + @objc public func doesNotMatch(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let actualBlock: () -> NMBDoubleConvertible? = ({ + return actualExpression() as? NMBDoubleConvertible + }) + let expr = Expression(expression: actualBlock, location: location) + let matcher = beCloseTo(self._expected, within: self._delta) + return try! matcher.doesNotMatch(expr, failureMessage: failureMessage) + } + + @objc public var within: (CDouble) -> NMBObjCBeCloseToMatcher { + return ({ delta in + return NMBObjCBeCloseToMatcher(expected: self._expected, within: delta) + }) + } +} + +extension NMBObjCMatcher { + @objc public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { + return NMBObjCBeCloseToMatcher(expected: expected, within: within) + } +} +#endif + +public func beCloseTo(_ expectedValues: [Double], within delta: Double = DefaultDelta) -> Predicate<[Double]> { + let errorMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" + return Predicate.simple(errorMessage) { actualExpression in + if let actual = try actualExpression.evaluate() { + if actual.count != expectedValues.count { + return .doesNotMatch + } else { + for (index, actualItem) in actual.enumerated() { + if fabs(actualItem - expectedValues[index]) > delta { + return .doesNotMatch + } + } + return .matches + } + } + return .doesNotMatch + } +} + +// MARK: - Operators + +infix operator ≈ : ComparisonPrecedence + +public func ≈(lhs: Expectation<[Double]>, rhs: [Double]) { + lhs.to(beCloseTo(rhs)) +} + +public func ≈(lhs: Expectation, rhs: NMBDoubleConvertible) { + lhs.to(beCloseTo(rhs)) +} + +public func ≈(lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} + +public func == (lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} + +// make this higher precedence than exponents so the Doubles either end aren't pulled in +// unexpectantly +precedencegroup PlusMinusOperatorPrecedence { + higherThan: BitwiseShiftPrecedence +} + +infix operator Âą : PlusMinusOperatorPrecedence +public func Âą(lhs: NMBDoubleConvertible, rhs: Double) -> (expected: NMBDoubleConvertible, delta: Double) { + return (expected: lhs, delta: rhs) +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift new file mode 100644 index 0000000..3cbc15d --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift @@ -0,0 +1,95 @@ +import Foundation + +/// A Nimble matcher that succeeds when a value is "empty". For collections, this +/// means the are no items in that collection. For strings, it is an empty string. +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + let actualSeq = try actualExpression.evaluate() + if actualSeq == nil { + return .fail + } + var generator = actualSeq!.makeIterator() + return PredicateStatus(bool: generator.next() == nil) + } +} + +/// A Nimble matcher that succeeds when a value is "empty". For collections, this +/// means the are no items in that collection. For strings, it is an empty string. +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + let actualString = try actualExpression.evaluate() + return PredicateStatus(bool: actualString == nil || NSString(string: actualString!).length == 0) + } +} + +/// A Nimble matcher that succeeds when a value is "empty". For collections, this +/// means the are no items in that collection. For NSString instances, it is an empty string. +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + let actualString = try actualExpression.evaluate() + return PredicateStatus(bool: actualString == nil || actualString!.length == 0) + } +} + +// Without specific overrides, beEmpty() is ambiguous for NSDictionary, NSArray, +// etc, since they conform to Sequence as well as NMBCollection. + +/// A Nimble matcher that succeeds when a value is "empty". For collections, this +/// means the are no items in that collection. For strings, it is an empty string. +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + let actualDictionary = try actualExpression.evaluate() + return PredicateStatus(bool: actualDictionary == nil || actualDictionary!.count == 0) + } +} + +/// A Nimble matcher that succeeds when a value is "empty". For collections, this +/// means the are no items in that collection. For strings, it is an empty string. +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + let actualArray = try actualExpression.evaluate() + return PredicateStatus(bool: actualArray == nil || actualArray!.count == 0) + } +} + +/// A Nimble matcher that succeeds when a value is "empty". For collections, this +/// means the are no items in that collection. For strings, it is an empty string. +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + let actual = try actualExpression.evaluate() + return PredicateStatus(bool: actual == nil || actual!.count == 0) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beEmptyMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in + let location = actualExpression.location + let actualValue = try! actualExpression.evaluate() + + if let value = actualValue as? NMBCollection { + let expr = Expression(expression: ({ value as NMBCollection }), location: location) + return try! beEmpty().satisfies(expr).toObjectiveC() + } else if let value = actualValue as? NSString { + let expr = Expression(expression: ({ value as String }), location: location) + return try! beEmpty().satisfies(expr).toObjectiveC() + } else if let actualValue = actualValue { + // swiftlint:disable:next line_length + let badTypeErrorMsg = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + expectedActualValueTo: badTypeErrorMsg, + customActualValue: "\(String(describing: type(of: actualValue))) type" + ) + ) + } + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage(expectedActualValueTo: "be empty").appendedBeNilHint() + ) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift new file mode 100644 index 0000000..8717f97 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift @@ -0,0 +1,42 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is greater than the expected value. +public func beGreaterThan(_ expectedValue: T?) -> Predicate { + let errorMessage = "be greater than <\(stringify(expectedValue))>" + return Predicate.simple(errorMessage) { actualExpression in + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return PredicateStatus(bool: actual > expected) + } + return .fail + } +} + +/// A Nimble matcher that succeeds when the actual value is greater than the expected value. +public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" + let actualValue = try actualExpression.evaluate() + let matches = actualValue != nil + && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending + return matches + }.requireNonNil +} + +public func >(lhs: Expectation, rhs: T) { + lhs.to(beGreaterThan(rhs)) +} + +public func > (lhs: Expectation, rhs: NMBComparable?) { + lhs.to(beGreaterThan(rhs)) +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let expr = actualExpression.cast { $0 as? NMBComparable } + return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift new file mode 100644 index 0000000..55d8e7b --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift @@ -0,0 +1,44 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is greater than +/// or equal to the expected value. +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" + let actualValue = try actualExpression.evaluate() + if let actual = actualValue, let expected = expectedValue { + return actual >= expected + } + return false + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual value is greater than +/// or equal to the expected value. +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" + let actualValue = try actualExpression.evaluate() + let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending + return matches + }.requireNonNil +} + +public func >=(lhs: Expectation, rhs: T) { + lhs.to(beGreaterThanOrEqualTo(rhs)) +} + +public func >=(lhs: Expectation, rhs: T) { + lhs.to(beGreaterThanOrEqualTo(rhs)) +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let expr = actualExpression.cast { $0 as? NMBComparable } + return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift new file mode 100644 index 0000000..ad19def --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift @@ -0,0 +1,46 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is the same instance +/// as the expected instance. +public func beIdenticalTo(_ expected: Any?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + #if os(Linux) + let actual = try actualExpression.evaluate() as? AnyObject + #else + let actual = try actualExpression.evaluate() as AnyObject? + #endif + failureMessage.actualValue = "\(identityAsString(actual))" + failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" + #if os(Linux) + return actual === (expected as? AnyObject) && actual !== nil + #else + return actual === (expected as AnyObject?) && actual !== nil + #endif + }.requireNonNil +} + +public func === (lhs: Expectation, rhs: Any?) { + lhs.to(beIdenticalTo(rhs)) +} +public func !== (lhs: Expectation, rhs: Any?) { + lhs.toNot(beIdenticalTo(rhs)) +} + +/// A Nimble matcher that succeeds when the actual value is the same instance +/// as the expected instance. +/// +/// Alias for "beIdenticalTo". +public func be(_ expected: Any?) -> Predicate { + return beIdenticalTo(expected) +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let aExpr = actualExpression.cast { $0 as Any? } + return try! beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift new file mode 100644 index 0000000..8047efd --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift @@ -0,0 +1,41 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is less than the expected value. +public func beLessThan(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return actual < expected + } + return false + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual value is less than the expected value. +public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" + let actualValue = try actualExpression.evaluate() + let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending + return matches + }.requireNonNil +} + +public func <(lhs: Expectation, rhs: T) { + lhs.to(beLessThan(rhs)) +} + +public func < (lhs: Expectation, rhs: NMBComparable?) { + lhs.to(beLessThan(rhs)) +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let expr = actualExpression.cast { $0 as? NMBComparable } + return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift new file mode 100644 index 0000000..f9e9f4e --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift @@ -0,0 +1,42 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is less than +/// or equal to the expected value. +public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return actual <= expected + } + return false + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual value is less than +/// or equal to the expected value. +public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" + let actualValue = try actualExpression.evaluate() + return actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedDescending + }.requireNonNil +} + +public func <=(lhs: Expectation, rhs: T) { + lhs.to(beLessThanOrEqualTo(rhs)) +} + +public func <=(lhs: Expectation, rhs: T) { + lhs.to(beLessThanOrEqualTo(rhs)) +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let expr = actualExpression.cast { $0 as? NMBComparable } + return try! beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift new file mode 100644 index 0000000..2b18b4c --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift @@ -0,0 +1,167 @@ +import Foundation + +extension Int8: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int8Value + } +} + +extension UInt8: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint8Value + } +} + +extension Int16: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int16Value + } +} + +extension UInt16: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint16Value + } +} + +extension Int32: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int32Value + } +} + +extension UInt32: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint32Value + } +} + +extension Int64: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int64Value + } +} + +extension UInt64: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint64Value + } +} + +extension Float: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).floatValue + } +} + +extension Double: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).doubleValue + } +} + +extension Int: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).intValue + } +} + +extension UInt: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uintValue + } +} + +internal func rename(_ matcher: Predicate, failureMessage message: ExpectationMessage) -> Predicate { + return Predicate { actualExpression in + let result = try matcher.satisfies(actualExpression) + return PredicateResult(status: result.status, message: message) + }.requireNonNil +} + +// MARK: beTrue() / beFalse() + +/// A Nimble matcher that succeeds when the actual value is exactly true. +/// This matcher will not match against nils. +public func beTrue() -> Predicate { + return rename(equal(true), failureMessage: .expectedActualValueTo("be true")) +} + +/// A Nimble matcher that succeeds when the actual value is exactly false. +/// This matcher will not match against nils. +public func beFalse() -> Predicate { + return rename(equal(false), failureMessage: .expectedActualValueTo("be false")) +} + +// MARK: beTruthy() / beFalsy() + +/// A Nimble matcher that succeeds when the actual value is not logically false. +public func beTruthy() -> Predicate { + return Predicate.simpleNilable("be truthy") { actualExpression in + let actualValue = try actualExpression.evaluate() + if let actualValue = actualValue { + // FIXME: This is a workaround to SR-2290. + // See: + // - https://bugs.swift.org/browse/SR-2290 + // - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873 + if let number = actualValue as? NSNumber { + return PredicateStatus(bool: number.boolValue == true) + } + + return PredicateStatus(bool: actualValue == (true as T)) + } + return PredicateStatus(bool: actualValue != nil) + } +} + +/// A Nimble matcher that succeeds when the actual value is logically false. +/// This matcher will match against nils. +public func beFalsy() -> Predicate { + return Predicate.simpleNilable("be falsy") { actualExpression in + let actualValue = try actualExpression.evaluate() + if let actualValue = actualValue { + // FIXME: This is a workaround to SR-2290. + // See: + // - https://bugs.swift.org/browse/SR-2290 + // - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873 + if let number = actualValue as? NSNumber { + return PredicateStatus(bool: number.boolValue == false) + } + + return PredicateStatus(bool: actualValue == (false as T)) + } + return PredicateStatus(bool: actualValue == nil) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beTruthyMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualExpression, failureMessage in + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } + return try! beTruthy().matches(expr, failureMessage: failureMessage) + } + } + + @objc public class func beFalsyMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualExpression, failureMessage in + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } + return try! beFalsy().matches(expr, failureMessage: failureMessage) + } + } + + @objc public class func beTrueMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualExpression, failureMessage in + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } + return try! beTrue().matches(expr, failureMessage: failureMessage) + } + } + + @objc public class func beFalseMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } + return try! beFalse().matches(expr, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift new file mode 100644 index 0000000..a22e0f4 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift @@ -0,0 +1,19 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is nil. +public func beNil() -> Predicate { + return Predicate.simpleNilable("be nil") { actualExpression in + let actualValue = try actualExpression.evaluate() + return PredicateStatus(bool: actualValue == nil) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beNilMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualExpression, failureMessage in + return try! beNil().matches(actualExpression, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift new file mode 100644 index 0000000..f5bf22a --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift @@ -0,0 +1,18 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is Void. +public func beVoid() -> Predicate<()> { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "be void" + let actualValue: ()? = try actualExpression.evaluate() + return actualValue != nil + } +} + +public func == (lhs: Expectation<()>, rhs: ()) { + lhs.to(beVoid()) +} + +public func != (lhs: Expectation<()>, rhs: ()) { + lhs.toNot(beVoid()) +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift new file mode 100644 index 0000000..c2ab568 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift @@ -0,0 +1,60 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual sequence's first element +/// is equal to the expected value. +public func beginWith(_ startingElement: T) -> Predicate + where S.Iterator.Element == T { + return Predicate.simple("begin with <\(startingElement)>") { actualExpression in + if let actualValue = try actualExpression.evaluate() { + var actualGenerator = actualValue.makeIterator() + return PredicateStatus(bool: actualGenerator.next() == startingElement) + } + return .fail + } +} + +/// A Nimble matcher that succeeds when the actual collection's first element +/// is equal to the expected object. +public func beginWith(_ startingElement: Any) -> Predicate { + return Predicate.simple("begin with <\(startingElement)>") { actualExpression in + guard let collection = try actualExpression.evaluate() else { return .fail } + guard collection.count > 0 else { return .doesNotMatch } + #if os(Linux) + guard let collectionValue = collection.object(at: 0) as? NSObject else { + return .fail + } + #else + let collectionValue = collection.object(at: 0) as AnyObject + #endif + return PredicateStatus(bool: collectionValue.isEqual(startingElement)) + } +} + +/// A Nimble matcher that succeeds when the actual string contains expected substring +/// where the expected substring's location is zero. +public func beginWith(_ startingSubstring: String) -> Predicate { + return Predicate.simple("begin with <\(startingSubstring)>") { actualExpression in + if let actual = try actualExpression.evaluate() { + let range = actual.range(of: startingSubstring) + return PredicateStatus(bool: range != nil && range!.lowerBound == actual.startIndex) + } + return .fail + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func beginWithMatcher(_ expected: Any) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let actual = try! actualExpression.evaluate() + if (actual as? String) != nil { + let expr = actualExpression.cast { $0 as? String } + return try! beginWith(expected as! String).matches(expr, failureMessage: failureMessage) + } else { + let expr = actualExpression.cast { $0 as? NMBOrderedCollection } + return try! beginWith(expected).matches(expr, failureMessage: failureMessage) + } + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift new file mode 100644 index 0000000..f1afb72 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift @@ -0,0 +1,95 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual sequence contains the expected value. +public func contain(_ items: T...) -> Predicate + where S.Iterator.Element == T { + return contain(items) +} + +public func contain(_ items: [T]) -> Predicate + where S.Iterator.Element == T { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" + if let actual = try actualExpression.evaluate() { + return items.all { + return actual.contains($0) + } + } + return false + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual string contains the expected substring. +public func contain(_ substrings: String...) -> Predicate { + return contain(substrings) +} + +public func contain(_ substrings: [String]) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" + if let actual = try actualExpression.evaluate() { + return substrings.all { + let range = actual.range(of: $0) + return range != nil && !range!.isEmpty + } + } + return false + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual string contains the expected substring. +public func contain(_ substrings: NSString...) -> Predicate { + return contain(substrings) +} + +public func contain(_ substrings: [NSString]) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" + if let actual = try actualExpression.evaluate() { + return substrings.all { actual.range(of: $0.description).length != 0 } + } + return false + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual collection contains the expected object. +public func contain(_ items: Any?...) -> Predicate { + return contain(items) +} + +public func contain(_ items: [Any?]) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" + guard let actual = try actualExpression.evaluate() else { return false } + return items.all { item in + return item != nil && actual.contains(item!) + } + }.requireNonNil +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func containMatcher(_ expected: [NSObject]) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let location = actualExpression.location + let actualValue = try! actualExpression.evaluate() + if let value = actualValue as? NMBContainer { + let expr = Expression(expression: ({ value as NMBContainer }), location: location) + + // A straightforward cast on the array causes this to crash, so we have to cast the individual items + let expectedOptionals: [Any?] = expected.map({ $0 as Any? }) + return try! contain(expectedOptionals).matches(expr, failureMessage: failureMessage) + } else if let value = actualValue as? NSString { + let expr = Expression(expression: ({ value as String }), location: location) + return try! contain(expected as! [String]).matches(expr, failureMessage: failureMessage) + } else if actualValue != nil { + // swiftlint:disable:next line_length + failureMessage.postfixMessage = "contain <\(arrayAsString(expected))> (only works for NSArrays, NSSets, NSHashTables, and NSStrings)" + } else { + failureMessage.postfixMessage = "contain <\(arrayAsString(expected))>" + } + return false + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift new file mode 100644 index 0000000..ae0d854 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift @@ -0,0 +1,60 @@ +import Foundation + +public func containElementSatisfying(_ predicate: @escaping ((T) -> Bool), _ predicateDescription: String = "") -> Predicate where S.Iterator.Element == T { + + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.actualValue = nil + + if predicateDescription == "" { + failureMessage.postfixMessage = "find object in collection that satisfies predicate" + } else { + failureMessage.postfixMessage = "find object in collection \(predicateDescription)" + } + + if let sequence = try actualExpression.evaluate() { + for object in sequence { + if predicate(object) { + return true + } + } + + return false + } + + return false + }.requireNonNil +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + extension NMBObjCMatcher { + @objc public class func containElementSatisfyingMatcher(_ predicate: @escaping ((NSObject) -> Bool)) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let value = try! actualExpression.evaluate() + guard let enumeration = value as? NSFastEnumeration else { + // swiftlint:disable:next line_length + failureMessage.postfixMessage = "containElementSatisfying must be provided an NSFastEnumeration object" + failureMessage.actualValue = nil + failureMessage.expected = "" + failureMessage.to = "" + return false + } + + var iterator = NSFastEnumerationIterator(enumeration) + while let item = iterator.next() { + guard let object = item as? NSObject else { + continue + } + + if predicate(object) { + return true + } + } + + failureMessage.actualValue = nil + failureMessage.postfixMessage = "" + failureMessage.to = "to find object in collection that satisfies predicate" + return false + } + } + } +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift new file mode 100644 index 0000000..a6f9f91 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift @@ -0,0 +1,72 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual sequence's last element +/// is equal to the expected value. +public func endWith(_ endingElement: T) -> Predicate + where S.Iterator.Element == T { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "end with <\(endingElement)>" + + if let actualValue = try actualExpression.evaluate() { + var actualGenerator = actualValue.makeIterator() + var lastItem: T? + var item: T? + repeat { + lastItem = item + item = actualGenerator.next() + } while(item != nil) + + return lastItem == endingElement + } + return false + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual collection's last element +/// is equal to the expected object. +public func endWith(_ endingElement: Any) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "end with <\(endingElement)>" + guard let collection = try actualExpression.evaluate() else { return false } + guard collection.count > 0 else { return false } + #if os(Linux) + guard let collectionValue = collection.object(at: collection.count - 1) as? NSObject else { + return false + } + #else + let collectionValue = collection.object(at: collection.count - 1) as AnyObject + #endif + + return collectionValue.isEqual(endingElement) + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual string contains the expected substring +/// where the expected substring's location is the actual string's length minus the +/// expected substring's length. +public func endWith(_ endingSubstring: String) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "end with <\(endingSubstring)>" + if let collection = try actualExpression.evaluate() { + return collection.hasSuffix(endingSubstring) + } + return false + }.requireNonNil +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func endWithMatcher(_ expected: Any) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let actual = try! actualExpression.evaluate() + if (actual as? String) != nil { + let expr = actualExpression.cast { $0 as? String } + return try! endWith(expected as! String).matches(expr, failureMessage: failureMessage) + } else { + let expr = actualExpression.cast { $0 as? NMBOrderedCollection } + return try! endWith(expected).matches(expr, failureMessage: failureMessage) + } + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift new file mode 100644 index 0000000..9467154 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift @@ -0,0 +1,220 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value is equal to the expected value. +/// Values can support equal by supporting the Equatable protocol. +/// +/// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). +public func equal(_ expectedValue: T?) -> Predicate { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + let actualValue = try actualExpression.evaluate() + let matches = actualValue == expectedValue && expectedValue != nil + if expectedValue == nil || actualValue == nil { + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } + return PredicateResult(status: .fail, message: msg) + } + return PredicateResult(status: PredicateStatus(bool: matches), message: msg) + } +} + +/// A Nimble matcher that succeeds when the actual value is equal to the expected value. +/// Values can support equal by supporting the Equatable protocol. +/// +/// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). +public func equal(_ expectedValue: [T: C]?) -> Predicate<[T: C]> { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + let actualValue = try actualExpression.evaluate() + if expectedValue == nil || actualValue == nil { + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } + return PredicateResult(status: .fail, message: msg) + } + return PredicateResult( + status: PredicateStatus(bool: expectedValue! == actualValue!), + message: msg + ) + } +} + +/// A Nimble matcher that succeeds when the actual collection is equal to the expected collection. +/// Items must implement the Equatable protocol. +public func equal(_ expectedValue: [T]?) -> Predicate<[T]> { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + let actualValue = try actualExpression.evaluate() + if expectedValue == nil || actualValue == nil { + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } + return PredicateResult( + status: .fail, + message: msg + ) + } + return PredicateResult( + bool: expectedValue! == actualValue!, + message: msg + ) + } +} + +/// A Nimble matcher allowing comparison of collection with optional type +public func equal(_ expectedValue: [T?]) -> Predicate<[T?]> { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + if let actualValue = try actualExpression.evaluate() { + let doesNotMatch = PredicateResult( + status: .doesNotMatch, + message: msg + ) + + if expectedValue.count != actualValue.count { + return doesNotMatch + } + + for (index, item) in actualValue.enumerated() { + let otherItem = expectedValue[index] + if item == nil && otherItem == nil { + continue + } else if item == nil && otherItem != nil { + return doesNotMatch + } else if item != nil && otherItem == nil { + return doesNotMatch + } else if item! != otherItem! { + return doesNotMatch + } + } + + return PredicateResult( + status: .matches, + message: msg + ) + } else { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } + } +} + +/// A Nimble matcher that succeeds when the actual set is equal to the expected set. +public func equal(_ expectedValue: Set?) -> Predicate> { + return equal(expectedValue, stringify: { stringify($0) }) +} + +/// A Nimble matcher that succeeds when the actual set is equal to the expected set. +public func equal(_ expectedValue: Set?) -> Predicate> { + return equal(expectedValue, stringify: { + if let set = $0 { + return stringify(Array(set).sorted { $0 < $1 }) + } else { + return "nil" + } + }) +} + +private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> Predicate> { + return Predicate { actualExpression in + var errorMessage: ExpectationMessage = + .expectedActualValueTo("equal <\(stringify(expectedValue))>") + + if let expectedValue = expectedValue { + if let actualValue = try actualExpression.evaluate() { + errorMessage = .expectedCustomValueTo( + "equal <\(stringify(expectedValue))>", + "<\(stringify(actualValue))>" + ) + + if expectedValue == actualValue { + return PredicateResult( + status: .matches, + message: errorMessage + ) + } + + let missing = expectedValue.subtracting(actualValue) + if missing.count > 0 { + errorMessage = errorMessage.appended(message: ", missing <\(stringify(missing))>") + } + + let extra = actualValue.subtracting(expectedValue) + if extra.count > 0 { + errorMessage = errorMessage.appended(message: ", extra <\(stringify(extra))>") + } + return PredicateResult( + status: .doesNotMatch, + message: errorMessage + ) + } + return PredicateResult( + status: .fail, + message: errorMessage.appendedBeNilHint() + ) + } else { + return PredicateResult( + status: .fail, + message: errorMessage.appendedBeNilHint() + ) + } + } +} + +public func ==(lhs: Expectation, rhs: T?) { + lhs.to(equal(rhs)) +} + +public func !=(lhs: Expectation, rhs: T?) { + lhs.toNot(equal(rhs)) +} + +public func ==(lhs: Expectation<[T]>, rhs: [T]?) { + lhs.to(equal(rhs)) +} + +public func !=(lhs: Expectation<[T]>, rhs: [T]?) { + lhs.toNot(equal(rhs)) +} + +public func == (lhs: Expectation>, rhs: Set?) { + lhs.to(equal(rhs)) +} + +public func != (lhs: Expectation>, rhs: Set?) { + lhs.toNot(equal(rhs)) +} + +public func ==(lhs: Expectation>, rhs: Set?) { + lhs.to(equal(rhs)) +} + +public func !=(lhs: Expectation>, rhs: Set?) { + lhs.toNot(equal(rhs)) +} + +public func ==(lhs: Expectation<[T: C]>, rhs: [T: C]?) { + lhs.to(equal(rhs)) +} + +public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { + lhs.toNot(equal(rhs)) +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func equalMatcher(_ expected: NSObject) -> NMBMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + return try! equal(expected).matches(actualExpression, failureMessage: failureMessage) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift new file mode 100644 index 0000000..93335a8 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift @@ -0,0 +1,59 @@ +import Foundation + +// The `haveCount` matchers do not print the full string representation of the collection value, +// instead they only print the type name and the expected count. This makes it easier to understand +// the reason for failed expectations. See: https://github.com/Quick/Nimble/issues/308. +// The representation of the collection content is provided in a new line as an `extendedMessage`. + +/// A Nimble matcher that succeeds when the actual Collection's count equals +/// the expected value +public func haveCount(_ expectedValue: T.IndexDistance) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + if let actualValue = try actualExpression.evaluate() { + // swiftlint:disable:next line_length + failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" + let result = expectedValue == actualValue.count + failureMessage.actualValue = "\(actualValue.count)" + failureMessage.extendedMessage = "Actual Value: \(stringify(actualValue))" + return result + } else { + return false + } + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual collection's count equals +/// the expected value +public func haveCount(_ expectedValue: Int) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + if let actualValue = try actualExpression.evaluate() { + // swiftlint:disable:next line_length + failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" + let result = expectedValue == actualValue.count + failureMessage.actualValue = "\(actualValue.count)" + failureMessage.extendedMessage = "Actual Value: \(stringify(actualValue))" + return result + } else { + return false + } + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func haveCountMatcher(_ expected: NSNumber) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let location = actualExpression.location + let actualValue = try! actualExpression.evaluate() + if let value = actualValue as? NMBCollection { + let expr = Expression(expression: ({ value as NMBCollection}), location: location) + return try! haveCount(expected.intValue).matches(expr, failureMessage: failureMessage) + } else if let actualValue = actualValue { + failureMessage.postfixMessage = "get type of NSArray, NSSet, NSDictionary, or NSHashTable" + failureMessage.actualValue = "\(String(describing: type(of: actualValue)))" + } + return false + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift new file mode 100644 index 0000000..1e5762f --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift @@ -0,0 +1,30 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual string satisfies the regular expression +/// described by the expected string. +public func match(_ expectedValue: String?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" + + if let actual = try actualExpression.evaluate() { + if let regexp = expectedValue { + return actual.range(of: regexp, options: .regularExpression) != nil + } + } + + return false + }.requireNonNil +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + +extension NMBObjCMatcher { + @objc public class func matchMatcher(_ expected: NSString) -> NMBMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let actual = actualExpression.cast { $0 as? String } + return try! match(expected.description).matches(actual, failureMessage: failureMessage) + } + } +} + +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift new file mode 100644 index 0000000..9c86fb7 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift @@ -0,0 +1,58 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual expression evaluates to an +/// error from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparison by _domain and _code. +public func matchError(_ error: T) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + let actualError: Error? = try actualExpression.evaluate() + + setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) + var matches = false + if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { + matches = true + } + return matches + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual expression evaluates to an +/// error from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +public func matchError(_ error: T) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + let actualError: Error? = try actualExpression.evaluate() + + setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) + + var matches = false + if let actualError = actualError as? T, error == actualError { + matches = true + } + return matches + }.requireNonNil +} + +/// A Nimble matcher that succeeds when the actual expression evaluates to an +/// error of the specified type +public func matchError(_ errorType: T.Type) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + let actualError: Error? = try actualExpression.evaluate() + + setFailureMessageForError( + failureMessage, + postfixMessageVerb: "match", + actualError: actualError, + errorType: errorType + ) + var matches = false + if actualError as? T != nil { + matches = true + } + return matches + }.requireNonNil +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift new file mode 100644 index 0000000..abcafa9 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift @@ -0,0 +1,85 @@ +/// DEPRECATED: A convenience API to build matchers that don't need special negation +/// behavior. The toNot() behavior is the negation of to(). +/// +/// @see NonNilMatcherFunc if you prefer to have this matcher fail when nil +/// values are received in an expectation. +/// +/// You may use this when implementing your own custom matchers. +/// +/// Use the Matcher protocol instead of this type to accept custom matchers as +/// input parameters. +/// @see allPass for an example that uses accepts other matchers as input. +@available(*, deprecated, message: "Use to Predicate instead") +public struct MatcherFunc: Matcher { + public let matcher: (Expression, FailureMessage) throws -> Bool + + public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { + self.matcher = matcher + } + + public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + return try matcher(actualExpression, failureMessage) + } + + public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + return try !matcher(actualExpression, failureMessage) + } + + /// Compatibility layer to new Matcher API. Converts an old-style matcher to a new one. + /// Note: You should definitely spend the time to convert to the new api as soon as possible + /// since this struct type is deprecated. + public var predicate: Predicate { + return Predicate.fromDeprecatedMatcher(self) + } +} + +/// DEPRECATED: A convenience API to build matchers that don't need special negation +/// behavior. The toNot() behavior is the negation of to(). +/// +/// Unlike MatcherFunc, this will always fail if an expectation contains nil. +/// This applies regardless of using to() or toNot(). +/// +/// You may use this when implementing your own custom matchers. +/// +/// Use the Matcher protocol instead of this type to accept custom matchers as +/// input parameters. +/// @see allPass for an example that uses accepts other matchers as input. +@available(*, deprecated, message: "Use to Predicate instead") +public struct NonNilMatcherFunc: Matcher { + public let matcher: (Expression, FailureMessage) throws -> Bool + + public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { + self.matcher = matcher + } + + public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + let pass = try matcher(actualExpression, failureMessage) + if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { + return false + } + return pass + } + + public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + let pass = try !matcher(actualExpression, failureMessage) + if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { + return false + } + return pass + } + + internal func attachNilErrorIfNeeded(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + if try actualExpression.evaluate() == nil { + failureMessage.postfixActual = " (use beNil() to match nils)" + return true + } + return false + } + + /// Compatibility layer to new Matcher API. Converts an old-style matcher to a new one. + /// Note: You should definitely spend the time to convert to the new api as soon as possible + /// since this struct type is deprecated. + public var predicate: Predicate { + return Predicate.fromDeprecatedMatcher(self) + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift new file mode 100644 index 0000000..82f3cf0 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift @@ -0,0 +1,154 @@ +import Foundation +// `CGFloat` is in Foundation (swift-corelibs-foundation) on Linux. +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + import CoreGraphics +#endif + +/// Implement this protocol to implement a custom matcher for Swift +@available(*, deprecated, message: "Use Predicate instead") +public protocol Matcher { + associatedtype ValueType + func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool +} + +extension Matcher { + var predicate: Predicate { + return Predicate.fromDeprecatedMatcher(self) + } + + var toClosure: (Expression, FailureMessage, Bool) throws -> Bool { + return ({ expr, msg, expectedResult in + if expectedResult { + return try self.matches(expr, failureMessage: msg) + } else { + return try self.doesNotMatch(expr, failureMessage: msg) + } + }) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +/// Objective-C interface to the Swift variant of Matcher. +@objc public protocol NMBMatcher { + func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool + func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool +} +#endif + +/// Protocol for types that support contain() matcher. +public protocol NMBContainer { + func contains(_ anObject: Any) -> Bool +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +// FIXME: NSHashTable can not conform to NMBContainer since swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a +//extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet +#endif + +extension NSArray: NMBContainer {} +extension NSSet: NMBContainer {} + +/// Protocol for types that support only beEmpty(), haveCount() matchers +public protocol NMBCollection { + var count: Int { get } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NSHashTable: NMBCollection {} // Corelibs Foundation does not include these classes yet +extension NSMapTable: NMBCollection {} +#endif + +extension NSSet: NMBCollection {} +extension NSIndexSet: NMBCollection {} +extension NSDictionary: NMBCollection {} + +/// Protocol for types that support beginWith(), endWith(), beEmpty() matchers +public protocol NMBOrderedCollection: NMBCollection { + func object(at index: Int) -> Any +} + +extension NSArray: NMBOrderedCollection {} + +public protocol NMBDoubleConvertible { + var doubleValue: CDouble { get } +} + +extension Double: NMBDoubleConvertible { + public var doubleValue: CDouble { + return self + } +} + +extension Float: NMBDoubleConvertible { + public var doubleValue: CDouble { + return CDouble(self) + } +} + +extension CGFloat: NMBDoubleConvertible { + public var doubleValue: CDouble { + return CDouble(self) + } +} + +extension NSNumber: NMBDoubleConvertible { +} + +private let dateFormatter: DateFormatter = { + let formatter = DateFormatter() + formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSS" + formatter.locale = Locale(identifier: "en_US_POSIX") + + return formatter +}() + +extension Date: NMBDoubleConvertible { + public var doubleValue: CDouble { + return self.timeIntervalSinceReferenceDate + } +} + +extension NSDate: NMBDoubleConvertible { + public var doubleValue: CDouble { + return self.timeIntervalSinceReferenceDate + } +} + +extension Date: TestOutputStringConvertible { + public var testDescription: String { + return dateFormatter.string(from: self) + } +} + +extension NSDate: TestOutputStringConvertible { + public var testDescription: String { + return dateFormatter.string(from: Date(timeIntervalSinceReferenceDate: self.timeIntervalSinceReferenceDate)) + } +} + +/// Protocol for types to support beLessThan(), beLessThanOrEqualTo(), +/// beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers. +/// +/// Types that conform to Swift's Comparable protocol will work implicitly too +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +@objc public protocol NMBComparable { + func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult +} +#else +// This should become obsolete once Corelibs Foundation adds Comparable conformance to NSNumber +public protocol NMBComparable { + func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult +} +#endif + +extension NSNumber: NMBComparable { + public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { + return compare(otherObject as! NSNumber) + } +} +extension NSString: NMBComparable { + public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { + return compare(otherObject as! String) + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift new file mode 100644 index 0000000..ee886f1 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift @@ -0,0 +1,96 @@ +import Foundation + +// A workaround to SR-6419. +extension NotificationCenter { +#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) + #if swift(>=4.0) + #if swift(>=4.0.2) + #else + func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { + return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) + } + #endif + #elseif swift(>=3.2) + #if swift(>=3.2.2) + #else + // swiftlint:disable:next line_length + func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { + return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) + } + #endif + #else + // swiftlint:disable:next line_length + func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { + return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) + } + #endif +#endif +} + +internal class NotificationCollector { + private(set) var observedNotifications: [Notification] + private let notificationCenter: NotificationCenter + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + private var token: AnyObject? + #else + private var token: NSObjectProtocol? + #endif + + required init(notificationCenter: NotificationCenter) { + self.notificationCenter = notificationCenter + self.observedNotifications = [] + } + + func startObserving() { + // swiftlint:disable:next line_length + self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil, using: { [weak self] n in + // linux-swift gets confused by .append(n) + self?.observedNotifications.append(n) + }) + } + + deinit { + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + if let token = self.token { + self.notificationCenter.removeObserver(token) + } + #else + if let token = self.token as? AnyObject { + self.notificationCenter.removeObserver(token) + } + #endif + } +} + +private let mainThread = pthread_self() + +public func postNotifications( + _ notificationsMatcher: T, + fromNotificationCenter center: NotificationCenter = .default) + -> Predicate + where T: Matcher, T.ValueType == [Notification] +{ + _ = mainThread // Force lazy-loading of this value + let collector = NotificationCollector(notificationCenter: center) + collector.startObserving() + var once: Bool = false + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + let collectorNotificationsExpression = Expression(memoizedExpression: { _ in + return collector.observedNotifications + }, location: actualExpression.location, withoutCaching: true) + + assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") + if !once { + once = true + _ = try actualExpression.evaluate() + } + + let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) + if collector.observedNotifications.isEmpty { + failureMessage.actualValue = "no notifications" + } else { + failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" + } + return match + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift new file mode 100644 index 0000000..d32b0e2 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift @@ -0,0 +1,348 @@ +// New Matcher API +// +import Foundation + +/// A Predicate is part of the new matcher API that provides assertions to expectations. +/// +/// Given a code snippet: +/// +/// expect(1).to(equal(2)) +/// ^^^^^^^^ +/// Called a "matcher" +/// +/// A matcher consists of two parts a constructor function and the Predicate. The term Predicate +/// is used as a separate name from Matcher to help transition custom matchers to the new Nimble +/// matcher API. +/// +/// The Predicate provide the heavy lifting on how to assert against a given value. Internally, +/// predicates are simple wrappers around closures to provide static type information and +/// allow composition and wrapping of existing behaviors. +public struct Predicate { + fileprivate var matcher: (Expression) throws -> PredicateResult + + /// Constructs a predicate that knows how take a given value + public init(_ matcher: @escaping (Expression) throws -> PredicateResult) { + self.matcher = matcher + } + + /// Uses a predicate on a given value to see if it passes the predicate. + /// + /// @param expression The value to run the predicate's logic against + /// @returns A predicate result indicate passing or failing and an associated error message. + public func satisfies(_ expression: Expression) throws -> PredicateResult { + return try matcher(expression) + } +} + +/// Provides convenience helpers to defining predicates +extension Predicate { + /// Like Predicate() constructor, but automatically guard against nil (actual) values + public static func define(matcher: @escaping (Expression) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual) + }.requireNonNil + } + + /// Defines a predicate with a default message that can be returned in the closure + /// Also ensures the predicate's actual value cannot pass with `nil` given. + public static func define(_ msg: String, matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual, .expectedActualValueTo(msg)) + }.requireNonNil + } + + /// Defines a predicate with a default message that can be returned in the closure + /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. + public static func defineNilable(_ msg: String, matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual, .expectedActualValueTo(msg)) + } + } +} + +extension Predicate { + /// Provides a simple predicate definition that provides no control over the predefined + /// error message. + /// + /// Also ensures the predicate's actual value cannot pass with `nil` given. + public static func simple(_ msg: String, matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { + return Predicate { actual in + return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) + }.requireNonNil + } + + /// Provides a simple predicate definition that provides no control over the predefined + /// error message. + /// + /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. + public static func simpleNilable(_ msg: String, matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { + return Predicate { actual in + return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) + } + } +} + +// The Expectation style intended for comparison to a PredicateStatus. +public enum ExpectationStyle { + case toMatch, toNotMatch +} + +/// The value that a Predicates return to describe if the given (actual) value matches the +/// predicate. +public struct PredicateResult { + /// Status indicates if the predicate matches, does not match, or fails. + public var status: PredicateStatus + /// The error message that can be displayed if it does not match + public var message: ExpectationMessage + + /// Constructs a new PredicateResult with a given status and error message + public init(status: PredicateStatus, message: ExpectationMessage) { + self.status = status + self.message = message + } + + /// Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message) + public init(bool: Bool, message: ExpectationMessage) { + self.status = PredicateStatus(bool: bool) + self.message = message + } + + /// Converts the result to a boolean based on what the expectation intended + public func toBoolean(expectation style: ExpectationStyle) -> Bool { + return status.toBoolean(expectation: style) + } +} + +/// PredicateStatus is a trinary that indicates if a Predicate matches a given value or not +public enum PredicateStatus { + /// Matches indicates if the predicate / matcher passes with the given value + /// + /// For example, `equals(1)` returns `.matches` for `expect(1).to(equal(1))`. + case matches + /// DoesNotMatch indicates if the predicate / matcher fails with the given value, but *would* + /// succeed if the expectation was inverted. + /// + /// For example, `equals(2)` returns `.doesNotMatch` for `expect(1).toNot(equal(2))`. + case doesNotMatch + /// Fail indicates the predicate will never satisfy with the given value in any case. + /// A perfect example is that most matchers fail whenever given `nil`. + /// + /// Using `equal(1)` fails both `expect(nil).to(equal(1))` and `expect(nil).toNot(equal(1))`. + /// Note: Predicate's `requireNonNil` property will also provide this feature mostly for free. + /// Your predicate will still need to guard against nils, but error messaging will be + /// handled for you. + case fail + + /// Converts a boolean to either .matches (if true) or .doesNotMatch (if false). + public init(bool matches: Bool) { + if matches { + self = .matches + } else { + self = .doesNotMatch + } + } + + private func shouldMatch() -> Bool { + switch self { + case .matches: return true + case .doesNotMatch, .fail: return false + } + } + + private func shouldNotMatch() -> Bool { + switch self { + case .doesNotMatch: return true + case .matches, .fail: return false + } + } + + /// Converts the PredicateStatus result to a boolean based on what the expectation intended + internal func toBoolean(expectation style: ExpectationStyle) -> Bool { + if style == .toMatch { + return shouldMatch() + } else { + return shouldNotMatch() + } + } +} + +// Backwards compatibility until Old Matcher API removal +extension Predicate: Matcher { + /// Compatibility layer for old Matcher API, deprecated + public static func fromDeprecatedFullClosure(_ matcher: @escaping (Expression, FailureMessage, Bool) throws -> Bool) -> Predicate { + return Predicate { actual in + let failureMessage = FailureMessage() + let result = try matcher(actual, failureMessage, true) + return PredicateResult( + status: PredicateStatus(bool: result), + message: failureMessage.toExpectationMessage() + ) + } + } + + /// Compatibility layer for old Matcher API, deprecated. + /// Emulates the MatcherFunc API + public static func fromDeprecatedClosure(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) -> Predicate { + return Predicate { actual in + let failureMessage = FailureMessage() + let result = try matcher(actual, failureMessage) + return PredicateResult( + status: PredicateStatus(bool: result), + message: failureMessage.toExpectationMessage() + ) + } + + } + + /// Compatibility layer for old Matcher API, deprecated. + /// Same as calling .predicate on a MatcherFunc or NonNilMatcherFunc type. + public static func fromDeprecatedMatcher(_ matcher: M) -> Predicate where M: Matcher, M.ValueType == T { + return self.fromDeprecatedFullClosure(matcher.toClosure) + } + + /// Deprecated Matcher API, use satisfies(_:_) instead + public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + let result = try satisfies(actualExpression) + result.message.update(failureMessage: failureMessage) + return result.toBoolean(expectation: .toMatch) + } + + /// Deprecated Matcher API, use satisfies(_:_) instead + public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + let result = try satisfies(actualExpression) + result.message.update(failureMessage: failureMessage) + return result.toBoolean(expectation: .toNotMatch) + } +} + +extension Predicate { + // Someday, make this public? Needs documentation + internal func after(f: @escaping (Expression, PredicateResult) throws -> PredicateResult) -> Predicate { + return Predicate { actual -> PredicateResult in + let result = try self.satisfies(actual) + return try f(actual, result) + } + } + + /// Returns a new Predicate based on the current one that always fails if nil is given as + /// the actual value. + /// + /// This replaces `NonNilMatcherFunc`. + public var requireNonNil: Predicate { + return after { actual, result in + if try actual.evaluate() == nil { + return PredicateResult( + status: .fail, + message: result.message.appendedBeNilHint() + ) + } + return result + } + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +public typealias PredicateBlock = (_ actualExpression: Expression) -> NMBPredicateResult + +public class NMBPredicate: NSObject { + private let predicate: PredicateBlock + + public init(predicate: @escaping PredicateBlock) { + self.predicate = predicate + } + + func satisfies(_ expression: @escaping () -> NSObject!, location: SourceLocation) -> NMBPredicateResult { + let expr = Expression(expression: expression, location: location) + return self.predicate(expr) + } +} + +extension NMBPredicate: NMBMatcher { + public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let result = satisfies(actualBlock, location: location).toSwift() + result.message.update(failureMessage: failureMessage) + return result.status.toBoolean(expectation: .toMatch) + } + + public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let result = satisfies(actualBlock, location: location).toSwift() + result.message.update(failureMessage: failureMessage) + return result.status.toBoolean(expectation: .toNotMatch) + } +} + +final public class NMBPredicateResult: NSObject { + public var status: NMBPredicateStatus + public var message: NMBExpectationMessage + + public init(status: NMBPredicateStatus, message: NMBExpectationMessage) { + self.status = status + self.message = message + } + + public init(bool success: Bool, message: NMBExpectationMessage) { + self.status = NMBPredicateStatus.from(bool: success) + self.message = message + } + + public func toSwift() -> PredicateResult { + return PredicateResult(status: status.toSwift(), + message: message.toSwift()) + } +} + +extension PredicateResult { + public func toObjectiveC() -> NMBPredicateResult { + return NMBPredicateResult(status: status.toObjectiveC(), message: message.toObjectiveC()) + } +} + +final public class NMBPredicateStatus: NSObject { + private let status: Int + private init(status: Int) { + self.status = status + } + + public static let matches: NMBPredicateStatus = NMBPredicateStatus(status: 0) + public static let doesNotMatch: NMBPredicateStatus = NMBPredicateStatus(status: 1) + public static let fail: NMBPredicateStatus = NMBPredicateStatus(status: 2) + + public override var hashValue: Int { return self.status.hashValue } + + public override func isEqual(_ object: Any?) -> Bool { + guard let otherPredicate = object as? NMBPredicateStatus else { + return false + } + return self.status == otherPredicate.status + } + + public static func from(status: PredicateStatus) -> NMBPredicateStatus { + switch status { + case .matches: return self.matches + case .doesNotMatch: return self.doesNotMatch + case .fail: return self.fail + } + } + + public static func from(bool success: Bool) -> NMBPredicateStatus { + return self.from(status: PredicateStatus(bool: success)) + } + + public func toSwift() -> PredicateStatus { + switch status { + case NMBPredicateStatus.matches.status: return .matches + case NMBPredicateStatus.doesNotMatch.status: return .doesNotMatch + case NMBPredicateStatus.fail.status: return .fail + default: + internalError("Unhandle status for NMBPredicateStatus") + } + } +} + +extension PredicateStatus { + public func toObjectiveC() -> NMBPredicateStatus { + return NMBPredicateStatus.from(status: self) + } +} + +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift new file mode 100644 index 0000000..60553bd --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift @@ -0,0 +1,198 @@ +import Foundation + +// This matcher requires the Objective-C, and being built by Xcode rather than the Swift Package Manager +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + +/// A Nimble matcher that succeeds when the actual expression raises an +/// exception with the specified name, reason, and/or userInfo. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the raised exception. The closure only gets called when an exception +/// is raised. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func raiseException( + named: String? = nil, + reason: String? = nil, + userInfo: NSDictionary? = nil, + closure: ((NSException) -> Void)? = nil) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var exception: NSException? + let capture = NMBExceptionCapture(handler: ({ e in + exception = e + }), finally: nil) + + capture.tryBlock { + _ = try! actualExpression.evaluate() + return + } + + setFailureMessageForException( + failureMessage, + exception: exception, + named: named, + reason: reason, + userInfo: userInfo, + closure: closure + ) + return exceptionMatchesNonNilFieldsOrClosure( + exception, + named: named, + reason: reason, + userInfo: userInfo, + closure: closure + ) + } +} + +// swiftlint:disable:next function_parameter_count +internal func setFailureMessageForException( + _ failureMessage: FailureMessage, + exception: NSException?, + named: String?, + reason: String?, + userInfo: NSDictionary?, + closure: ((NSException) -> Void)?) { + failureMessage.postfixMessage = "raise exception" + + if let named = named { + failureMessage.postfixMessage += " with name <\(named)>" + } + if let reason = reason { + failureMessage.postfixMessage += " with reason <\(reason)>" + } + if let userInfo = userInfo { + failureMessage.postfixMessage += " with userInfo <\(userInfo)>" + } + if closure != nil { + failureMessage.postfixMessage += " that satisfies block" + } + if named == nil && reason == nil && userInfo == nil && closure == nil { + failureMessage.postfixMessage = "raise any exception" + } + + if let exception = exception { + // swiftlint:disable:next line_length + failureMessage.actualValue = "\(String(describing: type(of: exception))) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" + } else { + failureMessage.actualValue = "no exception" + } +} + +internal func exceptionMatchesNonNilFieldsOrClosure( + _ exception: NSException?, + named: String?, + reason: String?, + userInfo: NSDictionary?, + closure: ((NSException) -> Void)?) -> Bool { + var matches = false + + if let exception = exception { + matches = true + + if let named = named, exception.name.rawValue != named { + matches = false + } + if reason != nil && exception.reason != reason { + matches = false + } + if let userInfo = userInfo, let exceptionUserInfo = exception.userInfo, + (exceptionUserInfo as NSDictionary) != userInfo { + matches = false + } + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(exception) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } + + return matches +} + +public class NMBObjCRaiseExceptionMatcher: NSObject, NMBMatcher { + internal var _name: String? + internal var _reason: String? + internal var _userInfo: NSDictionary? + internal var _block: ((NSException) -> Void)? + + internal init(name: String?, reason: String?, userInfo: NSDictionary?, block: ((NSException) -> Void)?) { + _name = name + _reason = reason + _userInfo = userInfo + _block = block + } + + @objc public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let block: () -> Any? = ({ _ = actualBlock(); return nil }) + let expr = Expression(expression: block, location: location) + + return try! raiseException( + named: _name, + reason: _reason, + userInfo: _userInfo, + closure: _block + ).matches(expr, failureMessage: failureMessage) + } + + @objc public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + return !matches(actualBlock, failureMessage: failureMessage, location: location) + } + + @objc public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { + return ({ name in + return NMBObjCRaiseExceptionMatcher( + name: name, + reason: self._reason, + userInfo: self._userInfo, + block: self._block + ) + }) + } + + @objc public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { + return ({ reason in + return NMBObjCRaiseExceptionMatcher( + name: self._name, + reason: reason, + userInfo: self._userInfo, + block: self._block + ) + }) + } + + @objc public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { + return ({ userInfo in + return NMBObjCRaiseExceptionMatcher( + name: self._name, + reason: self._reason, + userInfo: userInfo, + block: self._block + ) + }) + } + + @objc public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { + return ({ block in + return NMBObjCRaiseExceptionMatcher( + name: self._name, + reason: self._reason, + userInfo: self._userInfo, + block: block + ) + }) + } +} + +extension NMBObjCMatcher { + @objc public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionMatcher { + return NMBObjCRaiseExceptionMatcher(name: nil, reason: nil, userInfo: nil, block: nil) + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift new file mode 100644 index 0000000..6c63a15 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift @@ -0,0 +1,101 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value matches with all of the matchers +/// provided in the variable list of matchers. +public func satisfyAllOf(_ matchers: U...) -> Predicate + where U: Matcher, U.ValueType == T { + return satisfyAllOf(matchers) +} + +/// Deprecated. Please use `satisfyAnyOf(_) -> Predicate` instead. +internal func satisfyAllOf(_ matchers: [U]) -> Predicate + where U: Matcher, U.ValueType == T { + return NonNilMatcherFunc { actualExpression, failureMessage in + let postfixMessages = NSMutableArray() + var matches = true + for matcher in matchers { + if try matcher.doesNotMatch(actualExpression, failureMessage: failureMessage) { + matches = false + } + postfixMessages.add(NSString(string: "{\(failureMessage.postfixMessage)}")) + } + + failureMessage.postfixMessage = "match all of: " + postfixMessages.componentsJoined(by: ", and ") + if let actualValue = try actualExpression.evaluate() { + failureMessage.actualValue = "\(actualValue)" + } + + return matches + }.predicate +} + +internal func satisfyAllOf(_ predicates: [Predicate]) -> Predicate { + return Predicate { actualExpression in + var postfixMessages = [String]() + var matches = true + for predicate in predicates { + let result = try predicate.satisfies(actualExpression) + if result.toBoolean(expectation: .toNotMatch) { + matches = false + } + postfixMessages.append("{\(result.message.expectedMessage)}") + } + + var msg: ExpectationMessage + if let actualValue = try actualExpression.evaluate() { + msg = .expectedCustomValueTo( + "match all of: " + postfixMessages.joined(separator: ", and "), + "\(actualValue)" + ) + } else { + msg = .expectedActualValueTo( + "match all of: " + postfixMessages.joined(separator: ", and ") + ) + } + + return PredicateResult( + bool: matches, + message: msg + ) + }.requireNonNil +} + +public func && (left: Predicate, right: Predicate) -> Predicate { + return satisfyAllOf(left, right) +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func satisfyAllOfMatcher(_ matchers: [NMBMatcher]) -> NMBPredicate { + return NMBPredicate { actualExpression in + if matchers.isEmpty { + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + fail: "satisfyAllOf must be called with at least one matcher" + ) + ) + } + + var elementEvaluators = [Predicate]() + for matcher in matchers { + let elementEvaluator = Predicate { expression in + if let predicate = matcher as? NMBPredicate { + // swiftlint:disable:next line_length + return predicate.satisfies({ try! expression.evaluate() }, location: actualExpression.location).toSwift() + } else { + let failureMessage = FailureMessage() + // swiftlint:disable:next line_length + let success = matcher.matches({ try! expression.evaluate() }, failureMessage: failureMessage, location: actualExpression.location) + return PredicateResult(bool: success, message: failureMessage.toExpectationMessage()) + } + } + + elementEvaluators.append(elementEvaluator) + } + + return try! satisfyAllOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift new file mode 100644 index 0000000..d02a0ff --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift @@ -0,0 +1,109 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual value matches with any of the matchers +/// provided in the variable list of matchers. +public func satisfyAnyOf(_ matchers: U...) -> Predicate + where U: Matcher, U.ValueType == T { + return satisfyAnyOf(matchers) +} + +/// Deprecated. Please use `satisfyAnyOf(_) -> Predicate` instead. +internal func satisfyAnyOf(_ matchers: [U]) -> Predicate + where U: Matcher, U.ValueType == T { + return NonNilMatcherFunc { actualExpression, failureMessage in + let postfixMessages = NSMutableArray() + var matches = false + for matcher in matchers { + if try matcher.matches(actualExpression, failureMessage: failureMessage) { + matches = true + } + postfixMessages.add(NSString(string: "{\(failureMessage.postfixMessage)}")) + } + + failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoined(by: ", or ") + if let actualValue = try actualExpression.evaluate() { + failureMessage.actualValue = "\(actualValue)" + } + + return matches + }.predicate +} + +internal func satisfyAnyOf(_ predicates: [Predicate]) -> Predicate { + return Predicate { actualExpression in + var postfixMessages = [String]() + var matches = false + for predicate in predicates { + let result = try predicate.satisfies(actualExpression) + if result.toBoolean(expectation: .toMatch) { + matches = true + } + postfixMessages.append("{\(result.message.expectedMessage)}") + } + + var msg: ExpectationMessage + if let actualValue = try actualExpression.evaluate() { + msg = .expectedCustomValueTo( + "match one of: " + postfixMessages.joined(separator: ", or "), + "\(actualValue)" + ) + } else { + msg = .expectedActualValueTo( + "match one of: " + postfixMessages.joined(separator: ", or ") + ) + } + + return PredicateResult( + status: PredicateStatus(bool: matches), + message: msg + ) + }.requireNonNil +} + +public func || (left: Predicate, right: Predicate) -> Predicate { + return satisfyAnyOf(left, right) +} + +public func || (left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> Predicate { + return satisfyAnyOf(left, right) +} + +public func || (left: MatcherFunc, right: MatcherFunc) -> Predicate { + return satisfyAnyOf(left, right) +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NMBObjCMatcher { + @objc public class func satisfyAnyOfMatcher(_ matchers: [NMBMatcher]) -> NMBPredicate { + return NMBPredicate { actualExpression in + if matchers.isEmpty { + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + fail: "satisfyAnyOf must be called with at least one matcher" + ) + ) + } + + var elementEvaluators = [Predicate]() + for matcher in matchers { + let elementEvaluator = Predicate { expression in + if let predicate = matcher as? NMBPredicate { + // swiftlint:disable:next line_length + return predicate.satisfies({ try! expression.evaluate() }, location: actualExpression.location).toSwift() + } else { + let failureMessage = FailureMessage() + // swiftlint:disable:next line_length + let success = matcher.matches({ try! expression.evaluate() }, failureMessage: failureMessage, location: actualExpression.location) + return PredicateResult(bool: success, message: failureMessage.toExpectationMessage()) + } + } + + elementEvaluators.append(elementEvaluator) + } + + return try! satisfyAnyOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift new file mode 100644 index 0000000..a530c60 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift @@ -0,0 +1,56 @@ +import Foundation + +public func throwAssertion() -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + #if arch(x86_64) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + failureMessage.postfixMessage = "throw an assertion" + failureMessage.actualValue = nil + + var succeeded = true + + let caughtException: BadInstructionException? = catchBadInstruction { + #if os(tvOS) + if !NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning { + print() + print("[Nimble Warning]: If you're getting stuck on a debugger breakpoint for a " + + "fatal error while using throwAssertion(), please disable 'Debug Executable' " + + "in your scheme. Go to 'Edit Scheme > Test > Info' and uncheck " + + "'Debug Executable'. If you've already done that, suppress this warning " + + "by setting `NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true`. " + + "This is required because the standard methods of catching assertions " + + "(mach APIs) are unavailable for tvOS. Instead, the same mechanism the " + + "debugger uses is the fallback method for tvOS." + ) + print() + NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true + } + #endif + do { + try actualExpression.evaluate() + } catch let error { + succeeded = false + failureMessage.postfixMessage += "; threw error instead <\(error)>" + } + } + + if !succeeded { + return false + } + + if caughtException == nil { + return false + } + + return true + #elseif SWIFT_PACKAGE + fatalError("The throwAssertion Nimble matcher does not currently support Swift CLI." + + " You can silence this error by placing the test case inside an #if !SWIFT_PACKAGE" + + " conditional statement") + #else + fatalError("The throwAssertion Nimble matcher can only run on x86_64 platforms with " + + "Objective-C (e.g. Mac, iPhone 5s or later simulators). You can silence this error " + + "by placing the test case inside an #if arch(x86_64) or (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) conditional statement") + // swiftlint:disable:previous line_length + #endif + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift new file mode 100644 index 0000000..872ca5c --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift @@ -0,0 +1,258 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparison by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError() -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + failureMessage.postfixMessage = "throw any error" + if let actualError = actualError { + failureMessage.actualValue = "<\(actualError)>" + } else { + failureMessage.actualValue = "no error" + } + return actualError != nil + } +} + +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError(_ error: T, closure: ((Error) -> Void)? = nil) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError( + failureMessage, + actualError: actualError, + error: error, + errorType: nil, + closure: closure + ) + var matches = false + if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { + matches = true + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } + return matches + } +} + +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError(_ error: T, closure: ((T) -> Void)? = nil) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError( + failureMessage, + actualError: actualError, + error: error, + errorType: nil, + closure: closure + ) + var matches = false + if let actualError = actualError as? T, error == actualError { + matches = true + + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } + return matches + } +} + +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError( + errorType: T.Type, + closure: ((T) -> Void)? = nil) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError( + failureMessage, + actualError: actualError, + error: nil, + errorType: errorType, + closure: closure + ) + var matches = false + if let actualError = actualError { + matches = true + if let actualError = actualError as? T { + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } else { + matches = (actualError is T) + // The closure expects another ErrorProtocol as argument, so this + // is _supposed_ to fail, so that it becomes more obvious. + if let closure = closure { + let assertions = gatherExpectations { + if let actual = actualError as? T { + closure(actual) + } + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } + } + + return matches + } +} + +/// A Nimble matcher that succeeds when the actual expression throws any +/// error or when the passed closures' arbitrary custom matching succeeds. +/// +/// This duplication to it's generic adequate is required to allow to receive +/// values of the existential type `Error` in the closure. +/// +/// The closure only gets called when an error was thrown. +public func throwError(closure: @escaping ((Error) -> Void)) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) + + var matches = false + if let actualError = actualError { + matches = true + + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + return matches + } +} + +/// A Nimble matcher that succeeds when the actual expression throws any +/// error or when the passed closures' arbitrary custom matching succeeds. +/// +/// This duplication to it's generic adequate is required to allow to receive +/// values of the existential type `Error` in the closure. +/// +/// The closure only gets called when an error was thrown. +public func throwError(closure: @escaping ((T) -> Void)) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) + + var matches = false + if let actualError = actualError as? T { + matches = true + + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + return matches + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift new file mode 100644 index 0000000..01369bb --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift @@ -0,0 +1,37 @@ +/** + Used by the `toSucceed` matcher. + + This is the return type for the closure. + */ +public enum ToSucceedResult { + case succeeded + case failed(reason: String) +} + +/** + A Nimble matcher that takes in a closure for validation. + + Return `.succeeded` when the validation succeeds. + Return `.failed` with a failure reason when the validation fails. + */ +public func succeed() -> Predicate<() -> ToSucceedResult> { + return Predicate.define { actualExpression in + let optActual = try actualExpression.evaluate() + guard let actual = optActual else { + return PredicateResult(status: .fail, message: .fail("expected a closure, got ")) + } + + switch actual() { + case .succeeded: + return PredicateResult( + bool: true, + message: .expectedCustomValueTo("succeed", "") + ) + case .failed(let reason): + return PredicateResult( + bool: false, + message: .expectedCustomValueTo("succeed", " because <\(reason)>") + ) + } + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Nimble.h b/Example/Pods/Nimble/Sources/Nimble/Nimble.h new file mode 100644 index 0000000..2bbc693 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Nimble.h @@ -0,0 +1,13 @@ +#import +#import "NMBExceptionCapture.h" +#import "NMBStringify.h" +#import "DSL.h" + +#if TARGET_OS_TV + #import "CwlPreconditionTesting_POSIX.h" +#else + #import "CwlPreconditionTesting.h" +#endif + +FOUNDATION_EXPORT double NimbleVersionNumber; +FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift new file mode 100644 index 0000000..c77a8fc --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift @@ -0,0 +1,377 @@ +import CoreFoundation +import Dispatch +import Foundation + +#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) + import CDispatch +#endif + +private let timeoutLeeway = DispatchTimeInterval.milliseconds(1) +private let pollLeeway = DispatchTimeInterval.milliseconds(1) + +/// Stores debugging information about callers +internal struct WaitingInfo: CustomStringConvertible { + let name: String + let file: FileString + let lineNumber: UInt + + var description: String { + return "\(name) at \(file):\(lineNumber)" + } +} + +internal protocol WaitLock { + func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) + func releaseWaitingLock() + func isWaitingLocked() -> Bool +} + +internal class AssertionWaitLock: WaitLock { + private var currentWaiter: WaitingInfo? + init() { } + + func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) { + let info = WaitingInfo(name: fnName, file: file, lineNumber: line) + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + let isMainThread = Thread.isMainThread + #else + let isMainThread = _CFIsMainThread() + #endif + nimblePrecondition( + isMainThread, + "InvalidNimbleAPIUsage", + "\(fnName) can only run on the main thread." + ) + nimblePrecondition( + currentWaiter == nil, + "InvalidNimbleAPIUsage", + "Nested async expectations are not allowed to avoid creating flaky tests.\n\n" + + "The call to\n\t\(info)\n" + + "triggered this exception because\n\t\(currentWaiter!)\n" + + "is currently managing the main run loop." + ) + currentWaiter = info + } + + func isWaitingLocked() -> Bool { + return currentWaiter != nil + } + + func releaseWaitingLock() { + currentWaiter = nil + } +} + +internal enum AwaitResult { + /// Incomplete indicates None (aka - this value hasn't been fulfilled yet) + case incomplete + /// TimedOut indicates the result reached its defined timeout limit before returning + case timedOut + /// BlockedRunLoop indicates the main runloop is too busy processing other blocks to trigger + /// the timeout code. + /// + /// This may also mean the async code waiting upon may have never actually ran within the + /// required time because other timers & sources are running on the main run loop. + case blockedRunLoop + /// The async block successfully executed and returned a given result + case completed(T) + /// When a Swift Error is thrown + case errorThrown(Error) + /// When an Objective-C Exception is raised + case raisedException(NSException) + + func isIncomplete() -> Bool { + switch self { + case .incomplete: return true + default: return false + } + } + + func isCompleted() -> Bool { + switch self { + case .completed: return true + default: return false + } + } +} + +/// Holds the resulting value from an asynchronous expectation. +/// This class is thread-safe at receiving an "response" to this promise. +internal class AwaitPromise { + private(set) internal var asyncResult: AwaitResult = .incomplete + private var signal: DispatchSemaphore + + init() { + signal = DispatchSemaphore(value: 1) + } + + deinit { + signal.signal() + } + + /// Resolves the promise with the given result if it has not been resolved. Repeated calls to + /// this method will resolve in a no-op. + /// + /// @returns a Bool that indicates if the async result was accepted or rejected because another + /// value was received first. + func resolveResult(_ result: AwaitResult) -> Bool { + if signal.wait(timeout: .now()) == .success { + self.asyncResult = result + return true + } else { + return false + } + } +} + +internal struct AwaitTrigger { + let timeoutSource: DispatchSourceTimer + let actionSource: DispatchSourceTimer? + let start: () throws -> Void +} + +/// Factory for building fully configured AwaitPromises and waiting for their results. +/// +/// This factory stores all the state for an async expectation so that Await doesn't +/// doesn't have to manage it. +internal class AwaitPromiseBuilder { + let awaiter: Awaiter + let waitLock: WaitLock + let trigger: AwaitTrigger + let promise: AwaitPromise + + internal init( + awaiter: Awaiter, + waitLock: WaitLock, + promise: AwaitPromise, + trigger: AwaitTrigger) { + self.awaiter = awaiter + self.waitLock = waitLock + self.promise = promise + self.trigger = trigger + } + + func timeout(_ timeoutInterval: TimeInterval, forcefullyAbortTimeout: TimeInterval) -> Self { + // = Discussion = + // + // There's a lot of technical decisions here that is useful to elaborate on. This is + // definitely more lower-level than the previous NSRunLoop based implementation. + // + // + // Why Dispatch Source? + // + // + // We're using a dispatch source to have better control of the run loop behavior. + // A timer source gives us deferred-timing control without having to rely as much on + // a run loop's traditional dispatching machinery (eg - NSTimers, DefaultRunLoopMode, etc.) + // which is ripe for getting corrupted by application code. + // + // And unlike dispatch_async(), we can control how likely our code gets prioritized to + // executed (see leeway parameter) + DISPATCH_TIMER_STRICT. + // + // This timer is assumed to run on the HIGH priority queue to ensure it maintains the + // highest priority over normal application / test code when possible. + // + // + // Run Loop Management + // + // In order to properly interrupt the waiting behavior performed by this factory class, + // this timer stops the main run loop to tell the waiter code that the result should be + // checked. + // + // In addition, stopping the run loop is used to halt code executed on the main run loop. + #if swift(>=4.0) + trigger.timeoutSource.schedule( + deadline: DispatchTime.now() + timeoutInterval, + repeating: .never, + leeway: timeoutLeeway + ) + #else + trigger.timeoutSource.scheduleOneshot( + deadline: DispatchTime.now() + timeoutInterval, + leeway: timeoutLeeway + ) + #endif + trigger.timeoutSource.setEventHandler { + guard self.promise.asyncResult.isIncomplete() else { return } + let timedOutSem = DispatchSemaphore(value: 0) + let semTimedOutOrBlocked = DispatchSemaphore(value: 0) + semTimedOutOrBlocked.signal() + let runLoop = CFRunLoopGetMain() + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + let runLoopMode = CFRunLoopMode.defaultMode.rawValue + #else + let runLoopMode = kCFRunLoopDefaultMode + #endif + CFRunLoopPerformBlock(runLoop, runLoopMode) { + if semTimedOutOrBlocked.wait(timeout: .now()) == .success { + timedOutSem.signal() + semTimedOutOrBlocked.signal() + if self.promise.resolveResult(.timedOut) { + CFRunLoopStop(CFRunLoopGetMain()) + } + } + } + // potentially interrupt blocking code on run loop to let timeout code run + CFRunLoopStop(runLoop) + let now = DispatchTime.now() + forcefullyAbortTimeout + let didNotTimeOut = timedOutSem.wait(timeout: now) != .success + let timeoutWasNotTriggered = semTimedOutOrBlocked.wait(timeout: .now()) == .success + if didNotTimeOut && timeoutWasNotTriggered { + if self.promise.resolveResult(.blockedRunLoop) { + CFRunLoopStop(CFRunLoopGetMain()) + } + } + } + return self + } + + /// Blocks for an asynchronous result. + /// + /// @discussion + /// This function must be executed on the main thread and cannot be nested. This is because + /// this function (and it's related methods) coordinate through the main run loop. Tampering + /// with the run loop can cause undesirable behavior. + /// + /// This method will return an AwaitResult in the following cases: + /// + /// - The main run loop is blocked by other operations and the async expectation cannot be + /// be stopped. + /// - The async expectation timed out + /// - The async expectation succeeded + /// - The async expectation raised an unexpected exception (objc) + /// - The async expectation raised an unexpected error (swift) + /// + /// The returned AwaitResult will NEVER be .incomplete. + func wait(_ fnName: String = #function, file: FileString = #file, line: UInt = #line) -> AwaitResult { + waitLock.acquireWaitingLock( + fnName, + file: file, + line: line) + + let capture = NMBExceptionCapture(handler: ({ exception in + _ = self.promise.resolveResult(.raisedException(exception)) + }), finally: ({ + self.waitLock.releaseWaitingLock() + })) + capture.tryBlock { + do { + try self.trigger.start() + } catch let error { + _ = self.promise.resolveResult(.errorThrown(error)) + } + self.trigger.timeoutSource.resume() + while self.promise.asyncResult.isIncomplete() { + // Stopping the run loop does not work unless we run only 1 mode + _ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture) + } + + self.trigger.timeoutSource.cancel() + if let asyncSource = self.trigger.actionSource { + asyncSource.cancel() + } + } + + return promise.asyncResult + } +} + +internal class Awaiter { + let waitLock: WaitLock + let timeoutQueue: DispatchQueue + let asyncQueue: DispatchQueue + + internal init( + waitLock: WaitLock, + asyncQueue: DispatchQueue, + timeoutQueue: DispatchQueue) { + self.waitLock = waitLock + self.asyncQueue = asyncQueue + self.timeoutQueue = timeoutQueue + } + + private func createTimerSource(_ queue: DispatchQueue) -> DispatchSourceTimer { + return DispatchSource.makeTimerSource(flags: .strict, queue: queue) + } + + func performBlock( + file: FileString, + line: UInt, + _ closure: @escaping (@escaping (T) -> Void) throws -> Void + ) -> AwaitPromiseBuilder { + let promise = AwaitPromise() + let timeoutSource = createTimerSource(timeoutQueue) + var completionCount = 0 + let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: nil) { + try closure { + completionCount += 1 + if completionCount < 2 { + if promise.resolveResult(.completed($0)) { + CFRunLoopStop(CFRunLoopGetMain()) + } + } else { + fail("waitUntil(..) expects its completion closure to be only called once", + file: file, line: line) + } + } + } + + return AwaitPromiseBuilder( + awaiter: self, + waitLock: waitLock, + promise: promise, + trigger: trigger) + } + + func poll(_ pollInterval: TimeInterval, closure: @escaping () throws -> T?) -> AwaitPromiseBuilder { + let promise = AwaitPromise() + let timeoutSource = createTimerSource(timeoutQueue) + let asyncSource = createTimerSource(asyncQueue) + let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { + let interval = DispatchTimeInterval.nanoseconds(Int(pollInterval * TimeInterval(NSEC_PER_SEC))) + #if swift(>=4.0) + asyncSource.schedule(deadline: .now(), repeating: interval, leeway: pollLeeway) + #else + asyncSource.scheduleRepeating(deadline: .now(), interval: interval, leeway: pollLeeway) + #endif + asyncSource.setEventHandler { + do { + if let result = try closure() { + if promise.resolveResult(.completed(result)) { + CFRunLoopStop(CFRunLoopGetCurrent()) + } + } + } catch let error { + if promise.resolveResult(.errorThrown(error)) { + CFRunLoopStop(CFRunLoopGetCurrent()) + } + } + } + asyncSource.resume() + } + + return AwaitPromiseBuilder( + awaiter: self, + waitLock: waitLock, + promise: promise, + trigger: trigger) + } +} + +internal func pollBlock( + pollInterval: TimeInterval, + timeoutInterval: TimeInterval, + file: FileString, + line: UInt, + fnName: String = #function, + expression: @escaping () throws -> Bool) -> AwaitResult { + let awaiter = NimbleEnvironment.activeInstance.awaiter + let result = awaiter.poll(pollInterval) { () throws -> Bool? in + if try expression() { + return true + } + return nil + }.timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval / 2.0).wait(fnName, file: file, line: line) + + return result +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift new file mode 100644 index 0000000..074cb20 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift @@ -0,0 +1,59 @@ +import Foundation + +// Generic + +internal func setFailureMessageForError( + _ failureMessage: FailureMessage, + postfixMessageVerb: String = "throw", + actualError: Error?, + error: T? = nil, + errorType: T.Type? = nil, + closure: ((T) -> Void)? = nil) { + failureMessage.postfixMessage = "\(postfixMessageVerb) error" + + if let error = error { + failureMessage.postfixMessage += " <\(error)>" + } else if errorType != nil || closure != nil { + failureMessage.postfixMessage += " from type <\(T.self)>" + } + if closure != nil { + failureMessage.postfixMessage += " that satisfies block" + } + if error == nil && errorType == nil && closure == nil { + failureMessage.postfixMessage = "\(postfixMessageVerb) any error" + } + + if let actualError = actualError { + failureMessage.actualValue = "<\(actualError)>" + } else { + failureMessage.actualValue = "no error" + } +} + +internal func errorMatchesExpectedError( + _ actualError: Error, + expectedError: T) -> Bool { + return actualError._domain == expectedError._domain + && actualError._code == expectedError._code +} + +// Non-generic + +internal func setFailureMessageForError( + _ failureMessage: FailureMessage, + actualError: Error?, + closure: ((Error) -> Void)?) { + failureMessage.postfixMessage = "throw error" + + if closure != nil { + failureMessage.postfixMessage += " that satisfies block" + } else { + failureMessage.postfixMessage = "throw any error" + } + + if let actualError = actualError { + failureMessage.actualValue = "<\(actualError)>" + } else { + failureMessage.actualValue = "no error" + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift new file mode 100644 index 0000000..6c5126a --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift @@ -0,0 +1,12 @@ +import Foundation + +extension Sequence { + internal func all(_ fn: (Iterator.Element) -> Bool) -> Bool { + for item in self { + if !fn(item) { + return false + } + } + return true + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift new file mode 100644 index 0000000..4e37aef --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift @@ -0,0 +1,31 @@ +import Foundation + +// Ideally we would always use `StaticString` as the type for tracking the file name +// that expectations originate from, for consistency with `assert` etc. from the +// stdlib, and because recent versions of the XCTest overlay require `StaticString` +// when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we +// have to use `String` instead because StaticString can't be generated from Objective-C +#if SWIFT_PACKAGE +public typealias FileString = StaticString +#else +public typealias FileString = String +#endif + +public final class SourceLocation: NSObject { + public let file: FileString + public let line: UInt + + override init() { + file = "Unknown File" + line = 0 + } + + init(file: FileString, line: UInt) { + self.file = file + self.line = line + } + + override public var description: String { + return "\(file):\(line)" + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift new file mode 100644 index 0000000..cd6de20 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift @@ -0,0 +1,212 @@ +import Foundation + +internal func identityAsString(_ value: Any?) -> String { + let anyObject: AnyObject? +#if os(Linux) + anyObject = value as? AnyObject +#else + anyObject = value as AnyObject? +#endif + if let value = anyObject { + return NSString(format: "<%p>", unsafeBitCast(value, to: Int.self)).description + } else { + return "nil" + } +} + +internal func arrayAsString(_ items: [T], joiner: String = ", ") -> String { + return items.reduce("") { accum, item in + let prefix = (accum.isEmpty ? "" : joiner) + return accum + prefix + "\(stringify(item))" + } +} + +/// A type with a customized test output text representation. +/// +/// This textual representation is produced when values will be +/// printed in test runs, and may be useful when producing +/// error messages in custom matchers. +/// +/// - SeeAlso: `CustomDebugStringConvertible` +public protocol TestOutputStringConvertible { + var testDescription: String { get } +} + +extension Double: TestOutputStringConvertible { + public var testDescription: String { + return NSNumber(value: self).testDescription + } +} + +extension Float: TestOutputStringConvertible { + public var testDescription: String { + return NSNumber(value: self).testDescription + } +} + +extension NSNumber: TestOutputStringConvertible { + // This is using `NSString(format:)` instead of + // `String(format:)` because the latter somehow breaks + // the travis CI build on linux. + public var testDescription: String { + let description = self.description + + if description.contains(".") { + // Travis linux swiftpm build doesn't like casting String to NSString, + // which is why this annoying nested initializer thing is here. + // Maybe this will change in a future snapshot. + let decimalPlaces = NSString(string: NSString(string: description) + .components(separatedBy: ".")[1]) + + // SeeAlso: https://bugs.swift.org/browse/SR-1464 + switch decimalPlaces.length { + case 1: + return NSString(format: "%0.1f", self.doubleValue).description + case 2: + return NSString(format: "%0.2f", self.doubleValue).description + case 3: + return NSString(format: "%0.3f", self.doubleValue).description + default: + return NSString(format: "%0.4f", self.doubleValue).description + } + } + return self.description + } +} + +extension Array: TestOutputStringConvertible { + public var testDescription: String { + let list = self.map(Nimble.stringify).joined(separator: ", ") + return "[\(list)]" + } +} + +extension AnySequence: TestOutputStringConvertible { + public var testDescription: String { + let generator = self.makeIterator() + var strings = [String]() + var value: AnySequence.Iterator.Element? + + repeat { + value = generator.next() + if let value = value { + strings.append(stringify(value)) + } + } while value != nil + + let list = strings.joined(separator: ", ") + return "[\(list)]" + } +} + +extension NSArray: TestOutputStringConvertible { + public var testDescription: String { + let list = Array(self).map(Nimble.stringify).joined(separator: ", ") + return "(\(list))" + } +} + +extension NSIndexSet: TestOutputStringConvertible { + public var testDescription: String { + let list = Array(self).map(Nimble.stringify).joined(separator: ", ") + return "(\(list))" + } +} + +extension String: TestOutputStringConvertible { + public var testDescription: String { + return self + } +} + +extension Data: TestOutputStringConvertible { + public var testDescription: String { + #if os(Linux) + // FIXME: Swift on Linux triggers a segfault when calling NSData's hash() (last checked on 03-11-16) + return "Data" + #else + return "Data" + #endif + } +} + +/// +/// Returns a string appropriate for displaying in test output +/// from the provided value. +/// +/// - parameter value: A value that will show up in a test's output. +/// +/// - returns: The string that is returned can be +/// customized per type by conforming a type to the `TestOutputStringConvertible` +/// protocol. When stringifying a non-`TestOutputStringConvertible` type, this +/// function will return the value's debug description and then its +/// normal description if available and in that order. Otherwise it +/// will return the result of constructing a string from the value. +/// +/// - SeeAlso: `TestOutputStringConvertible` +public func stringify(_ value: T) -> String { + if let value = value as? TestOutputStringConvertible { + return value.testDescription + } + + if let value = value as? CustomDebugStringConvertible { + return value.debugDescription + } + + return String(describing: value) +} + +/// -SeeAlso: `stringify(value: T)` +public func stringify(_ value: T?) -> String { + if let unboxed = value { + return stringify(unboxed) + } + return "nil" +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +@objc public class NMBStringer: NSObject { + @objc public class func stringify(_ obj: Any?) -> String { + return Nimble.stringify(obj) + } +} +#endif + +// MARK: Collection Type Stringers + +/// Attempts to generate a pretty type string for a given value. If the value is of a Objective-C +/// collection type, or a subclass thereof, (e.g. `NSArray`, `NSDictionary`, etc.). +/// This function will return the type name of the root class of the class cluster for better +/// readability (e.g. `NSArray` instead of `__NSArrayI`). +/// +/// For values that don't have a type of an Objective-C collection, this function returns the +/// default type description. +/// +/// - parameter value: A value that will be used to determine a type name. +/// +/// - returns: The name of the class cluster root class for Objective-C collection types, or the +/// the `dynamicType` of the value for values of any other type. +public func prettyCollectionType(_ value: T) -> String { + switch value { + case is NSArray: + return String(describing: NSArray.self) + case is NSDictionary: + return String(describing: NSDictionary.self) + case is NSSet: + return String(describing: NSSet.self) + case is NSIndexSet: + return String(describing: NSIndexSet.self) + default: + return String(describing: value) + } +} + +/// Returns the type name for a given collection type. This overload is used by Swift +/// collection types. +/// +/// - parameter collection: A Swift `CollectionType` value. +/// +/// - returns: A string representing the `dynamicType` of the value. +public func prettyCollectionType(_ collection: T) -> String { + return String(describing: type(of: collection)) +} diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h new file mode 100644 index 0000000..7439889 --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h @@ -0,0 +1,14 @@ +#import + +#if __has_include("Nimble-Swift.h") +#import "Nimble-Swift.h" +#else +#import +#endif + +SWIFT_CLASS("_TtC6Nimble22CurrentTestCaseTracker") +@interface CurrentTestCaseTracker : NSObject ++ (CurrentTestCaseTracker *)sharedInstance; +@end + +@interface CurrentTestCaseTracker (Register) @end diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h new file mode 100644 index 0000000..9170541 --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h @@ -0,0 +1,389 @@ +#import + +@class NMBExpectation; +@class NMBObjCBeCloseToMatcher; +@class NMBObjCRaiseExceptionMatcher; +@protocol NMBMatcher; + + +NS_ASSUME_NONNULL_BEGIN + + +#define NIMBLE_OVERLOADABLE __attribute__((overloadable)) +#define NIMBLE_EXPORT FOUNDATION_EXPORT +#define NIMBLE_EXPORT_INLINE FOUNDATION_STATIC_INLINE + +#define NIMBLE_VALUE_OF(VAL) ({ \ + __typeof__((VAL)) val = (VAL); \ + [NSValue valueWithBytes:&val objCType:@encode(__typeof__((VAL)))]; \ +}) + +#ifdef NIMBLE_DISABLE_SHORT_SYNTAX +#define NIMBLE_SHORT(PROTO, ORIGINAL) +#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) +#else +#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); } +#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE NIMBLE_OVERLOADABLE PROTO { return (ORIGINAL); } +#endif + + + +#define DEFINE_NMB_EXPECT_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + NMBExpectation *NMB_expect(TYPE(^actualBlock)(void), NSString *file, NSUInteger line) { \ + return NMB_expect(^id { return EXPR; }, file, line); \ + } + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + NMBExpectation *NMB_expect(id(^actualBlock)(void), NSString *file, NSUInteger line); + + // overloaded dispatch for nils - expect(nil) + DEFINE_NMB_EXPECT_OVERLOAD(void*, nil) + DEFINE_NMB_EXPECT_OVERLOAD(NSRange, NIMBLE_VALUE_OF(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(int, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned int, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(float, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(double, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(long long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned long long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(char, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned char, @(actualBlock())) + // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow + // the compiler to dispatch to bool. + DEFINE_NMB_EXPECT_OVERLOAD(BOOL, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(char *, @(actualBlock())) + + +#undef DEFINE_NMB_EXPECT_OVERLOAD + + + +NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line); + + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_equal(TYPE expectedValue) { \ + return NMB_equal((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id equal(TYPE expectedValue), NMB_equal(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_equal(__nullable id expectedValue); + + NIMBLE_SHORT_OVERLOADED(id equal(__nullable id expectedValue), + NMB_equal(expectedValue)); + + // overloaded dispatch for nils - expect(nil) + DEFINE_OVERLOAD(void*__nullable, (id)nil) + DEFINE_OVERLOAD(NSRange, NIMBLE_VALUE_OF(expectedValue)) + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow + // the compiler to dispatch to bool. + DEFINE_OVERLOAD(BOOL, @(expectedValue)) + DEFINE_OVERLOAD(char *, @(expectedValue)) + +#undef DEFINE_OVERLOAD + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_haveCount(TYPE expectedValue) { \ + return NMB_haveCount((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id haveCount(TYPE expectedValue), \ + NMB_haveCount(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_haveCount(id expectedValue); + + NIMBLE_SHORT_OVERLOADED(id haveCount(id expectedValue), + NMB_haveCount(expectedValue)); + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + NMBObjCBeCloseToMatcher *NMB_beCloseTo(TYPE expectedValue) { \ + return NMB_beCloseTo((NSNumber *)(EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(TYPE expectedValue), \ + NMB_beCloseTo(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(NSNumber *expectedValue), + NMB_beCloseTo(expectedValue)); + + // it would be better to only overload float & double, but zero becomes ambigious + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); +NIMBLE_EXPORT_INLINE id beAnInstanceOf(Class expectedClass) { + return NMB_beAnInstanceOf(expectedClass); +} + +NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); +NIMBLE_EXPORT_INLINE id beAKindOf(Class expectedClass) { + return NMB_beAKindOf(expectedClass); +} + +NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); +NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { + return NMB_beginWith(itemElementOrSubstring); +} + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beGreaterThan(TYPE expectedValue) { \ + return NMB_beGreaterThan((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beGreaterThan(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beGreaterThan(NSNumber *expectedValue) { + return NMB_beGreaterThan(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ + return NMB_beGreaterThanOrEqualTo((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beGreaterThanOrEqualTo(TYPE expectedValue), \ + NMB_beGreaterThanOrEqualTo(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beGreaterThanOrEqualTo(NSNumber *expectedValue) { + return NMB_beGreaterThanOrEqualTo(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance); +NIMBLE_SHORT(id beIdenticalTo(id expectedInstance), + NMB_beIdenticalTo(expectedInstance)); + +NIMBLE_EXPORT id NMB_be(id expectedInstance); +NIMBLE_SHORT(id be(id expectedInstance), + NMB_be(expectedInstance)); + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beLessThan(TYPE expectedValue) { \ + return NMB_beLessThan((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beLessThan(TYPE expectedValue), \ + NMB_beLessThan(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beLessThan(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beLessThan(NSNumber *expectedValue) { + return NMB_beLessThan(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ + return NMB_beLessThanOrEqualTo((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beLessThanOrEqualTo(TYPE expectedValue), \ + NMB_beLessThanOrEqualTo(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beLessThanOrEqualTo(NSNumber *expectedValue) { + return NMB_beLessThanOrEqualTo(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beTruthy(void); +NIMBLE_SHORT(id beTruthy(void), + NMB_beTruthy()); + +NIMBLE_EXPORT id NMB_beFalsy(void); +NIMBLE_SHORT(id beFalsy(void), + NMB_beFalsy()); + +NIMBLE_EXPORT id NMB_beTrue(void); +NIMBLE_SHORT(id beTrue(void), + NMB_beTrue()); + +NIMBLE_EXPORT id NMB_beFalse(void); +NIMBLE_SHORT(id beFalse(void), + NMB_beFalse()); + +NIMBLE_EXPORT id NMB_beNil(void); +NIMBLE_SHORT(id beNil(void), + NMB_beNil()); + +NIMBLE_EXPORT id NMB_beEmpty(void); +NIMBLE_SHORT(id beEmpty(void), + NMB_beEmpty()); + +NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; +#define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil) +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define contain(...) NMB_contain(__VA_ARGS__) +#endif + +NIMBLE_EXPORT id NMB_containElementSatisfying(BOOL(^predicate)(id)); +NIMBLE_SHORT(id containElementSatisfying(BOOL(^predicate)(id)), + NMB_containElementSatisfying(predicate)); + +NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring); +NIMBLE_SHORT(id endWith(id itemElementOrSubstring), + NMB_endWith(itemElementOrSubstring)); + +NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); +NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), + NMB_raiseException()); + +NIMBLE_EXPORT id NMB_match(id expectedValue); +NIMBLE_SHORT(id match(id expectedValue), + NMB_match(expectedValue)); + +NIMBLE_EXPORT id NMB_allPass(id matcher); +NIMBLE_SHORT(id allPass(id matcher), + NMB_allPass(matcher)); + +NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers); +#define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define satisfyAnyOf(...) NMB_satisfyAnyOf(__VA_ARGS__) +#endif + +NIMBLE_EXPORT id NMB_satisfyAllOfWithMatchers(id matchers); +#define NMB_satisfyAllOf(...) NMB_satisfyAllOfWithMatchers(@[__VA_ARGS__]) +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define satisfyAllOf(...) NMB_satisfyAllOf(__VA_ARGS__) +#endif + +// In order to preserve breakpoint behavior despite using macros to fill in __FILE__ and __LINE__, +// define a builder that populates __FILE__ and __LINE__, and returns a block that takes timeout +// and action arguments. See https://github.com/Quick/Quick/pull/185 for details. +typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void))); +typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void))); + +NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); + +NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line); +NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line); + +NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); + +#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__) +#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__) + +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define expect(...) NMB_expect(^{ return (__VA_ARGS__); }, @(__FILE__), __LINE__) +#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__) +#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__) +#define fail() failWithMessage(@"fail() always fails") + + +#define waitUntilTimeout NMB_waitUntilTimeout +#define waitUntil NMB_waitUntil + +#undef NIMBLE_VALUE_OF + +#endif + +NS_ASSUME_NONNULL_END diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m new file mode 100644 index 0000000..4b099ac --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m @@ -0,0 +1,169 @@ +#import + +#if __has_include("Nimble-Swift.h") +#import "Nimble-Swift.h" +#else +#import +#endif + +SWIFT_CLASS("_TtC6Nimble7NMBWait") +@interface NMBWait : NSObject + ++ (void)untilTimeout:(NSTimeInterval)timeout file:(NSString *)file line:(NSUInteger)line action:(void (^ _Nonnull)(void (^ _Nonnull)(void)))action; ++ (void)untilFile:(NSString *)file line:(NSUInteger)line action:(void (^ _Nonnull)(void (^ _Nonnull)(void)))action; + +@end + + +NS_ASSUME_NONNULL_BEGIN + + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(void), NSString *__nonnull file, NSUInteger line) { + return [[NMBExpectation alloc] initWithActualBlock:actualBlock + negative:NO + file:file + line:line]; +} + +NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line) { + return NMB_expect(^id{ + actualBlock(); + return nil; + }, file, line); +} + +NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line) { + return [NMBExpectation failWithMessage:msg file:file line:line]; +} + +NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass) { + return [NMBObjCMatcher beAnInstanceOfMatcher:expectedClass]; +} + +NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass) { + return [NMBObjCMatcher beAKindOfMatcher:expectedClass]; +} + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { + return [NMBObjCMatcher beCloseToMatcher:expectedValue within:0.001]; +} + +NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring) { + return [NMBObjCMatcher beginWithMatcher:itemElementOrSubstring]; +} + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThan(NSNumber *expectedValue) { + return [NMBObjCMatcher beGreaterThanMatcher:expectedValue]; +} + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { + return [NMBObjCMatcher beGreaterThanOrEqualToMatcher:expectedValue]; +} + +NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance) { + return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; +} + +NIMBLE_EXPORT id NMB_be(id expectedInstance) { + return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; +} + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThan(NSNumber *expectedValue) { + return [NMBObjCMatcher beLessThanMatcher:expectedValue]; +} + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { + return [NMBObjCMatcher beLessThanOrEqualToMatcher:expectedValue]; +} + +NIMBLE_EXPORT id NMB_beTruthy() { + return [NMBObjCMatcher beTruthyMatcher]; +} + +NIMBLE_EXPORT id NMB_beFalsy() { + return [NMBObjCMatcher beFalsyMatcher]; +} + +NIMBLE_EXPORT id NMB_beTrue() { + return [NMBObjCMatcher beTrueMatcher]; +} + +NIMBLE_EXPORT id NMB_beFalse() { + return [NMBObjCMatcher beFalseMatcher]; +} + +NIMBLE_EXPORT id NMB_beNil() { + return [NMBObjCMatcher beNilMatcher]; +} + +NIMBLE_EXPORT id NMB_beEmpty() { + return [NMBObjCMatcher beEmptyMatcher]; +} + +NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) { + NSMutableArray *itemOrSubstringArray = [NSMutableArray array]; + + if (itemOrSubstring) { + [itemOrSubstringArray addObject:itemOrSubstring]; + + va_list args; + va_start(args, itemOrSubstring); + id next; + while ((next = va_arg(args, id))) { + [itemOrSubstringArray addObject:next]; + } + va_end(args); + } + + return [NMBObjCMatcher containMatcher:itemOrSubstringArray]; +} + +NIMBLE_EXPORT id NMB_containElementSatisfying(BOOL(^predicate)(id)) { + return [NMBObjCMatcher containElementSatisfyingMatcher:predicate]; +} + +NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring) { + return [NMBObjCMatcher endWithMatcher:itemElementOrSubstring]; +} + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_equal(__nullable id expectedValue) { + return [NMBObjCMatcher equalMatcher:expectedValue]; +} + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_haveCount(id expectedValue) { + return [NMBObjCMatcher haveCountMatcher:expectedValue]; +} + +NIMBLE_EXPORT id NMB_match(id expectedValue) { + return [NMBObjCMatcher matchMatcher:expectedValue]; +} + +NIMBLE_EXPORT id NMB_allPass(id expectedValue) { + return [NMBObjCMatcher allPassMatcher:expectedValue]; +} + +NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers) { + return [NMBObjCMatcher satisfyAnyOfMatcher:matchers]; +} + +NIMBLE_EXPORT id NMB_satisfyAllOfWithMatchers(id matchers) { + return [NMBObjCMatcher satisfyAllOfMatcher:matchers]; +} + +NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException() { + return [NMBObjCMatcher raiseExceptionMatcher]; +} + +NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line) { + return ^(NSTimeInterval timeout, void (^ _Nonnull action)(void (^ _Nonnull)(void))) { + [NMBWait untilTimeout:timeout file:file line:line action:action]; + }; +} + +NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line) { + return ^(void (^ _Nonnull action)(void (^ _Nonnull)(void))) { + [NMBWait untilFile:file line:line action:action]; + }; +} + +NS_ASSUME_NONNULL_END diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h new file mode 100644 index 0000000..e6e0272 --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h @@ -0,0 +1,11 @@ +#import +#import + +@interface NMBExceptionCapture : NSObject + +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally; +- (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); + +@end + +typedef void(^NMBSourceCallbackBlock)(BOOL successful); diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m new file mode 100644 index 0000000..3381047 --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m @@ -0,0 +1,35 @@ +#import "NMBExceptionCapture.h" + +@interface NMBExceptionCapture () +@property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); +@property (nonatomic, copy) void(^ _Nullable finally)(void); +@end + +@implementation NMBExceptionCapture + +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally { + self = [super init]; + if (self) { + self.handler = handler; + self.finally = finally; + } + return self; +} + +- (void)tryBlock:(void(^ _Nonnull)(void))unsafeBlock { + @try { + unsafeBlock(); + } + @catch (NSException *exception) { + if (self.handler) { + self.handler(exception); + } + } + @finally { + if (self.finally) { + self.finally(); + } + } +} + +@end diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h new file mode 100644 index 0000000..7938bca --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h @@ -0,0 +1,18 @@ +@class NSString; + +/** + * Returns a string appropriate for displaying in test output + * from the provided value. + * + * @param anyObject A value that will show up in a test's output. + * + * @return The string that is returned can be + * customized per type by conforming a type to the `TestOutputStringConvertible` + * protocol. When stringifying a non-`TestOutputStringConvertible` type, this + * function will return the value's debug description and then its + * normal description if available and in that order. Otherwise it + * will return the result of constructing a string from the value. + * + * @see `TestOutputStringConvertible` + */ +extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result)); diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m new file mode 100644 index 0000000..31a80d6 --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m @@ -0,0 +1,11 @@ +#import "NMBStringify.h" + +#if __has_include("Nimble-Swift.h") +#import "Nimble-Swift.h" +#else +#import +#endif + +NSString *_Nonnull NMBStringify(id _Nullable anyObject) { + return [NMBStringer stringify:anyObject]; +} diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m new file mode 100644 index 0000000..35f26fd --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m @@ -0,0 +1,78 @@ +#import "CurrentTestCaseTracker.h" +#import +#import + +#pragma mark - Method Swizzling + +/// Swaps the implementations between two instance methods. +/// +/// @param class The class containing `originalSelector`. +/// @param originalSelector Original method to replace. +/// @param replacementSelector Replacement method. +void swizzleSelectors(Class class, SEL originalSelector, SEL replacementSelector) { + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method replacementMethod = class_getInstanceMethod(class, replacementSelector); + + BOOL didAddMethod = + class_addMethod(class, + originalSelector, + method_getImplementation(replacementMethod), + method_getTypeEncoding(replacementMethod)); + + if (didAddMethod) { + class_replaceMethod(class, + replacementSelector, + method_getImplementation(originalMethod), + method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, replacementMethod); + } +} + +#pragma mark - Private + +@interface XCTestObservationCenter (Private) +- (void)_addLegacyTestObserver:(id)observer; +@end + +@implementation XCTestObservationCenter (Register) + +/// Uses objc method swizzling to register `CurrentTestCaseTracker` as a test observer. This is necessary +/// because Xcode 7.3 introduced timing issues where if a custom `XCTestObservation` is registered too early +/// it suppresses all console output (generated by `XCTestLog`), breaking any tools that depend on this output. +/// This approach waits to register our custom test observer until XCTest adds its first "legacy" observer, +/// falling back to registering after the first normal observer if this private method ever changes. ++ (void)load { + if (class_getInstanceMethod([self class], @selector(_addLegacyTestObserver:))) { + // Swizzle -_addLegacyTestObserver: + swizzleSelectors([self class], @selector(_addLegacyTestObserver:), @selector(NMB_original__addLegacyTestObserver:)); + } else { + // Swizzle -addTestObserver:, only if -_addLegacyTestObserver: is not implemented + swizzleSelectors([self class], @selector(addTestObserver:), @selector(NMB_original_addTestObserver:)); + } +} + +#pragma mark - Replacement Methods + +/// Registers `CurrentTestCaseTracker` as a test observer after `XCTestLog` has been added. +- (void)NMB_original__addLegacyTestObserver:(id)observer { + [self NMB_original__addLegacyTestObserver:observer]; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [self addTestObserver:[CurrentTestCaseTracker sharedInstance]]; + }); +} + +/// Registers `CurrentTestCaseTracker` as a test observer after `XCTestLog` has been added. +/// This method is only used if `-_addLegacyTestObserver:` is not impelemented. (added in Xcode 7.3) +- (void)NMB_original_addTestObserver:(id)observer { + [self NMB_original_addTestObserver:observer]; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [self NMB_original_addTestObserver:[CurrentTestCaseTracker sharedInstance]]; + }); +} + +@end diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..077a612 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,2033 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 018864A73390C82701E07D266F0866D7 /* ProvidingFailureHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98BFA95B57C0519F47994525238394C8 /* ProvidingFailureHandler.swift */; }; + 01C31A4E2026DF827A77ABE56B9AFB35 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60401929E8CF6C12952EEF36B1230F82 /* Predicate.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 03B6F1701A8BA849FFA43BE800291889 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2E0F70C34DFC7C224A2D521C5D3378F /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 06BCD9EE02FB7CBB586BE04236F5620E /* ToSucceed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CBFCF4DAC9187955B8D3FC392F4AD6 /* ToSucceed.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 098D8AE79001AD6EF1EF989A633468F3 /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = F1F6031C1C4D5195BB0ECFF91D119445 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0B0E50E7BF2E185B43ED14B7A00D8D03 /* Logger.FormatSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = E988CFC9818BDD6BFFADE15A357C9AAD /* Logger.FormatSettings.swift */; }; + 0B34C608724F747CD8F93FB53F5F49C9 /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 3BC4FACC1FDC434864B89252BE64A045 /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 0C307890251F3077589AB54D84A6DE35 /* Mocking.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8295E8D9913B1CD6CB037D3B26B63517 /* Mocking.swift */; }; + 0DEFD2DC1A85AA3BEBF8214E9242533B /* GivenWhenThen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 313F49CEAC0CE718CFEA9961BAB64860 /* GivenWhenThen.swift */; }; + 1065D93D11A8CD9AE108294EA91E83B7 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC9804E380AA78EC1F6688BF1176C8F6 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 122DA1F3CD6F169E64242389F57EA893 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BF5E94E9AA2FCA71C4EACA086C29055 /* ExampleHooks.swift */; }; + 12B59D0DD2090B179C402CCACE06EB0D /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75A8FC1E098DBD74529C653016CECA81 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 14CE14F2C66C5F9DC6999E211C6CDFAE /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E1B385074C6B5440CD8F5FD47C381016 /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 152330DDB60C36602FEDEE5021003744 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */; }; + 15634BD678E9CD8936A7B95DFE92AF0A /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = B474BB5F629252EF7E5FFD151D16418C /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 15B22CF4DD40180F7FBDDBFE2B286E29 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F209138633BB8E86EC162B228443B7 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 1653546432C449256620F4ED0B22636E /* Logger.Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78D52577A7E91A0D2B90F9BFA9A14200 /* Logger.Settings.swift */; }; + 18FC6ABAF170EA74560400C390234EF6 /* InjectableLoggers.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 400B8C63B693BB12212DA5B73AE3B547 /* InjectableLoggers.framework */; }; + 1C66C5A1A9233D020B76703EEC9F66A9 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58B6C3A14FD06D91BD8CD40975CF4FC7 /* Logger.swift */; }; + 1DEC54BE29857CD0BE09545E7B2ABD5F /* QuickGWT-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 306F72DCBE60767B6646FFB13B493FC6 /* QuickGWT-dummy.m */; }; + 209743E009847E46770B3FA3743D70EA /* HasDefaultLoglevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C99D910567F961A1AD99782C32D13CE5 /* HasDefaultLoglevel.swift */; }; + 20EBF575D35CC04D8E988F6C5CB2489A /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D781B42A634E50EF738D2CF48CDB94C /* ExampleGroup.swift */; }; + 22890514898BDB4ABD565141777D40DC /* CwlMachBadInstructionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B9D3BC9BA1C63990B91F3B82822AC45 /* CwlMachBadInstructionHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 23CEDDDB910F4352D56D618A380D6334 /* MockNStub-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7225935A2AE6A0FF527402F3E2257B09 /* MockNStub-dummy.m */; }; + 27C8A329E646E6458985A975C778C77A /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1534053E1FA2F3CF68BF5D307C5153A /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 28B983A5CEB2097860B2A9C87433B168 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9568BB9556077DF7E61F03D800C6B564 /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 29C2F8DFFC0A563F68EA86AB0534230B /* CwlMachBadInstructionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 846DEE33F6628AC89004595FBA0233A9 /* CwlMachBadInstructionHandler.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2FB6BA9A20EAD83ED75324F472C25203 /* CanLogAtLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F7834B01794AB064D7252E4FDCD69D7 /* CanLogAtLevel.swift */; }; + 32B77CC02537C1F23AE338A5748E31D5 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98AFBEDD4F2A44B5BD1E5631E6587AE8 /* Functional.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3477DB5CDD7DA17BF63947AD67352066 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A874ED0A1640F553BCEEFD6B326DF0C /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 349B0FB47AB0DB459DC27CD51887CB1A /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEFA33863E2E6E19569B8ACF1A553269 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 36BA5729D64AEBFD13F7BEDB0AA5565D /* Logger.Formatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3770A51E6E5FC80AD96A28EBCD9B938A /* Logger.Formatter.swift */; }; + 3A45D5C4EFF69B3DB93B312763EBCECB /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51085F09C2CC04B86EBFEAE5B16A95DF /* World+DSL.swift */; }; + 3BEFF176C6E691040D03D9D71B06CE08 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9B56EE99DF3F120A6DD5E7BA00EEF38 /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3F51C82E6D3DAA4BA10B811C8EEBE45B /* logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B25FB292C98130C1F75CD6FB55C1A7 /* logger.swift */; }; + 4036AB2ED3330BC9D2AFED23DAD3135C /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 92B1283B94BA5788966045A92B62FA8C /* QuickConfiguration.m */; }; + 40B3C6F5B35BD86B0F70A99F98A60C16 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9736E6F37EC15C0B621F2973028BB08F /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4109E61407960E23A195BBB4AB44399A /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = C58B84600030A0BEC61F5DEFDF4F1BE7 /* SuiteHooks.swift */; }; + 41E44158F2DFCDADF215F3E52AAF4977 /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BB3805CE87F95375647F4ABDA56E3E54 /* Quick-dummy.m */; }; + 428F828E1B807F495EFB4CDE65704DCF /* Call.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30976A1237D2CDE329DB1277B03C6594 /* Call.swift */; }; + 429A13230D19A50F73E1A8EB94FF149B /* CanLogMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 169D4F2D5E2FDB20177FB5889E22DE1C /* CanLogMessage.swift */; }; + 4357841DB0A714BAD8992D976217514D /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2D62CD6100BB22D4EE5B8B6665EF305 /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4A47AE0BE4B554778D81B3A452F2744D /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B955E1B977A2B0182E4B1EAE9EB55C3 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4BBE70FE76B9605203B5EE68D5BD06D2 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C994D1E1EF1A3F1D96025B9062C7C82 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4D204E838F7F4BEB7AE9951B22CE8E11 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = C002DEDDBF0AEBA7622A42A18EA2B339 /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4D82A0BF2A4412E0C7EC4B69B4790028 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42BAE53097A2F59F61A51B3B1F512F3B /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 506DFBBF0B9B18E5F0B5E3D8C3BCBF69 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE23FDABB750E5899876968079D7AB83 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 526509443652A8F603FA668B459084D3 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 262CAE8A375E065FBB2B31CC190CF004 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 57937D2AAEC77BC9F8041E02FACCA244 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49C7D9730BBC84CFB92984C0F78F511B /* DSL.swift */; }; + 57A927970468105815CFE7C81DAE35FB /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AC24E5A820A2C62A0E96BC70C0943B8 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5C7C2FB9F88BA5CA268333E7FAF37941 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAA1C1B57C3FBCF8D9807761AA4F6899 /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5F0AC651126D166035178D0ECCC3940E /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE16831F4355F83520FB62D2AD4D126F /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 608FDED55DE565C2B7A6E5EFD204E952 /* CallValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE43721C2B5DE2B9766E214F8E0FA71C /* CallValue.swift */; }; + 60F1592522B3EF48D360BAC2F07598C5 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = A164B354A9E0E4CD5DECC560D1E7B18F /* ExampleMetadata.swift */; }; + 6495D3D712DD95ABF1A53CEC53F4B73E /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF9E6726344A279F6F2F8E0127BBCD6E /* ExpectationMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 65D1B9844C9369A9A5712CE94B123C0F /* Pods-QuickGWT_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AE5AAB38486FEB86CEDFAA2F7130650 /* Pods-QuickGWT_Tests-dummy.m */; }; + 67B25949591BFDE62C07639E48937C76 /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = 15F917369B9519A5EBB0145974C26040 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6852759AC10BB0060A63DBD4A0B9998A /* InjectableLoggers-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6880094977294312D8C67C08094FC435 /* InjectableLoggers-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 69CC99A89E679EF1BD36D814C49176F9 /* MockNStub-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FC1FA888436FCB51B1BFB1EFC5B423EC /* MockNStub-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6A0D182778DCCC8570603F553C85BD43 /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EDB02877444787DC788B766F9BD6BE7 /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6A94A38AB52FEDAE3380063B1660974E /* FailingWithMessageAtLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91788471312581EDA9530B4B0806F343 /* FailingWithMessageAtLocation.swift */; }; + 6AA60FF674D9B576608725BBEF05E39F /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A299DC019B1690C26841D60730EC73 /* NSBundle+CurrentTestBundle.swift */; }; + 6C94EB8CE00D39BE9B8F032B9CA1644F /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = C85E715CB46597B392E7BA86BD25689E /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6CCE249EF179194D40C57AF3F82807AA /* ArgumentMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767ED28D57AFD3D05B1B44F9A328019E /* ArgumentMatcher.swift */; }; + 7269A6F3E4E3C509575C60D5430B295F /* NSString+C99ExtendedIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDE982C80AD7248C8BADB4FC9DD8DF89 /* NSString+C99ExtendedIdentifier.swift */; }; + 73F2D6FA68757FF9FC49E5C877271E16 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECE0F31D2F7D79160644A2C5EDC9CE8A /* XCTest.framework */; }; + 75B8ADFED3092729A652DB26249CE399 /* LogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDEF3575EB2297C91008EC4B58D59052 /* LogLevel.swift */; }; + 76CF15A131981D754A9761F26E2C914C /* InjectableLoggers-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E0204A61032F22F7FEB4D8EA0ECB7B /* InjectableLoggers-dummy.m */; }; + 7A3A5B455EE392A3B03B31C3AE360B14 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E470840B26BA9F4DCA75D207DA093C /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 7B98A95E9869FEE6BF6AE861E9D17960 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E60A5ED53FC6FF735751E56B087AB7 /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 7D4DB2338A5EB74DDFE7993706E6EC45 /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276EC1B8FF7166E2772C848EAA154375 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 7DD8588A6B05B63E0E98CF49DD69130D /* anyArgumentMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CFFBF7EAB39156810B79A7F3647E07C /* anyArgumentMatcher.swift */; }; + 7F07BB7F86030007DEC079079126022A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */; }; + 7F477C7A76B7970A8A07B476578EA3AB /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 362EDF2A7BE579259C861481ED8038C8 /* URL+FileName.swift */; }; + 7FC781FE797BCA000EE0E9E15514BC80 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D11AA5C547A50E41B21159B25C987F4B /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8198412E6E77FD0071B634C053F9D3EF /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9170DB8275C5C4C297E32DE1B5F8F84 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 83765EE19CDF5838473FBA1896421351 /* ConsoleLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42022805437EB7B656115B30DF977418 /* ConsoleLogger.swift */; }; + 83E789EC0F6A6A97DEC9EA9D8292CF1E /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9659D948EDA04AAFE09930D035157EDE /* Closures.swift */; }; + 84C4C044D2AB159E464FE441032CCB04 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42498CFD917359B06B0345B85AD5235E /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 869E7FD5708F53F16D21CFBF82ACFC68 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A728D1194039680D5982ADAE9EF60EC /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 89CC5CA95F489570B8C903B00A46E950 /* dumpValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13342B658C16AA7E64D61E15E161F883 /* dumpValue.swift */; }; + 8A2643B9C46C3AF664B4ADA0C3B62EB1 /* MockLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01B5534DE36821963F9AF0B527C3BD1 /* MockLogger.swift */; }; + 8B0DA2043B645F0BCFCAA1FD99AFE583 /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73139A49A0A8E397FBB9734FF04E5FD6 /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8C71B1B23DF0545A8B2B6538C2759C56 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D4F19D57A1F853437EA7B8821231680 /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8EF4384E49DF7C150E1601D5B945634B /* ProvidingMutableVerifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B8E76026C12934F3E6CC852580939F /* ProvidingMutableVerifications.swift */; }; + 8F0C9976CC7359BF9B175D47060879B5 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = E23BD49832C2546CADEE52250E30D484 /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8F9E21FFAB12456CE8339933BAD71EE0 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6721D8E01CF54C4C85BFD79E4923C0A /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 9175CC691DE972B92894B8D0DEB13739 /* CanLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB230589D89B2E3B594E2E901F060F91 /* CanLog.swift */; }; + 93CE29275F0BE5351C5DD832ED976339 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */; }; + 940D75CE09CAC444F515F4B254DF2B09 /* CanLogMessageAtLevelInFileInFunctionAtLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35210D610DF914B715F3FEE975A517C3 /* CanLogMessageAtLevelInFileInFunctionAtLine.swift */; }; + 9A7A842C9C62B621929FB33250E5F358 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68F1E4E143C4FBF89AC20C17927D0FE6 /* Filter.swift */; }; + 9ABA41C834A34FFDA62989C98470072E /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 78D2C051F2FF31D2F91EE6D39EA6C0F7 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9ADADCF7CDA2EF9F1A2773847B10CC83 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1344D49B368308E24997AB94C21A628 /* AsyncMatcherWrapper.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 9B5B9224DE5682663DC11E210B43A139 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A363CFBF544F230889D3997B8C8994A6 /* HooksPhase.swift */; }; + 9BF7EDA323A0950E2CAF7D02885DC8C0 /* SimpleLogger.Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = B515A16EE724A8D3CAC9A508A2B77368 /* SimpleLogger.Settings.swift */; }; + 9E4E3A5F863322689F6C39FA38F6B646 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 791DF057FF8297801B3E2CE1AAEED692 /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 9E675CD0BCF84741731E3D521C9FAD0C /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E6CDD0BCBFCA7AF6C2B248D22D8FA5 /* Example.swift */; }; + 9F2948B6F885A25543A83857D6CCDC64 /* ProvidingMutableCallValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4A7273DFDC6B561A271815D85876DD5 /* ProvidingMutableCallValues.swift */; }; + A070602233E5F2A60DDC12B8036CA92E /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC08B3EE2D6B32F3C3D4CC1AE231A3D /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A15AFD759A553290981E3C4A991A51AD /* SimpleLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B2AE89B9B877266C313D3753848FF9F /* SimpleLogger.swift */; }; + A20E66DCD328707AA5F81D17C917FB2A /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 59D47F4E5656B8D7AC8559D76AA5B7EA /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A21830577946E1343C0A5E92CF03C212 /* Behavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE9FE8937E61B39A011307CFD78EC790 /* Behavior.swift */; }; + A22386BB6CA63458A5831337209A27E5 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B7B0B7300D7B337A5F69169D6989919 /* World.swift */; }; + A319BE0010C3E28A081501DEC02D460B /* CanFormatMessageInFileInFunctionAtLineWithSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 603DEF3EDF9E63524EB047FBE4640765 /* CanFormatMessageInFileInFunctionAtLineWithSettings.swift */; }; + A4D64EDED77E7308F59DED7D9488545C /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86AFB3DD5F9EEC451E446F0A7BC7DCCB /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A662E57A1C1F0E31E5E2EC30187A5596 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6216585A200B6927769CB485B308B725 /* Configuration.swift */; }; + AA5FA0403350B4B71D7F342926DFB5AF /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E4222672DF02D620AFFB5260E60AD9A /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AA6394C34F8B3F81F62F734981ADEC8D /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65578426C10DE97EA215C2E531F59FCB /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AB11A6650E6100CDFD7B1E753C8E868C /* Stubbing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A5BF23F8E10AE6C8537E42004EB2B97 /* Stubbing.swift */; }; + AC229B69DA2385D8E2870C45EBC69208 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0383AEE0729CA5B0EE80CCED01B3B6CA /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AF4431ADC9FB068B56C0479838CD7A18 /* ContainElementSatisfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 876B8162ED4A9701E1761CBB6C18011D /* ContainElementSatisfying.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AFDFCA9333A00E08425F0B0E0A4467F0 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AE234C73630AA678E38C650B3E2E5CD /* QuickSpec.m */; }; + B0093B514EDB9EB563B13ABFDDD554E0 /* Pods-QuickGWT_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EAD944BC016958A5068272D95EFA495 /* Pods-QuickGWT_Example-dummy.m */; }; + B1C804085D19FE550ABB742D21CE1430 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 700A7B9639F19F846F996027ACB66DEA /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B2115E6040261C1F17978C027155C7EF /* CanLogMessageAtLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2B480F4DBC09B733BBE869CCED6E1A2 /* CanLogMessageAtLevel.swift */; }; + B4D156C66C393987CE0402F6FF39DFAA /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A5BA309ACD7543025B311DB5F3E75FF /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B921141CD9A5981444EAA8777D243249 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B114C0B24D596A6162E6651746BB2CE /* XCTestSuite+QuickTestSuiteBuilder.m */; }; + B92F0C603E11CE14B6D4A725EA9726AA /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CCC4FE0CFDF388440DAA135CFA68931 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BB03B57C3B3889F76051B0986B03CE89 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = EE0D2D6CF2C4B7F4852B6249CAEDDA54 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BB05879CADE17504C87FCE3CCC004BFE /* isOptionalType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3141C171D5496A33E2B3CC177B0F353B /* isOptionalType.swift */; }; + BDCBCB95C3E0B412F64D354D4DDEB2D2 /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CB7C347657D6537FE9971F63057279 /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BEFEB55033728BFCA1438907FBC65FCB /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793FFB630A98C7D1F89D05310684AAD4 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BF53390ADD246D857B0BBFB029206DD3 /* Location.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92CE10F3B72700B8889D99DA5AAA6D63 /* Location.swift */; }; + BFE90E97BBEED93AE6AE6E312F267FF5 /* Quick.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC7CA61012AD510A1FD7EFE97B56975A /* Quick.framework */; }; + C056FC6D6C3054024DAA2952A383472D /* CurrentTestCaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A1981E56B828220EC300AFA104865E8 /* CurrentTestCaseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C1B2371C54FD3C39D577334D76396900 /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F6CEA4FD5081706131FD449E787B865A /* Nimble-dummy.m */; }; + C1E78D2DAB7B4F1AAC33876EDF9A9491 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 480FA9EEA32F0E64887F3C3DE796E4D9 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C2D835CA8A8DA664F8943F332E05A75F /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C9A8DA22EE0BD32114BD7AB8C2DDD7F /* Callsite.swift */; }; + C468CD787C38E4BF30063D0E77BE7129 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D7103D3DB114389E21A5ECCD3599401 /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C68E7E201AD841088FDF73EA317A6A72 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */; }; + C7D78251885132569892BDFB2B4B560B /* CanLogMessageInFileInFunctionAtLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD69F17D02A0FDBE671E877C8628B891 /* CanLogMessageInFileInFunctionAtLine.swift */; }; + C86A76F1BDC5E9C386ACE8FBAE4925F4 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B264503FA772AF756A96D184126F9F1 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C977B0B70A5F9C6CAA106D2BD891D6C0 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A42352501382C44D87135DA16DC01E /* QuickSelectedTestSuiteBuilder.swift */; }; + CE165CCB91FAB45C82784F09AC5961E7 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42CF1968172CD9C397AB3307097F9B7E /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + CFBEED925B153A959B346A461B55FEFD /* QuickSpecBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E56E97EF6FA735C55AFFBF1A8276E45 /* QuickSpecBase.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D03B1993E81DD4DC81752FF0F7798EAB /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91EC42722B02A65F6E52B46EC946C2E3 /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D3A3634FD0E090CACDD7B50C56435404 /* ProvidingMutableCalls.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5004976D60359AEB42B74FEAC8E2E621 /* ProvidingMutableCalls.swift */; }; + D4B9FBB80E0E7A69810C07DF50B55F55 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */; }; + D86AE6EBFFB397F25ECD32D1C7F23B91 /* AsociatedKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A0B7DD9B7B46B551CCEC475E4F4CAF5 /* AsociatedKeys.swift */; }; + D88990C95625CCDD30C917905601925D /* XCTFailureHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C2280D700553B71EBD9FACA2B7E2B9 /* XCTFailureHandler.swift */; }; + D9020DA14F7E0D1E67447893F01CB440 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */; }; + D9679F33E0403FDF8D53F5A590ED3580 /* CwlPreconditionTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 7573FCB8C2B47049E6D245CFC97833CC /* CwlPreconditionTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DC3121A90955AA3F3B4BBE3B467C151F /* MatchingArguments.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BC9863BE469FE1AB96147CFBDD719C4 /* MatchingArguments.swift */; }; + DDE2B342857DCB11616D02A6DDC81240 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDF338F5FC22AA2E2A9206D3DF2FF504 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + DE5C13A4FF4E1FB01AE445D2F656E89B /* Array+tuple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7449CB294BFDB1F2686EE44CA6C060E5 /* Array+tuple.swift */; }; + E01C484D44F7BEDFF2C910515FC0E895 /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73D32ED9A2F37DD89087396E320FA22F /* QuickTestSuite.swift */; }; + E1CE677F1FBAA3B4EACED5D3C535F98A /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = B43A7F375CC7A8F18B3237E0DC33FCBB /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E2405EE065638510A04B278C3E59BF91 /* Verification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 871D2FB0675DD9FEC4C92CFF5F4421DA /* Verification.swift */; }; + E3BE217411A268C284BF700CF0CB39E1 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = D50E339EAB23B8D91F9D80F75E8B948D /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E4CBF5583074BCC509DBC560ADA31C8D /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 5649E4B93A341FBA65846BC85EE7F577 /* QCKDSL.m */; }; + E5BC364A6612B3DBAE4446DB2AF12F12 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68825119C66B16187D2C9A30536232D6 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + E7D22AF8519D8AD5D7E2B8623FB6F571 /* Pods-QuickGWT_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 612E4FB349FEAE14ABE7960E2893A190 /* Pods-QuickGWT_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E80BB5FEB529C0AB978807CDE789A580 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 414526CA518492640937A16160A5E0FE /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ED3C43ACDA1CACF5026E064AF9C09B5F /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0386315EA8CDF216F4A90BD136A66A0F /* ErrorUtility.swift */; }; + EF5F41C05C3AAF5A2326A0C3358938A2 /* Pods-QuickGWT_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3244C3D7877348A2EB7D74FE638C77E0 /* Pods-QuickGWT_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F01CC567ED28E2453CFA8D395FA357F8 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF1D68BF65115B4973886AB95C18A6D /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F0AEEC926BDBF27788266A262D41D0F2 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECE0F31D2F7D79160644A2C5EDC9CE8A /* XCTest.framework */; }; + F45C6C0BFB6CC8B53221BE457BB3C4DF /* SatisfyAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2147789E3C61905554ED8BE622A05DED /* SatisfyAllOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F76EBCE18A2F8B8606724ADF6835306B /* QuickSpecBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B8E0CF40B98BFD43970A0FE3AB7BDF5 /* QuickSpecBase.m */; }; + F7FC6F6CB2C67F1F2144B34516A360BD /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F27CCCD4EFFD03EFC0C23BD6C46FA01 /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F7FCED52B2E48BCC09E442ABB9A3F30E /* QuickGWT-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E3E44F40B276DD5758FF9CADDC2B3066 /* QuickGWT-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F81064D91F8C0DAB1602C0E8FAAA2BA7 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = E3264C019469B5509A4C4C47EDD3D463 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F936FD8B0D8F5432AFCB0602CEDC6586 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = C78901B75D38C26A6995B650153266B3 /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + FB4D015C5BA066A8B5533C82EF0F5F8D /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B8A8E39FD32E9CC474DFE9CF24162D /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + FDAF9547990137DA999B1AD1CFAB974C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 11015021C74B70830FAD18F04898DFEE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = C08D88D6FF727274C04E1676A3B89865; + remoteInfo = MockNStub; + }; + 82E764DC79F34333BA42EE0C00ABB9CC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D5CD245C01DC2C08B05F702A59D9D4A8; + remoteInfo = InjectableLoggers; + }; + 8D37FE59D349591A945A49D335BCC525 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7A1D901838772835B926373F48B959E5; + remoteInfo = Quick; + }; + A3F3D09944ACADD143BFAC56401290F4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D5CD245C01DC2C08B05F702A59D9D4A8; + remoteInfo = InjectableLoggers; + }; + A4DC0B14587306EF7727ACDB064863F8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 84B900852143C358F09CAEF776B1A86E; + remoteInfo = Nimble; + }; + DAC13C3EEA6AD0BD98F2882B1E81EFC6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = E2CA809DE79481CC9615FB051961FDC2; + remoteInfo = "Pods-QuickGWT_Example"; + }; + DDEBE2250636F7127ED86C4FF96B9813 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 92895CAF0A8E521127343E068C35C7A2; + remoteInfo = QuickGWT; + }; + FA4D3FA868B30F341E611BA9321DF3DE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7A1D901838772835B926373F48B959E5; + remoteInfo = Quick; + }; + FB6B8E8A2D73A1E48D2D144D51A2759F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D5CD245C01DC2C08B05F702A59D9D4A8; + remoteInfo = InjectableLoggers; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 02CBFCF4DAC9187955B8D3FC392F4AD6 /* ToSucceed.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToSucceed.swift; path = Sources/Nimble/Matchers/ToSucceed.swift; sourceTree = ""; }; + 02F6C2718B584F294E10D63154B94D04 /* Pods-QuickGWT_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-QuickGWT_Tests-resources.sh"; sourceTree = ""; }; + 0383AEE0729CA5B0EE80CCED01B3B6CA /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; + 0386315EA8CDF216F4A90BD136A66A0F /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; + 07E60A5ED53FC6FF735751E56B087AB7 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; + 0CE17CE6FE1C7DD0CAA5CBF05FAB6418 /* Pods-QuickGWT_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-QuickGWT_Example-resources.sh"; sourceTree = ""; }; + 0E22BEB48FBCF3193B4E2E2067956D20 /* Pods-QuickGWT_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-QuickGWT_Tests-acknowledgements.plist"; sourceTree = ""; }; + 103D4A21C5E5B8013C4C4223001EEC82 /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; + 13342B658C16AA7E64D61E15E161F883 /* dumpValue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = dumpValue.swift; path = MockNStub/Classes/Functions/dumpValue.swift; sourceTree = ""; }; + 13E0204A61032F22F7FEB4D8EA0ECB7B /* InjectableLoggers-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "InjectableLoggers-dummy.m"; sourceTree = ""; }; + 15F209138633BB8E86EC162B228443B7 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + 15F917369B9519A5EBB0145974C26040 /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/QuickObjectiveC/World.h; sourceTree = ""; }; + 169D4F2D5E2FDB20177FB5889E22DE1C /* CanLogMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CanLogMessage.swift; path = InjectableLoggers/Classes/ExtendedProtocols/CanLogMessage.swift; sourceTree = ""; }; + 16CC9C3ECE11ABB9AA73C93588CEB245 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1910382D5C46147AE5137212D7449541 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + 1A5BF23F8E10AE6C8537E42004EB2B97 /* Stubbing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stubbing.swift; path = "MockNStub/Classes/Extended Protocols/Stubbing.swift"; sourceTree = ""; }; + 1A874ED0A1640F553BCEEFD6B326DF0C /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; + 1AC24E5A820A2C62A0E96BC70C0943B8 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; + 1C994D1E1EF1A3F1D96025B9062C7C82 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; + 1EAD944BC016958A5068272D95EFA495 /* Pods-QuickGWT_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-QuickGWT_Example-dummy.m"; sourceTree = ""; }; + 2147789E3C61905554ED8BE622A05DED /* SatisfyAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAllOf.swift; path = Sources/Nimble/Matchers/SatisfyAllOf.swift; sourceTree = ""; }; + 25B8A8E39FD32E9CC474DFE9CF24162D /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; + 262CAE8A375E065FBB2B31CC190CF004 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; + 2652335735EAAF1E44D58C0D589EFF0B /* MockNStub.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = MockNStub.modulemap; sourceTree = ""; }; + 276EC1B8FF7166E2772C848EAA154375 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; + 28155CC0522094D381E188DFE5C6327E /* InjectableLoggers.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = InjectableLoggers.framework; path = InjectableLoggers.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 29CB7C347657D6537FE9971F63057279 /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h; sourceTree = ""; }; + 2AD8A279B0ECB45C58E207B27F784783 /* Pods_QuickGWT_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_QuickGWT_Tests.framework; path = "Pods-QuickGWT_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2BF5E94E9AA2FCA71C4EACA086C29055 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + 2D781B42A634E50EF738D2CF48CDB94C /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; + 2EDB02877444787DC788B766F9BD6BE7 /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; + 2F7834B01794AB064D7252E4FDCD69D7 /* CanLogAtLevel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CanLogAtLevel.swift; path = InjectableLoggers/Classes/ExtendedProtocols/CanLogAtLevel.swift; sourceTree = ""; }; + 306F72DCBE60767B6646FFB13B493FC6 /* QuickGWT-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "QuickGWT-dummy.m"; sourceTree = ""; }; + 30976A1237D2CDE329DB1277B03C6594 /* Call.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Call.swift; path = MockNStub/Classes/Structs/Call.swift; sourceTree = ""; }; + 313F49CEAC0CE718CFEA9961BAB64860 /* GivenWhenThen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GivenWhenThen.swift; path = QuickGWT/Classes/GivenWhenThen.swift; sourceTree = ""; }; + 3141C171D5496A33E2B3CC177B0F353B /* isOptionalType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = isOptionalType.swift; path = MockNStub/Classes/Functions/isOptionalType.swift; sourceTree = ""; }; + 31B79F731CD2687985535653F1F82FC2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3244C3D7877348A2EB7D74FE638C77E0 /* Pods-QuickGWT_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-QuickGWT_Example-umbrella.h"; sourceTree = ""; }; + 35210D610DF914B715F3FEE975A517C3 /* CanLogMessageAtLevelInFileInFunctionAtLine.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CanLogMessageAtLevelInFileInFunctionAtLine.swift; path = InjectableLoggers/Classes/Protocols/CanLogMessageAtLevelInFileInFunctionAtLine.swift; sourceTree = ""; }; + 362EDF2A7BE579259C861481ED8038C8 /* URL+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+FileName.swift"; path = "Sources/Quick/URL+FileName.swift"; sourceTree = ""; }; + 3737D79C462F775E30AE09DBFFA00A12 /* InjectableLoggers.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = InjectableLoggers.modulemap; sourceTree = ""; }; + 3770A51E6E5FC80AD96A28EBCD9B938A /* Logger.Formatter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Logger.Formatter.swift; path = InjectableLoggers/Classes/Structs/Logger.Formatter.swift; sourceTree = ""; }; + 3AE5AAB38486FEB86CEDFAA2F7130650 /* Pods-QuickGWT_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-QuickGWT_Tests-dummy.m"; sourceTree = ""; }; + 3BC4FACC1FDC434864B89252BE64A045 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mach_excServer.c; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c; sourceTree = ""; }; + 3D7103D3DB114389E21A5ECCD3599401 /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; + 3EC87580F0CF0F5D88836A821C8E330B /* Pods-QuickGWT_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-QuickGWT_Example.release.xcconfig"; sourceTree = ""; }; + 400B8C63B693BB12212DA5B73AE3B547 /* InjectableLoggers.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = InjectableLoggers.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 414526CA518492640937A16160A5E0FE /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; + 42022805437EB7B656115B30DF977418 /* ConsoleLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConsoleLogger.swift; path = InjectableLoggers/Classes/Structs/ConsoleLogger.swift; sourceTree = ""; }; + 42498CFD917359B06B0345B85AD5235E /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; + 42BAE53097A2F59F61A51B3B1F512F3B /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; + 42CF1968172CD9C397AB3307097F9B7E /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; + 480FA9EEA32F0E64887F3C3DE796E4D9 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; + 49C7D9730BBC84CFB92984C0F78F511B /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; + 4A0B7DD9B7B46B551CCEC475E4F4CAF5 /* AsociatedKeys.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsociatedKeys.swift; path = MockNStub/Classes/Structs/AsociatedKeys.swift; sourceTree = ""; }; + 4A5BA309ACD7543025B311DB5F3E75FF /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; + 4AE234C73630AA678E38C650B3E2E5CD /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; + 4B264503FA772AF756A96D184126F9F1 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; + 4B7B0B7300D7B337A5F69169D6989919 /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; + 4D4F19D57A1F853437EA7B8821231680 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; + 5004976D60359AEB42B74FEAC8E2E621 /* ProvidingMutableCalls.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ProvidingMutableCalls.swift; path = MockNStub/Classes/Protocols/ProvidingMutableCalls.swift; sourceTree = ""; }; + 51085F09C2CC04B86EBFEAE5B16A95DF /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; + 52B8E76026C12934F3E6CC852580939F /* ProvidingMutableVerifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ProvidingMutableVerifications.swift; path = MockNStub/Classes/Protocols/ProvidingMutableVerifications.swift; sourceTree = ""; }; + 5649E4B93A341FBA65846BC85EE7F577 /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; + 57A42352501382C44D87135DA16DC01E /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; + 58B6C3A14FD06D91BD8CD40975CF4FC7 /* Logger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Logger.swift; path = InjectableLoggers/Classes/Classes/Logger.swift; sourceTree = ""; }; + 59D47F4E5656B8D7AC8559D76AA5B7EA /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; + 5A1981E56B828220EC300AFA104865E8 /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CurrentTestCaseTracker.h; path = Sources/NimbleObjectiveC/CurrentTestCaseTracker.h; sourceTree = ""; }; + 5B8E0CF40B98BFD43970A0FE3AB7BDF5 /* QuickSpecBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpecBase.m; path = Sources/QuickSpecBase/QuickSpecBase.m; sourceTree = ""; }; + 5F27CCCD4EFFD03EFC0C23BD6C46FA01 /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m; sourceTree = ""; }; + 5F2E7B48187A081B65D8B9CC54B83DFA /* QuickGWT.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = QuickGWT.modulemap; sourceTree = ""; }; + 603DEF3EDF9E63524EB047FBE4640765 /* CanFormatMessageInFileInFunctionAtLineWithSettings.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CanFormatMessageInFileInFunctionAtLineWithSettings.swift; path = InjectableLoggers/Classes/Protocols/CanFormatMessageInFileInFunctionAtLineWithSettings.swift; sourceTree = ""; }; + 60401929E8CF6C12952EEF36B1230F82 /* Predicate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Predicate.swift; path = Sources/Nimble/Matchers/Predicate.swift; sourceTree = ""; }; + 612E4FB349FEAE14ABE7960E2893A190 /* Pods-QuickGWT_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-QuickGWT_Tests-umbrella.h"; sourceTree = ""; }; + 6216585A200B6927769CB485B308B725 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; + 65578426C10DE97EA215C2E531F59FCB /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; + 6880094977294312D8C67C08094FC435 /* InjectableLoggers-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "InjectableLoggers-umbrella.h"; sourceTree = ""; }; + 68825119C66B16187D2C9A30536232D6 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; + 68F1E4E143C4FBF89AC20C17927D0FE6 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; + 6B955E1B977A2B0182E4B1EAE9EB55C3 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; + 6BC266D4ED2395728A020F521D9C6D4D /* QuickGWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = QuickGWT.framework; path = QuickGWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 700A7B9639F19F846F996027ACB66DEA /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; + 7225935A2AE6A0FF527402F3E2257B09 /* MockNStub-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MockNStub-dummy.m"; sourceTree = ""; }; + 73139A49A0A8E397FBB9734FF04E5FD6 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; + 73D32ED9A2F37DD89087396E320FA22F /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; + 7449CB294BFDB1F2686EE44CA6C060E5 /* Array+tuple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+tuple.swift"; path = "MockNStub/Classes/Extensions/Array+tuple.swift"; sourceTree = ""; }; + 7573FCB8C2B47049E6D245CFC97833CC /* CwlPreconditionTesting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlPreconditionTesting.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h; sourceTree = ""; }; + 75A8FC1E098DBD74529C653016CECA81 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; + 75F48CD5F3AF8D360F63A41B2A13C1C4 /* Pods-QuickGWT_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-QuickGWT_Tests.release.xcconfig"; sourceTree = ""; }; + 767ED28D57AFD3D05B1B44F9A328019E /* ArgumentMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ArgumentMatcher.swift; path = MockNStub/Classes/Classes/ArgumentMatcher.swift; sourceTree = ""; }; + 77946F7F59BD84341932D55B8298B985 /* InjectableLoggers-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "InjectableLoggers-prefix.pch"; sourceTree = ""; }; + 789442442E420A73A87935D93A22CC33 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 78D2C051F2FF31D2F91EE6D39EA6C0F7 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; + 78D52577A7E91A0D2B90F9BFA9A14200 /* Logger.Settings.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Logger.Settings.swift; path = InjectableLoggers/Classes/Structs/Logger.Settings.swift; sourceTree = ""; }; + 791DF057FF8297801B3E2CE1AAEED692 /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; + 793FFB630A98C7D1F89D05310684AAD4 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; + 7A728D1194039680D5982ADAE9EF60EC /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; + 7B9D3BC9BA1C63990B91F3B82822AC45 /* CwlMachBadInstructionHandler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlMachBadInstructionHandler.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h; sourceTree = ""; }; + 7C4CE4B11092A5FA44C513672AC875D5 /* Pods-QuickGWT_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-QuickGWT_Example.modulemap"; sourceTree = ""; }; + 7C9A8DA22EE0BD32114BD7AB8C2DDD7F /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; + 7CFFBF7EAB39156810B79A7F3647E07C /* anyArgumentMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = anyArgumentMatcher.swift; path = "MockNStub/Classes/Shared Instances/anyArgumentMatcher.swift"; sourceTree = ""; }; + 7D1B05B187EEBB71FD88ABCB8512906C /* Pods-QuickGWT_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-QuickGWT_Example-acknowledgements.markdown"; sourceTree = ""; }; + 7E6EF001F145625349D09D3C53596929 /* Pods-QuickGWT_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-QuickGWT_Example.debug.xcconfig"; sourceTree = ""; }; + 7EA28BC46EEE71E2A8DA04F17C10FB0F /* Pods-QuickGWT_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-QuickGWT_Tests.modulemap"; sourceTree = ""; }; + 8295E8D9913B1CD6CB037D3B26B63517 /* Mocking.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mocking.swift; path = "MockNStub/Classes/Extended Protocols/Mocking.swift"; sourceTree = ""; }; + 846DEE33F6628AC89004595FBA0233A9 /* CwlMachBadInstructionHandler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlMachBadInstructionHandler.m; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m; sourceTree = ""; }; + 86AFB3DD5F9EEC451E446F0A7BC7DCCB /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; + 871D2FB0675DD9FEC4C92CFF5F4421DA /* Verification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Verification.swift; path = MockNStub/Classes/Structs/Verification.swift; sourceTree = ""; }; + 876B8162ED4A9701E1761CBB6C18011D /* ContainElementSatisfying.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContainElementSatisfying.swift; path = Sources/Nimble/Matchers/ContainElementSatisfying.swift; sourceTree = ""; }; + 89C2280D700553B71EBD9FACA2B7E2B9 /* XCTFailureHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = XCTFailureHandler.swift; path = MockNStub/Classes/Structs/XCTFailureHandler.swift; sourceTree = ""; }; + 8D676D5C838759971BB1604716DA23DF /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nimble.framework; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8EBFA29C1329CD64197DF6F6F9FABF40 /* Pods-QuickGWT_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-QuickGWT_Example-frameworks.sh"; sourceTree = ""; }; + 906BB8EB0D033BC0D30EEBA49F188F8C /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Quick.framework; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 91788471312581EDA9530B4B0806F343 /* FailingWithMessageAtLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailingWithMessageAtLocation.swift; path = MockNStub/Classes/Protocols/FailingWithMessageAtLocation.swift; sourceTree = ""; }; + 91A299DC019B1690C26841D60730EC73 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; + 91EC42722B02A65F6E52B46EC946C2E3 /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/NMBObjCMatcher.swift; sourceTree = ""; }; + 92AF69A2C7F0E30401A4815A535E58E9 /* MockNStub.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MockNStub.xcconfig; sourceTree = ""; }; + 92B1283B94BA5788966045A92B62FA8C /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; + 92CE10F3B72700B8889D99DA5AAA6D63 /* Location.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Location.swift; path = MockNStub/Classes/Structs/Location.swift; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9568BB9556077DF7E61F03D800C6B564 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; + 95E470840B26BA9F4DCA75D207DA093C /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; + 9659D948EDA04AAFE09930D035157EDE /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; + 9736E6F37EC15C0B621F2973028BB08F /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; + 98AFBEDD4F2A44B5BD1E5631E6587AE8 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; + 98BFA95B57C0519F47994525238394C8 /* ProvidingFailureHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ProvidingFailureHandler.swift; path = "MockNStub/Classes/Extended Protocols/ProvidingFailureHandler.swift"; sourceTree = ""; }; + 9ADACF7E829F47A77780939FE62702EA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9B114C0B24D596A6162E6651746BB2CE /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; + 9B2AE89B9B877266C313D3753848FF9F /* SimpleLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SimpleLogger.swift; path = InjectableLoggers/Classes/Classes/SimpleLogger.swift; sourceTree = ""; }; + 9BC9863BE469FE1AB96147CFBDD719C4 /* MatchingArguments.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchingArguments.swift; path = MockNStub/Classes/Protocols/MatchingArguments.swift; sourceTree = ""; }; + 9CCC4FE0CFDF388440DAA135CFA68931 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; + 9E4222672DF02D620AFFB5260E60AD9A /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; + 9E56E97EF6FA735C55AFFBF1A8276E45 /* QuickSpecBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpecBase.h; path = Sources/QuickSpecBase/include/QuickSpecBase.h; sourceTree = ""; }; + A1344D49B368308E24997AB94C21A628 /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; + A164B354A9E0E4CD5DECC560D1E7B18F /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; + A1BBCE76440EE9FDFFA753BED858C43C /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; + A2D62CD6100BB22D4EE5B8B6665EF305 /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; + A2E0F70C34DFC7C224A2D521C5D3378F /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; + A363CFBF544F230889D3997B8C8994A6 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; + AA70315B21C71A6216B62FCB892A768E /* QuickGWT.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = QuickGWT.xcconfig; sourceTree = ""; }; + AC9804E380AA78EC1F6688BF1176C8F6 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; + AE23FDABB750E5899876968079D7AB83 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; + AE9FE8937E61B39A011307CFD78EC790 /* Behavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Behavior.swift; path = Sources/Quick/Behavior.swift; sourceTree = ""; }; + B2B524DE6D9E1F6E721C7061CEC30764 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Nimble.modulemap; sourceTree = ""; }; + B342C15296ECE2544971DC90537AAEC8 /* Pods_QuickGWT_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_QuickGWT_Example.framework; path = "Pods-QuickGWT_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + B43A7F375CC7A8F18B3237E0DC33FCBB /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; + B474BB5F629252EF7E5FFD151D16418C /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; + B4A7273DFDC6B561A271815D85876DD5 /* ProvidingMutableCallValues.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ProvidingMutableCallValues.swift; path = MockNStub/Classes/Protocols/ProvidingMutableCallValues.swift; sourceTree = ""; }; + B515A16EE724A8D3CAC9A508A2B77368 /* SimpleLogger.Settings.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SimpleLogger.Settings.swift; path = InjectableLoggers/Classes/Structs/SimpleLogger.Settings.swift; sourceTree = ""; }; + B9B56EE99DF3F120A6DD5E7BA00EEF38 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; + BAA1C1B57C3FBCF8D9807761AA4F6899 /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; + BAB8534903FA3D65DC1D2450957DA182 /* Pods-QuickGWT_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-QuickGWT_Tests-acknowledgements.markdown"; sourceTree = ""; }; + BB3805CE87F95375647F4ABDA56E3E54 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; + BCE063628FC457020690501527904F64 /* Pods-QuickGWT_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-QuickGWT_Tests.debug.xcconfig"; sourceTree = ""; }; + BDD129B9511D4129CFE8ECE702B2178C /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; + C002DEDDBF0AEBA7622A42A18EA2B339 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; + C01B5534DE36821963F9AF0B527C3BD1 /* MockLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MockLogger.swift; path = InjectableLoggers/Classes/Classes/MockLogger.swift; sourceTree = ""; }; + C3B25FB292C98130C1F75CD6FB55C1A7 /* logger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = logger.swift; path = "MockNStub/Classes/Shared Instances/logger.swift"; sourceTree = ""; }; + C58B84600030A0BEC61F5DEFDF4F1BE7 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; + C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + C6721D8E01CF54C4C85BFD79E4923C0A /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; + C78901B75D38C26A6995B650153266B3 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; + C85B89FC05494B9947177955249D1C2C /* QuickGWT-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "QuickGWT-prefix.pch"; sourceTree = ""; }; + C85E715CB46597B392E7BA86BD25689E /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h; sourceTree = ""; }; + C9170DB8275C5C4C297E32DE1B5F8F84 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; + C99D910567F961A1AD99782C32D13CE5 /* HasDefaultLoglevel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HasDefaultLoglevel.swift; path = InjectableLoggers/Classes/Protocols/HasDefaultLoglevel.swift; sourceTree = ""; }; + C9E6CDD0BCBFCA7AF6C2B248D22D8FA5 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; + CA6A9FABA935ABBFBFB0AB26BBC7C891 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + CD69F17D02A0FDBE671E877C8628B891 /* CanLogMessageInFileInFunctionAtLine.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CanLogMessageInFileInFunctionAtLine.swift; path = InjectableLoggers/Classes/Protocols/CanLogMessageInFileInFunctionAtLine.swift; sourceTree = ""; }; + CDDDB315651DA92764A1B2C6A0B1FC9A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D11AA5C547A50E41B21159B25C987F4B /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; + D2B480F4DBC09B733BBE869CCED6E1A2 /* CanLogMessageAtLevel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CanLogMessageAtLevel.swift; path = InjectableLoggers/Classes/ExtendedProtocols/CanLogMessageAtLevel.swift; sourceTree = ""; }; + D50E339EAB23B8D91F9D80F75E8B948D /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; + D65384F5E52FD1989C9977C772A00948 /* InjectableLoggers.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = InjectableLoggers.xcconfig; sourceTree = ""; }; + DAC08B3EE2D6B32F3C3D4CC1AE231A3D /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; + DE43721C2B5DE2B9766E214F8E0FA71C /* CallValue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CallValue.swift; path = MockNStub/Classes/Structs/CallValue.swift; sourceTree = ""; }; + DE4E59CFC82B6008A950F4A066545313 /* MockNStub-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MockNStub-prefix.pch"; sourceTree = ""; }; + E1B385074C6B5440CD8F5FD47C381016 /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; + E1B7F6147D9648850C310A5448EF101D /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Quick.modulemap; sourceTree = ""; }; + E23BD49832C2546CADEE52250E30D484 /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/QuickObjectiveC/DSL/World+DSL.h"; sourceTree = ""; }; + E3264C019469B5509A4C4C47EDD3D463 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; + E3E44F40B276DD5758FF9CADDC2B3066 /* QuickGWT-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "QuickGWT-umbrella.h"; sourceTree = ""; }; + E708B3478BB5781A19305B0A96F0E084 /* QuickGWT.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = QuickGWT.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + E988CFC9818BDD6BFFADE15A357C9AAD /* Logger.FormatSettings.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Logger.FormatSettings.swift; path = InjectableLoggers/Classes/Structs/Logger.FormatSettings.swift; sourceTree = ""; }; + EAF80A95B4783063319C27798DC58369 /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; + EB10764FD4D4DA228F61F56C8D46BB62 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + ECE0F31D2F7D79160644A2C5EDC9CE8A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + ECFCC9A33E376E8757155AA2CDDB7ED9 /* Pods-QuickGWT_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-QuickGWT_Tests-frameworks.sh"; sourceTree = ""; }; + EDEF3575EB2297C91008EC4B58D59052 /* LogLevel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LogLevel.swift; path = InjectableLoggers/Classes/Enums/LogLevel.swift; sourceTree = ""; }; + EDF338F5FC22AA2E2A9206D3DF2FF504 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; + EE0D2D6CF2C4B7F4852B6249CAEDDA54 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; + EE16831F4355F83520FB62D2AD4D126F /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; + EE6E87389777E4E3BBCA5893D6A988DB /* Pods-QuickGWT_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-QuickGWT_Example-acknowledgements.plist"; sourceTree = ""; }; + EEFA33863E2E6E19569B8ACF1A553269 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; + F1534053E1FA2F3CF68BF5D307C5153A /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; + F1F6031C1C4D5195BB0ECFF91D119445 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; + F4DB6507BED28EE1AADED9F9FC2FE6A5 /* MockNStub.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = MockNStub.framework; path = MockNStub.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F6CEA4FD5081706131FD449E787B865A /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; + FB230589D89B2E3B594E2E901F060F91 /* CanLog.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CanLog.swift; path = InjectableLoggers/Classes/ExtendedProtocols/CanLog.swift; sourceTree = ""; }; + FC1FA888436FCB51B1BFB1EFC5B423EC /* MockNStub-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MockNStub-umbrella.h"; sourceTree = ""; }; + FC7CA61012AD510A1FD7EFE97B56975A /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FCF1D68BF65115B4973886AB95C18A6D /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; + FDE982C80AD7248C8BADB4FC9DD8DF89 /* NSString+C99ExtendedIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSString+C99ExtendedIdentifier.swift"; path = "Sources/Quick/NSString+C99ExtendedIdentifier.swift"; sourceTree = ""; }; + FE26D954E8FAAD6883CE56BEC31F8DA6 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + FF9E6726344A279F6F2F8E0127BBCD6E /* ExpectationMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpectationMessage.swift; path = Sources/Nimble/ExpectationMessage.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 068DE562C52EC85292282DB9DB4ABEF9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 93CE29275F0BE5351C5DD832ED976339 /* Foundation.framework in Frameworks */, + BFE90E97BBEED93AE6AE6E312F267FF5 /* Quick.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0A15600175E74C45A52E4E624326521C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 152330DDB60C36602FEDEE5021003744 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0C7E0C8FBFC52E2BD86D6E1A76F81DF8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FDAF9547990137DA999B1AD1CFAB974C /* Foundation.framework in Frameworks */, + 18FC6ABAF170EA74560400C390234EF6 /* InjectableLoggers.framework in Frameworks */, + F0AEEC926BDBF27788266A262D41D0F2 /* XCTest.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 194D4FA94547CF788ADF1A420EC98A93 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C68E7E201AD841088FDF73EA317A6A72 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 71B8EC743647C34AF90418C794AE1AB1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F07BB7F86030007DEC079079126022A /* Foundation.framework in Frameworks */, + 73F2D6FA68757FF9FC49E5C877271E16 /* XCTest.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BA4D5BB3F18F30D8716B0ECBC3F56154 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D4B9FBB80E0E7A69810C07DF50B55F55 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CA7526545656F7609AE11F1532BD37B1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D9020DA14F7E0D1E67447893F01CB440 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 171624765A5CCDF793073102D7D567EB /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 7E29EB1E025CD7B649E2908358F7DCF3 /* Pods-QuickGWT_Example */, + 79EF1FFE45FAB04619FF5E946CF1632A /* Pods-QuickGWT_Tests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 27BDA2E7E614E159EE5EAB5CC15F29C6 /* Development Pods */ = { + isa = PBXGroup; + children = ( + 6F188391EF0D5D1BF772488828747E24 /* QuickGWT */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + 2F5B34AE34231A1A0E014C6AB7E3E885 /* iOS */ = { + isa = PBXGroup; + children = ( + C5CE7FBF784C1FAE32FD2B4D76C24046 /* Foundation.framework */, + ECE0F31D2F7D79160644A2C5EDC9CE8A /* XCTest.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 3CB0699DCDC36E5A8EF3E47643EE2173 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 400B8C63B693BB12212DA5B73AE3B547 /* InjectableLoggers.framework */, + FC7CA61012AD510A1FD7EFE97B56975A /* Quick.framework */, + 2F5B34AE34231A1A0E014C6AB7E3E885 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 5941C21663EAA9F3122E821A3CEBEFC1 /* Pod */ = { + isa = PBXGroup; + children = ( + 1910382D5C46147AE5137212D7449541 /* LICENSE */, + E708B3478BB5781A19305B0A96F0E084 /* QuickGWT.podspec */, + FE26D954E8FAAD6883CE56BEC31F8DA6 /* README.md */, + ); + name = Pod; + sourceTree = ""; + }; + 6AEF52989DB526D5D3E42A6198DCD399 /* Support Files */ = { + isa = PBXGroup; + children = ( + 9ADACF7E829F47A77780939FE62702EA /* Info.plist */, + 5F2E7B48187A081B65D8B9CC54B83DFA /* QuickGWT.modulemap */, + AA70315B21C71A6216B62FCB892A768E /* QuickGWT.xcconfig */, + 306F72DCBE60767B6646FFB13B493FC6 /* QuickGWT-dummy.m */, + C85B89FC05494B9947177955249D1C2C /* QuickGWT-prefix.pch */, + E3E44F40B276DD5758FF9CADDC2B3066 /* QuickGWT-umbrella.h */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/QuickGWT"; + sourceTree = ""; + }; + 6E6DB77DB89FA79EE28B3B4BFABA8090 /* Support Files */ = { + isa = PBXGroup; + children = ( + CA6A9FABA935ABBFBFB0AB26BBC7C891 /* Info.plist */, + B2B524DE6D9E1F6E721C7061CEC30764 /* Nimble.modulemap */, + A1BBCE76440EE9FDFFA753BED858C43C /* Nimble.xcconfig */, + F6CEA4FD5081706131FD449E787B865A /* Nimble-dummy.m */, + EAF80A95B4783063319C27798DC58369 /* Nimble-prefix.pch */, + E1B385074C6B5440CD8F5FD47C381016 /* Nimble-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/Nimble"; + sourceTree = ""; + }; + 6F188391EF0D5D1BF772488828747E24 /* QuickGWT */ = { + isa = PBXGroup; + children = ( + 313F49CEAC0CE718CFEA9961BAB64860 /* GivenWhenThen.swift */, + 5941C21663EAA9F3122E821A3CEBEFC1 /* Pod */, + 6AEF52989DB526D5D3E42A6198DCD399 /* Support Files */, + ); + name = QuickGWT; + path = ../..; + sourceTree = ""; + }; + 6F23E8A3C75DA10B991FF2D85DA5C463 /* Quick */ = { + isa = PBXGroup; + children = ( + AE9FE8937E61B39A011307CFD78EC790 /* Behavior.swift */, + 7C9A8DA22EE0BD32114BD7AB8C2DDD7F /* Callsite.swift */, + 9659D948EDA04AAFE09930D035157EDE /* Closures.swift */, + 6216585A200B6927769CB485B308B725 /* Configuration.swift */, + 49C7D9730BBC84CFB92984C0F78F511B /* DSL.swift */, + 0386315EA8CDF216F4A90BD136A66A0F /* ErrorUtility.swift */, + C9E6CDD0BCBFCA7AF6C2B248D22D8FA5 /* Example.swift */, + 2D781B42A634E50EF738D2CF48CDB94C /* ExampleGroup.swift */, + 2BF5E94E9AA2FCA71C4EACA086C29055 /* ExampleHooks.swift */, + A164B354A9E0E4CD5DECC560D1E7B18F /* ExampleMetadata.swift */, + 68F1E4E143C4FBF89AC20C17927D0FE6 /* Filter.swift */, + A363CFBF544F230889D3997B8C8994A6 /* HooksPhase.swift */, + 91A299DC019B1690C26841D60730EC73 /* NSBundle+CurrentTestBundle.swift */, + FDE982C80AD7248C8BADB4FC9DD8DF89 /* NSString+C99ExtendedIdentifier.swift */, + EE0D2D6CF2C4B7F4852B6249CAEDDA54 /* QCKDSL.h */, + 5649E4B93A341FBA65846BC85EE7F577 /* QCKDSL.m */, + 414526CA518492640937A16160A5E0FE /* Quick.h */, + F1F6031C1C4D5195BB0ECFF91D119445 /* QuickConfiguration.h */, + 92B1283B94BA5788966045A92B62FA8C /* QuickConfiguration.m */, + 57A42352501382C44D87135DA16DC01E /* QuickSelectedTestSuiteBuilder.swift */, + D50E339EAB23B8D91F9D80F75E8B948D /* QuickSpec.h */, + 4AE234C73630AA678E38C650B3E2E5CD /* QuickSpec.m */, + 9E56E97EF6FA735C55AFFBF1A8276E45 /* QuickSpecBase.h */, + 5B8E0CF40B98BFD43970A0FE3AB7BDF5 /* QuickSpecBase.m */, + 73D32ED9A2F37DD89087396E320FA22F /* QuickTestSuite.swift */, + C58B84600030A0BEC61F5DEFDF4F1BE7 /* SuiteHooks.swift */, + 362EDF2A7BE579259C861481ED8038C8 /* URL+FileName.swift */, + 15F917369B9519A5EBB0145974C26040 /* World.h */, + 4B7B0B7300D7B337A5F69169D6989919 /* World.swift */, + E23BD49832C2546CADEE52250E30D484 /* World+DSL.h */, + 51085F09C2CC04B86EBFEAE5B16A95DF /* World+DSL.swift */, + 9B114C0B24D596A6162E6651746BB2CE /* XCTestSuite+QuickTestSuiteBuilder.m */, + 8A82DB3E6263882F07D9B1E650E9ABC1 /* Support Files */, + ); + name = Quick; + path = Quick; + sourceTree = ""; + }; + 79EF1FFE45FAB04619FF5E946CF1632A /* Pods-QuickGWT_Tests */ = { + isa = PBXGroup; + children = ( + EB10764FD4D4DA228F61F56C8D46BB62 /* Info.plist */, + 7EA28BC46EEE71E2A8DA04F17C10FB0F /* Pods-QuickGWT_Tests.modulemap */, + BAB8534903FA3D65DC1D2450957DA182 /* Pods-QuickGWT_Tests-acknowledgements.markdown */, + 0E22BEB48FBCF3193B4E2E2067956D20 /* Pods-QuickGWT_Tests-acknowledgements.plist */, + 3AE5AAB38486FEB86CEDFAA2F7130650 /* Pods-QuickGWT_Tests-dummy.m */, + ECFCC9A33E376E8757155AA2CDDB7ED9 /* Pods-QuickGWT_Tests-frameworks.sh */, + 02F6C2718B584F294E10D63154B94D04 /* Pods-QuickGWT_Tests-resources.sh */, + 612E4FB349FEAE14ABE7960E2893A190 /* Pods-QuickGWT_Tests-umbrella.h */, + BCE063628FC457020690501527904F64 /* Pods-QuickGWT_Tests.debug.xcconfig */, + 75F48CD5F3AF8D360F63A41B2A13C1C4 /* Pods-QuickGWT_Tests.release.xcconfig */, + ); + name = "Pods-QuickGWT_Tests"; + path = "Target Support Files/Pods-QuickGWT_Tests"; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 27BDA2E7E614E159EE5EAB5CC15F29C6 /* Development Pods */, + 3CB0699DCDC36E5A8EF3E47643EE2173 /* Frameworks */, + BFAE4A722EA5CC0F15A54AE936919FE6 /* Pods */, + BB9CC7E0B1DC252828E5E17FDCE281A4 /* Products */, + 171624765A5CCDF793073102D7D567EB /* Targets Support Files */, + ); + sourceTree = ""; + }; + 7E29EB1E025CD7B649E2908358F7DCF3 /* Pods-QuickGWT_Example */ = { + isa = PBXGroup; + children = ( + 16CC9C3ECE11ABB9AA73C93588CEB245 /* Info.plist */, + 7C4CE4B11092A5FA44C513672AC875D5 /* Pods-QuickGWT_Example.modulemap */, + 7D1B05B187EEBB71FD88ABCB8512906C /* Pods-QuickGWT_Example-acknowledgements.markdown */, + EE6E87389777E4E3BBCA5893D6A988DB /* Pods-QuickGWT_Example-acknowledgements.plist */, + 1EAD944BC016958A5068272D95EFA495 /* Pods-QuickGWT_Example-dummy.m */, + 8EBFA29C1329CD64197DF6F6F9FABF40 /* Pods-QuickGWT_Example-frameworks.sh */, + 0CE17CE6FE1C7DD0CAA5CBF05FAB6418 /* Pods-QuickGWT_Example-resources.sh */, + 3244C3D7877348A2EB7D74FE638C77E0 /* Pods-QuickGWT_Example-umbrella.h */, + 7E6EF001F145625349D09D3C53596929 /* Pods-QuickGWT_Example.debug.xcconfig */, + 3EC87580F0CF0F5D88836A821C8E330B /* Pods-QuickGWT_Example.release.xcconfig */, + ); + name = "Pods-QuickGWT_Example"; + path = "Target Support Files/Pods-QuickGWT_Example"; + sourceTree = ""; + }; + 8A82DB3E6263882F07D9B1E650E9ABC1 /* Support Files */ = { + isa = PBXGroup; + children = ( + CDDDB315651DA92764A1B2C6A0B1FC9A /* Info.plist */, + E1B7F6147D9648850C310A5448EF101D /* Quick.modulemap */, + 103D4A21C5E5B8013C4C4223001EEC82 /* Quick.xcconfig */, + BB3805CE87F95375647F4ABDA56E3E54 /* Quick-dummy.m */, + BDD129B9511D4129CFE8ECE702B2178C /* Quick-prefix.pch */, + 9736E6F37EC15C0B621F2973028BB08F /* Quick-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/Quick"; + sourceTree = ""; + }; + 97116BAA5D5890BB1F2B3A3C000B0D96 /* MockNStub */ = { + isa = PBXGroup; + children = ( + 7CFFBF7EAB39156810B79A7F3647E07C /* anyArgumentMatcher.swift */, + 767ED28D57AFD3D05B1B44F9A328019E /* ArgumentMatcher.swift */, + 7449CB294BFDB1F2686EE44CA6C060E5 /* Array+tuple.swift */, + 4A0B7DD9B7B46B551CCEC475E4F4CAF5 /* AsociatedKeys.swift */, + 30976A1237D2CDE329DB1277B03C6594 /* Call.swift */, + DE43721C2B5DE2B9766E214F8E0FA71C /* CallValue.swift */, + 13342B658C16AA7E64D61E15E161F883 /* dumpValue.swift */, + 91788471312581EDA9530B4B0806F343 /* FailingWithMessageAtLocation.swift */, + 3141C171D5496A33E2B3CC177B0F353B /* isOptionalType.swift */, + 92CE10F3B72700B8889D99DA5AAA6D63 /* Location.swift */, + C3B25FB292C98130C1F75CD6FB55C1A7 /* logger.swift */, + 9BC9863BE469FE1AB96147CFBDD719C4 /* MatchingArguments.swift */, + 8295E8D9913B1CD6CB037D3B26B63517 /* Mocking.swift */, + 98BFA95B57C0519F47994525238394C8 /* ProvidingFailureHandler.swift */, + 5004976D60359AEB42B74FEAC8E2E621 /* ProvidingMutableCalls.swift */, + B4A7273DFDC6B561A271815D85876DD5 /* ProvidingMutableCallValues.swift */, + 52B8E76026C12934F3E6CC852580939F /* ProvidingMutableVerifications.swift */, + 1A5BF23F8E10AE6C8537E42004EB2B97 /* Stubbing.swift */, + 871D2FB0675DD9FEC4C92CFF5F4421DA /* Verification.swift */, + 89C2280D700553B71EBD9FACA2B7E2B9 /* XCTFailureHandler.swift */, + C0C3C05B08DE6CDCB03384DA7EA4205D /* Support Files */, + ); + name = MockNStub; + path = MockNStub; + sourceTree = ""; + }; + 9F8E0A0D672211E43DFD37BF075DCEE2 /* Support Files */ = { + isa = PBXGroup; + children = ( + 789442442E420A73A87935D93A22CC33 /* Info.plist */, + 3737D79C462F775E30AE09DBFFA00A12 /* InjectableLoggers.modulemap */, + D65384F5E52FD1989C9977C772A00948 /* InjectableLoggers.xcconfig */, + 13E0204A61032F22F7FEB4D8EA0ECB7B /* InjectableLoggers-dummy.m */, + 77946F7F59BD84341932D55B8298B985 /* InjectableLoggers-prefix.pch */, + 6880094977294312D8C67C08094FC435 /* InjectableLoggers-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/InjectableLoggers"; + sourceTree = ""; + }; + A32D4C59869B01EDDEEF346BC50680C2 /* Nimble */ = { + isa = PBXGroup; + children = ( + 42498CFD917359B06B0345B85AD5235E /* AdapterProtocols.swift */, + B9B56EE99DF3F120A6DD5E7BA00EEF38 /* AllPass.swift */, + 276EC1B8FF7166E2772C848EAA154375 /* AssertionDispatcher.swift */, + 42CF1968172CD9C397AB3307097F9B7E /* AssertionRecorder.swift */, + FCF1D68BF65115B4973886AB95C18A6D /* Async.swift */, + A1344D49B368308E24997AB94C21A628 /* AsyncMatcherWrapper.swift */, + 86AFB3DD5F9EEC451E446F0A7BC7DCCB /* BeAKindOf.swift */, + 4D4F19D57A1F853437EA7B8821231680 /* BeAnInstanceOf.swift */, + 1C994D1E1EF1A3F1D96025B9062C7C82 /* BeCloseTo.swift */, + 65578426C10DE97EA215C2E531F59FCB /* BeEmpty.swift */, + 9E4222672DF02D620AFFB5260E60AD9A /* BeginWith.swift */, + 15F209138633BB8E86EC162B228443B7 /* BeGreaterThan.swift */, + 75A8FC1E098DBD74529C653016CECA81 /* BeGreaterThanOrEqualTo.swift */, + EDF338F5FC22AA2E2A9206D3DF2FF504 /* BeIdenticalTo.swift */, + F1534053E1FA2F3CF68BF5D307C5153A /* BeLessThan.swift */, + 68825119C66B16187D2C9A30536232D6 /* BeLessThanOrEqual.swift */, + 1AC24E5A820A2C62A0E96BC70C0943B8 /* BeLogical.swift */, + AE23FDABB750E5899876968079D7AB83 /* BeNil.swift */, + C9170DB8275C5C4C297E32DE1B5F8F84 /* BeVoid.swift */, + A2D62CD6100BB22D4EE5B8B6665EF305 /* Contain.swift */, + 876B8162ED4A9701E1761CBB6C18011D /* ContainElementSatisfying.swift */, + 5A1981E56B828220EC300AFA104865E8 /* CurrentTestCaseTracker.h */, + 73139A49A0A8E397FBB9734FF04E5FD6 /* CwlBadInstructionException.swift */, + B474BB5F629252EF7E5FFD151D16418C /* CwlCatchBadInstruction.swift */, + 29CB7C347657D6537FE9971F63057279 /* CwlCatchException.h */, + 5F27CCCD4EFFD03EFC0C23BD6C46FA01 /* CwlCatchException.m */, + 793FFB630A98C7D1F89D05310684AAD4 /* CwlCatchException.swift */, + 2EDB02877444787DC788B766F9BD6BE7 /* CwlDarwinDefinitions.swift */, + 7B9D3BC9BA1C63990B91F3B82822AC45 /* CwlMachBadInstructionHandler.h */, + 846DEE33F6628AC89004595FBA0233A9 /* CwlMachBadInstructionHandler.m */, + 7573FCB8C2B47049E6D245CFC97833CC /* CwlPreconditionTesting.h */, + 78D2C051F2FF31D2F91EE6D39EA6C0F7 /* DSL.h */, + 25B8A8E39FD32E9CC474DFE9CF24162D /* DSL.m */, + DAC08B3EE2D6B32F3C3D4CC1AE231A3D /* DSL.swift */, + 480FA9EEA32F0E64887F3C3DE796E4D9 /* DSL+Wait.swift */, + 7A728D1194039680D5982ADAE9EF60EC /* EndWith.swift */, + EE16831F4355F83520FB62D2AD4D126F /* Equal.swift */, + 42BAE53097A2F59F61A51B3B1F512F3B /* Errors.swift */, + C6721D8E01CF54C4C85BFD79E4923C0A /* Expectation.swift */, + FF9E6726344A279F6F2F8E0127BBCD6E /* ExpectationMessage.swift */, + C002DEDDBF0AEBA7622A42A18EA2B339 /* Expression.swift */, + 9CCC4FE0CFDF388440DAA135CFA68931 /* FailureMessage.swift */, + 98AFBEDD4F2A44B5BD1E5631E6587AE8 /* Functional.swift */, + 0383AEE0729CA5B0EE80CCED01B3B6CA /* HaveCount.swift */, + 3BC4FACC1FDC434864B89252BE64A045 /* mach_excServer.c */, + C85E715CB46597B392E7BA86BD25689E /* mach_excServer.h */, + A2E0F70C34DFC7C224A2D521C5D3378F /* Match.swift */, + 3D7103D3DB114389E21A5ECCD3599401 /* MatcherFunc.swift */, + C78901B75D38C26A6995B650153266B3 /* MatcherProtocols.swift */, + AC9804E380AA78EC1F6688BF1176C8F6 /* MatchError.swift */, + E3264C019469B5509A4C4C47EDD3D463 /* Nimble.h */, + 6B955E1B977A2B0182E4B1EAE9EB55C3 /* NimbleEnvironment.swift */, + 9568BB9556077DF7E61F03D800C6B564 /* NimbleXCTestHandler.swift */, + 700A7B9639F19F846F996027ACB66DEA /* NMBExceptionCapture.h */, + 1A874ED0A1640F553BCEEFD6B326DF0C /* NMBExceptionCapture.m */, + BAA1C1B57C3FBCF8D9807761AA4F6899 /* NMBExpectation.swift */, + 91EC42722B02A65F6E52B46EC946C2E3 /* NMBObjCMatcher.swift */, + B43A7F375CC7A8F18B3237E0DC33FCBB /* NMBStringify.h */, + 59D47F4E5656B8D7AC8559D76AA5B7EA /* NMBStringify.m */, + 4A5BA309ACD7543025B311DB5F3E75FF /* PostNotification.swift */, + 60401929E8CF6C12952EEF36B1230F82 /* Predicate.swift */, + 95E470840B26BA9F4DCA75D207DA093C /* RaisesException.swift */, + 2147789E3C61905554ED8BE622A05DED /* SatisfyAllOf.swift */, + 07E60A5ED53FC6FF735751E56B087AB7 /* SatisfyAnyOf.swift */, + 4B264503FA772AF756A96D184126F9F1 /* SourceLocation.swift */, + D11AA5C547A50E41B21159B25C987F4B /* Stringers.swift */, + 791DF057FF8297801B3E2CE1AAEED692 /* ThrowAssertion.swift */, + EEFA33863E2E6E19569B8ACF1A553269 /* ThrowError.swift */, + 02CBFCF4DAC9187955B8D3FC392F4AD6 /* ToSucceed.swift */, + 262CAE8A375E065FBB2B31CC190CF004 /* XCTestObservationCenter+Register.m */, + 6E6DB77DB89FA79EE28B3B4BFABA8090 /* Support Files */, + ); + name = Nimble; + path = Nimble; + sourceTree = ""; + }; + BB9CC7E0B1DC252828E5E17FDCE281A4 /* Products */ = { + isa = PBXGroup; + children = ( + 28155CC0522094D381E188DFE5C6327E /* InjectableLoggers.framework */, + F4DB6507BED28EE1AADED9F9FC2FE6A5 /* MockNStub.framework */, + 8D676D5C838759971BB1604716DA23DF /* Nimble.framework */, + B342C15296ECE2544971DC90537AAEC8 /* Pods_QuickGWT_Example.framework */, + 2AD8A279B0ECB45C58E207B27F784783 /* Pods_QuickGWT_Tests.framework */, + 906BB8EB0D033BC0D30EEBA49F188F8C /* Quick.framework */, + 6BC266D4ED2395728A020F521D9C6D4D /* QuickGWT.framework */, + ); + name = Products; + sourceTree = ""; + }; + BFAE4A722EA5CC0F15A54AE936919FE6 /* Pods */ = { + isa = PBXGroup; + children = ( + F50BB1F319856B6A48BADB30009C5057 /* InjectableLoggers */, + 97116BAA5D5890BB1F2B3A3C000B0D96 /* MockNStub */, + A32D4C59869B01EDDEEF346BC50680C2 /* Nimble */, + 6F23E8A3C75DA10B991FF2D85DA5C463 /* Quick */, + ); + name = Pods; + sourceTree = ""; + }; + C0C3C05B08DE6CDCB03384DA7EA4205D /* Support Files */ = { + isa = PBXGroup; + children = ( + 31B79F731CD2687985535653F1F82FC2 /* Info.plist */, + 2652335735EAAF1E44D58C0D589EFF0B /* MockNStub.modulemap */, + 92AF69A2C7F0E30401A4815A535E58E9 /* MockNStub.xcconfig */, + 7225935A2AE6A0FF527402F3E2257B09 /* MockNStub-dummy.m */, + DE4E59CFC82B6008A950F4A066545313 /* MockNStub-prefix.pch */, + FC1FA888436FCB51B1BFB1EFC5B423EC /* MockNStub-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/MockNStub"; + sourceTree = ""; + }; + F50BB1F319856B6A48BADB30009C5057 /* InjectableLoggers */ = { + isa = PBXGroup; + children = ( + 603DEF3EDF9E63524EB047FBE4640765 /* CanFormatMessageInFileInFunctionAtLineWithSettings.swift */, + FB230589D89B2E3B594E2E901F060F91 /* CanLog.swift */, + 2F7834B01794AB064D7252E4FDCD69D7 /* CanLogAtLevel.swift */, + 169D4F2D5E2FDB20177FB5889E22DE1C /* CanLogMessage.swift */, + D2B480F4DBC09B733BBE869CCED6E1A2 /* CanLogMessageAtLevel.swift */, + 35210D610DF914B715F3FEE975A517C3 /* CanLogMessageAtLevelInFileInFunctionAtLine.swift */, + CD69F17D02A0FDBE671E877C8628B891 /* CanLogMessageInFileInFunctionAtLine.swift */, + 42022805437EB7B656115B30DF977418 /* ConsoleLogger.swift */, + C99D910567F961A1AD99782C32D13CE5 /* HasDefaultLoglevel.swift */, + 58B6C3A14FD06D91BD8CD40975CF4FC7 /* Logger.swift */, + E988CFC9818BDD6BFFADE15A357C9AAD /* Logger.FormatSettings.swift */, + 3770A51E6E5FC80AD96A28EBCD9B938A /* Logger.Formatter.swift */, + 78D52577A7E91A0D2B90F9BFA9A14200 /* Logger.Settings.swift */, + EDEF3575EB2297C91008EC4B58D59052 /* LogLevel.swift */, + C01B5534DE36821963F9AF0B527C3BD1 /* MockLogger.swift */, + 9B2AE89B9B877266C313D3753848FF9F /* SimpleLogger.swift */, + B515A16EE724A8D3CAC9A508A2B77368 /* SimpleLogger.Settings.swift */, + 9F8E0A0D672211E43DFD37BF075DCEE2 /* Support Files */, + ); + name = InjectableLoggers; + path = InjectableLoggers; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 44A9123AB266B4973D5EEFF604DA3DB5 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 6852759AC10BB0060A63DBD4A0B9998A /* InjectableLoggers-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5BE4CB2BB223EA6C14AC651BE1F136A0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + C056FC6D6C3054024DAA2952A383472D /* CurrentTestCaseTracker.h in Headers */, + BDCBCB95C3E0B412F64D354D4DDEB2D2 /* CwlCatchException.h in Headers */, + 22890514898BDB4ABD565141777D40DC /* CwlMachBadInstructionHandler.h in Headers */, + D9679F33E0403FDF8D53F5A590ED3580 /* CwlPreconditionTesting.h in Headers */, + 9ABA41C834A34FFDA62989C98470072E /* DSL.h in Headers */, + 6C94EB8CE00D39BE9B8F032B9CA1644F /* mach_excServer.h in Headers */, + 14CE14F2C66C5F9DC6999E211C6CDFAE /* Nimble-umbrella.h in Headers */, + F81064D91F8C0DAB1602C0E8FAAA2BA7 /* Nimble.h in Headers */, + B1C804085D19FE550ABB742D21CE1430 /* NMBExceptionCapture.h in Headers */, + E1CE677F1FBAA3B4EACED5D3C535F98A /* NMBStringify.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5C01E78E3008A34DF918FC8B49D6DC67 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 69CC99A89E679EF1BD36D814C49176F9 /* MockNStub-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B45E9B141285FD0973F4EBDD5A0225C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + BB03B57C3B3889F76051B0986B03CE89 /* QCKDSL.h in Headers */, + 40B3C6F5B35BD86B0F70A99F98A60C16 /* Quick-umbrella.h in Headers */, + E80BB5FEB529C0AB978807CDE789A580 /* Quick.h in Headers */, + 098D8AE79001AD6EF1EF989A633468F3 /* QuickConfiguration.h in Headers */, + E3BE217411A268C284BF700CF0CB39E1 /* QuickSpec.h in Headers */, + CFBEED925B153A959B346A461B55FEFD /* QuickSpecBase.h in Headers */, + 8F0C9976CC7359BF9B175D47060879B5 /* World+DSL.h in Headers */, + 67B25949591BFDE62C07639E48937C76 /* World.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A425949503037A460F8B457AA46C8D0B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E7D22AF8519D8AD5D7E2B8623FB6F571 /* Pods-QuickGWT_Tests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C081100D736F4268151F7F74DB7B8B6A /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + F7FCED52B2E48BCC09E442ABB9A3F30E /* QuickGWT-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DACE06160D14699EB3BB430CA55067E4 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + EF5F41C05C3AAF5A2326A0C3358938A2 /* Pods-QuickGWT_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 7A1D901838772835B926373F48B959E5 /* Quick */ = { + isa = PBXNativeTarget; + buildConfigurationList = A358A9C55999A6B2399413EA9CAFED0C /* Build configuration list for PBXNativeTarget "Quick" */; + buildPhases = ( + 72D29C4E5F17500B35F7A6CC39A07F0A /* Sources */, + 71B8EC743647C34AF90418C794AE1AB1 /* Frameworks */, + 7B45E9B141285FD0973F4EBDD5A0225C /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Quick; + productName = Quick; + productReference = 906BB8EB0D033BC0D30EEBA49F188F8C /* Quick.framework */; + productType = "com.apple.product-type.framework"; + }; + 84B900852143C358F09CAEF776B1A86E /* Nimble */ = { + isa = PBXNativeTarget; + buildConfigurationList = 41CFFA5954C6CB94E6B574C8530E49B1 /* Build configuration list for PBXNativeTarget "Nimble" */; + buildPhases = ( + 1E6FAC514FCD8046F4F6EBD1B70BC9D8 /* Sources */, + 194D4FA94547CF788ADF1A420EC98A93 /* Frameworks */, + 5BE4CB2BB223EA6C14AC651BE1F136A0 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Nimble; + productName = Nimble; + productReference = 8D676D5C838759971BB1604716DA23DF /* Nimble.framework */; + productType = "com.apple.product-type.framework"; + }; + 92895CAF0A8E521127343E068C35C7A2 /* QuickGWT */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9252DA570C327C3BD77AC6B7AB6ABBB /* Build configuration list for PBXNativeTarget "QuickGWT" */; + buildPhases = ( + D57563F3EE72E0455139DD03FF759D31 /* Sources */, + 068DE562C52EC85292282DB9DB4ABEF9 /* Frameworks */, + C081100D736F4268151F7F74DB7B8B6A /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + F08F86B35A41330BAF1FC03CF964449D /* PBXTargetDependency */, + ); + name = QuickGWT; + productName = QuickGWT; + productReference = 6BC266D4ED2395728A020F521D9C6D4D /* QuickGWT.framework */; + productType = "com.apple.product-type.framework"; + }; + A12BB9BFE2FDE1C8C0A00322DF1B199D /* Pods-QuickGWT_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = A191BA0D14423D14B80F4F481958F4AB /* Build configuration list for PBXNativeTarget "Pods-QuickGWT_Tests" */; + buildPhases = ( + E8C6AE0974631C55AF14A9E876F3A9B7 /* Sources */, + CA7526545656F7609AE11F1532BD37B1 /* Frameworks */, + A425949503037A460F8B457AA46C8D0B /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 197C55C2924888312487293E50EB5419 /* PBXTargetDependency */, + 30DAC5A29F52ECFAC9100DD72CDC16C6 /* PBXTargetDependency */, + EC887359E62550D25B0D7D5BB6CFE1E1 /* PBXTargetDependency */, + 8AB67B55E5A47EB06F4FC2333D44227B /* PBXTargetDependency */, + ); + name = "Pods-QuickGWT_Tests"; + productName = "Pods-QuickGWT_Tests"; + productReference = 2AD8A279B0ECB45C58E207B27F784783 /* Pods_QuickGWT_Tests.framework */; + productType = "com.apple.product-type.framework"; + }; + C08D88D6FF727274C04E1676A3B89865 /* MockNStub */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4B768D2F954ABE68D8F473075158C007 /* Build configuration list for PBXNativeTarget "MockNStub" */; + buildPhases = ( + 4DCFD1A67FFB7F2936EC3C98A23E209C /* Sources */, + 0C7E0C8FBFC52E2BD86D6E1A76F81DF8 /* Frameworks */, + 5C01E78E3008A34DF918FC8B49D6DC67 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 69F3FCD712F97B85ECD9D3C87B717781 /* PBXTargetDependency */, + ); + name = MockNStub; + productName = MockNStub; + productReference = F4DB6507BED28EE1AADED9F9FC2FE6A5 /* MockNStub.framework */; + productType = "com.apple.product-type.framework"; + }; + D5CD245C01DC2C08B05F702A59D9D4A8 /* InjectableLoggers */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7B2CF3ADFCAE3DC0BF0B5363F2537A24 /* Build configuration list for PBXNativeTarget "InjectableLoggers" */; + buildPhases = ( + 8BDA23FB41B7F5F44CCA426372041A80 /* Sources */, + 0A15600175E74C45A52E4E624326521C /* Frameworks */, + 44A9123AB266B4973D5EEFF604DA3DB5 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = InjectableLoggers; + productName = InjectableLoggers; + productReference = 28155CC0522094D381E188DFE5C6327E /* InjectableLoggers.framework */; + productType = "com.apple.product-type.framework"; + }; + E2CA809DE79481CC9615FB051961FDC2 /* Pods-QuickGWT_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = ABFC906AC10234CFAB068761AF70533E /* Build configuration list for PBXNativeTarget "Pods-QuickGWT_Example" */; + buildPhases = ( + D8BB8538E70A5E1340098C55745753CD /* Sources */, + BA4D5BB3F18F30D8716B0ECBC3F56154 /* Frameworks */, + DACE06160D14699EB3BB430CA55067E4 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 738F0703DE4FE456D14A2F2DC5F4D34D /* PBXTargetDependency */, + 9048903D3019860850E247941B8BA250 /* PBXTargetDependency */, + 2D4E47109612CE070A9D44968150E549 /* PBXTargetDependency */, + ); + name = "Pods-QuickGWT_Example"; + productName = "Pods-QuickGWT_Example"; + productReference = B342C15296ECE2544971DC90537AAEC8 /* Pods_QuickGWT_Example.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = BB9CC7E0B1DC252828E5E17FDCE281A4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D5CD245C01DC2C08B05F702A59D9D4A8 /* InjectableLoggers */, + C08D88D6FF727274C04E1676A3B89865 /* MockNStub */, + 84B900852143C358F09CAEF776B1A86E /* Nimble */, + E2CA809DE79481CC9615FB051961FDC2 /* Pods-QuickGWT_Example */, + A12BB9BFE2FDE1C8C0A00322DF1B199D /* Pods-QuickGWT_Tests */, + 7A1D901838772835B926373F48B959E5 /* Quick */, + 92895CAF0A8E521127343E068C35C7A2 /* QuickGWT */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 1E6FAC514FCD8046F4F6EBD1B70BC9D8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84C4C044D2AB159E464FE441032CCB04 /* AdapterProtocols.swift in Sources */, + 3BEFF176C6E691040D03D9D71B06CE08 /* AllPass.swift in Sources */, + 7D4DB2338A5EB74DDFE7993706E6EC45 /* AssertionDispatcher.swift in Sources */, + CE165CCB91FAB45C82784F09AC5961E7 /* AssertionRecorder.swift in Sources */, + F01CC567ED28E2453CFA8D395FA357F8 /* Async.swift in Sources */, + 9ADADCF7CDA2EF9F1A2773847B10CC83 /* AsyncMatcherWrapper.swift in Sources */, + A4D64EDED77E7308F59DED7D9488545C /* BeAKindOf.swift in Sources */, + 8C71B1B23DF0545A8B2B6538C2759C56 /* BeAnInstanceOf.swift in Sources */, + 4BBE70FE76B9605203B5EE68D5BD06D2 /* BeCloseTo.swift in Sources */, + AA6394C34F8B3F81F62F734981ADEC8D /* BeEmpty.swift in Sources */, + AA5FA0403350B4B71D7F342926DFB5AF /* BeginWith.swift in Sources */, + 15B22CF4DD40180F7FBDDBFE2B286E29 /* BeGreaterThan.swift in Sources */, + 12B59D0DD2090B179C402CCACE06EB0D /* BeGreaterThanOrEqualTo.swift in Sources */, + DDE2B342857DCB11616D02A6DDC81240 /* BeIdenticalTo.swift in Sources */, + 27C8A329E646E6458985A975C778C77A /* BeLessThan.swift in Sources */, + E5BC364A6612B3DBAE4446DB2AF12F12 /* BeLessThanOrEqual.swift in Sources */, + 57A927970468105815CFE7C81DAE35FB /* BeLogical.swift in Sources */, + 506DFBBF0B9B18E5F0B5E3D8C3BCBF69 /* BeNil.swift in Sources */, + 8198412E6E77FD0071B634C053F9D3EF /* BeVoid.swift in Sources */, + 4357841DB0A714BAD8992D976217514D /* Contain.swift in Sources */, + AF4431ADC9FB068B56C0479838CD7A18 /* ContainElementSatisfying.swift in Sources */, + 8B0DA2043B645F0BCFCAA1FD99AFE583 /* CwlBadInstructionException.swift in Sources */, + 15634BD678E9CD8936A7B95DFE92AF0A /* CwlCatchBadInstruction.swift in Sources */, + F7FC6F6CB2C67F1F2144B34516A360BD /* CwlCatchException.m in Sources */, + BEFEB55033728BFCA1438907FBC65FCB /* CwlCatchException.swift in Sources */, + 6A0D182778DCCC8570603F553C85BD43 /* CwlDarwinDefinitions.swift in Sources */, + 29C2F8DFFC0A563F68EA86AB0534230B /* CwlMachBadInstructionHandler.m in Sources */, + C1E78D2DAB7B4F1AAC33876EDF9A9491 /* DSL+Wait.swift in Sources */, + FB4D015C5BA066A8B5533C82EF0F5F8D /* DSL.m in Sources */, + A070602233E5F2A60DDC12B8036CA92E /* DSL.swift in Sources */, + 869E7FD5708F53F16D21CFBF82ACFC68 /* EndWith.swift in Sources */, + 5F0AC651126D166035178D0ECCC3940E /* Equal.swift in Sources */, + 4D82A0BF2A4412E0C7EC4B69B4790028 /* Errors.swift in Sources */, + 8F9E21FFAB12456CE8339933BAD71EE0 /* Expectation.swift in Sources */, + 6495D3D712DD95ABF1A53CEC53F4B73E /* ExpectationMessage.swift in Sources */, + 4D204E838F7F4BEB7AE9951B22CE8E11 /* Expression.swift in Sources */, + B92F0C603E11CE14B6D4A725EA9726AA /* FailureMessage.swift in Sources */, + 32B77CC02537C1F23AE338A5748E31D5 /* Functional.swift in Sources */, + AC229B69DA2385D8E2870C45EBC69208 /* HaveCount.swift in Sources */, + 0B34C608724F747CD8F93FB53F5F49C9 /* mach_excServer.c in Sources */, + 03B6F1701A8BA849FFA43BE800291889 /* Match.swift in Sources */, + C468CD787C38E4BF30063D0E77BE7129 /* MatcherFunc.swift in Sources */, + F936FD8B0D8F5432AFCB0602CEDC6586 /* MatcherProtocols.swift in Sources */, + 1065D93D11A8CD9AE108294EA91E83B7 /* MatchError.swift in Sources */, + C1B2371C54FD3C39D577334D76396900 /* Nimble-dummy.m in Sources */, + 4A47AE0BE4B554778D81B3A452F2744D /* NimbleEnvironment.swift in Sources */, + 28B983A5CEB2097860B2A9C87433B168 /* NimbleXCTestHandler.swift in Sources */, + 3477DB5CDD7DA17BF63947AD67352066 /* NMBExceptionCapture.m in Sources */, + 5C7C2FB9F88BA5CA268333E7FAF37941 /* NMBExpectation.swift in Sources */, + D03B1993E81DD4DC81752FF0F7798EAB /* NMBObjCMatcher.swift in Sources */, + A20E66DCD328707AA5F81D17C917FB2A /* NMBStringify.m in Sources */, + B4D156C66C393987CE0402F6FF39DFAA /* PostNotification.swift in Sources */, + 01C31A4E2026DF827A77ABE56B9AFB35 /* Predicate.swift in Sources */, + 7A3A5B455EE392A3B03B31C3AE360B14 /* RaisesException.swift in Sources */, + F45C6C0BFB6CC8B53221BE457BB3C4DF /* SatisfyAllOf.swift in Sources */, + 7B98A95E9869FEE6BF6AE861E9D17960 /* SatisfyAnyOf.swift in Sources */, + C86A76F1BDC5E9C386ACE8FBAE4925F4 /* SourceLocation.swift in Sources */, + 7FC781FE797BCA000EE0E9E15514BC80 /* Stringers.swift in Sources */, + 9E4E3A5F863322689F6C39FA38F6B646 /* ThrowAssertion.swift in Sources */, + 349B0FB47AB0DB459DC27CD51887CB1A /* ThrowError.swift in Sources */, + 06BCD9EE02FB7CBB586BE04236F5620E /* ToSucceed.swift in Sources */, + 526509443652A8F603FA668B459084D3 /* XCTestObservationCenter+Register.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4DCFD1A67FFB7F2936EC3C98A23E209C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7DD8588A6B05B63E0E98CF49DD69130D /* anyArgumentMatcher.swift in Sources */, + 6CCE249EF179194D40C57AF3F82807AA /* ArgumentMatcher.swift in Sources */, + DE5C13A4FF4E1FB01AE445D2F656E89B /* Array+tuple.swift in Sources */, + D86AE6EBFFB397F25ECD32D1C7F23B91 /* AsociatedKeys.swift in Sources */, + 428F828E1B807F495EFB4CDE65704DCF /* Call.swift in Sources */, + 608FDED55DE565C2B7A6E5EFD204E952 /* CallValue.swift in Sources */, + 89CC5CA95F489570B8C903B00A46E950 /* dumpValue.swift in Sources */, + 6A94A38AB52FEDAE3380063B1660974E /* FailingWithMessageAtLocation.swift in Sources */, + BB05879CADE17504C87FCE3CCC004BFE /* isOptionalType.swift in Sources */, + BF53390ADD246D857B0BBFB029206DD3 /* Location.swift in Sources */, + 3F51C82E6D3DAA4BA10B811C8EEBE45B /* logger.swift in Sources */, + DC3121A90955AA3F3B4BBE3B467C151F /* MatchingArguments.swift in Sources */, + 0C307890251F3077589AB54D84A6DE35 /* Mocking.swift in Sources */, + 23CEDDDB910F4352D56D618A380D6334 /* MockNStub-dummy.m in Sources */, + 018864A73390C82701E07D266F0866D7 /* ProvidingFailureHandler.swift in Sources */, + D3A3634FD0E090CACDD7B50C56435404 /* ProvidingMutableCalls.swift in Sources */, + 9F2948B6F885A25543A83857D6CCDC64 /* ProvidingMutableCallValues.swift in Sources */, + 8EF4384E49DF7C150E1601D5B945634B /* ProvidingMutableVerifications.swift in Sources */, + AB11A6650E6100CDFD7B1E753C8E868C /* Stubbing.swift in Sources */, + E2405EE065638510A04B278C3E59BF91 /* Verification.swift in Sources */, + D88990C95625CCDD30C917905601925D /* XCTFailureHandler.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 72D29C4E5F17500B35F7A6CC39A07F0A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A21830577946E1343C0A5E92CF03C212 /* Behavior.swift in Sources */, + C2D835CA8A8DA664F8943F332E05A75F /* Callsite.swift in Sources */, + 83E789EC0F6A6A97DEC9EA9D8292CF1E /* Closures.swift in Sources */, + A662E57A1C1F0E31E5E2EC30187A5596 /* Configuration.swift in Sources */, + 57937D2AAEC77BC9F8041E02FACCA244 /* DSL.swift in Sources */, + ED3C43ACDA1CACF5026E064AF9C09B5F /* ErrorUtility.swift in Sources */, + 9E675CD0BCF84741731E3D521C9FAD0C /* Example.swift in Sources */, + 20EBF575D35CC04D8E988F6C5CB2489A /* ExampleGroup.swift in Sources */, + 122DA1F3CD6F169E64242389F57EA893 /* ExampleHooks.swift in Sources */, + 60F1592522B3EF48D360BAC2F07598C5 /* ExampleMetadata.swift in Sources */, + 9A7A842C9C62B621929FB33250E5F358 /* Filter.swift in Sources */, + 9B5B9224DE5682663DC11E210B43A139 /* HooksPhase.swift in Sources */, + 6AA60FF674D9B576608725BBEF05E39F /* NSBundle+CurrentTestBundle.swift in Sources */, + 7269A6F3E4E3C509575C60D5430B295F /* NSString+C99ExtendedIdentifier.swift in Sources */, + E4CBF5583074BCC509DBC560ADA31C8D /* QCKDSL.m in Sources */, + 41E44158F2DFCDADF215F3E52AAF4977 /* Quick-dummy.m in Sources */, + 4036AB2ED3330BC9D2AFED23DAD3135C /* QuickConfiguration.m in Sources */, + C977B0B70A5F9C6CAA106D2BD891D6C0 /* QuickSelectedTestSuiteBuilder.swift in Sources */, + AFDFCA9333A00E08425F0B0E0A4467F0 /* QuickSpec.m in Sources */, + F76EBCE18A2F8B8606724ADF6835306B /* QuickSpecBase.m in Sources */, + E01C484D44F7BEDFF2C910515FC0E895 /* QuickTestSuite.swift in Sources */, + 4109E61407960E23A195BBB4AB44399A /* SuiteHooks.swift in Sources */, + 7F477C7A76B7970A8A07B476578EA3AB /* URL+FileName.swift in Sources */, + 3A45D5C4EFF69B3DB93B312763EBCECB /* World+DSL.swift in Sources */, + A22386BB6CA63458A5831337209A27E5 /* World.swift in Sources */, + B921141CD9A5981444EAA8777D243249 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8BDA23FB41B7F5F44CCA426372041A80 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A319BE0010C3E28A081501DEC02D460B /* CanFormatMessageInFileInFunctionAtLineWithSettings.swift in Sources */, + 9175CC691DE972B92894B8D0DEB13739 /* CanLog.swift in Sources */, + 2FB6BA9A20EAD83ED75324F472C25203 /* CanLogAtLevel.swift in Sources */, + 429A13230D19A50F73E1A8EB94FF149B /* CanLogMessage.swift in Sources */, + B2115E6040261C1F17978C027155C7EF /* CanLogMessageAtLevel.swift in Sources */, + 940D75CE09CAC444F515F4B254DF2B09 /* CanLogMessageAtLevelInFileInFunctionAtLine.swift in Sources */, + C7D78251885132569892BDFB2B4B560B /* CanLogMessageInFileInFunctionAtLine.swift in Sources */, + 83765EE19CDF5838473FBA1896421351 /* ConsoleLogger.swift in Sources */, + 209743E009847E46770B3FA3743D70EA /* HasDefaultLoglevel.swift in Sources */, + 76CF15A131981D754A9761F26E2C914C /* InjectableLoggers-dummy.m in Sources */, + 0B0E50E7BF2E185B43ED14B7A00D8D03 /* Logger.FormatSettings.swift in Sources */, + 36BA5729D64AEBFD13F7BEDB0AA5565D /* Logger.Formatter.swift in Sources */, + 1653546432C449256620F4ED0B22636E /* Logger.Settings.swift in Sources */, + 1C66C5A1A9233D020B76703EEC9F66A9 /* Logger.swift in Sources */, + 75B8ADFED3092729A652DB26249CE399 /* LogLevel.swift in Sources */, + 8A2643B9C46C3AF664B4ADA0C3B62EB1 /* MockLogger.swift in Sources */, + 9BF7EDA323A0950E2CAF7D02885DC8C0 /* SimpleLogger.Settings.swift in Sources */, + A15AFD759A553290981E3C4A991A51AD /* SimpleLogger.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D57563F3EE72E0455139DD03FF759D31 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0DEFD2DC1A85AA3BEBF8214E9242533B /* GivenWhenThen.swift in Sources */, + 1DEC54BE29857CD0BE09545E7B2ABD5F /* QuickGWT-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D8BB8538E70A5E1340098C55745753CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0093B514EDB9EB563B13ABFDDD554E0 /* Pods-QuickGWT_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E8C6AE0974631C55AF14A9E876F3A9B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65D1B9844C9369A9A5712CE94B123C0F /* Pods-QuickGWT_Tests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 197C55C2924888312487293E50EB5419 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = InjectableLoggers; + target = D5CD245C01DC2C08B05F702A59D9D4A8 /* InjectableLoggers */; + targetProxy = FB6B8E8A2D73A1E48D2D144D51A2759F /* PBXContainerItemProxy */; + }; + 2D4E47109612CE070A9D44968150E549 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = QuickGWT; + target = 92895CAF0A8E521127343E068C35C7A2 /* QuickGWT */; + targetProxy = DDEBE2250636F7127ED86C4FF96B9813 /* PBXContainerItemProxy */; + }; + 30DAC5A29F52ECFAC9100DD72CDC16C6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = MockNStub; + target = C08D88D6FF727274C04E1676A3B89865 /* MockNStub */; + targetProxy = 11015021C74B70830FAD18F04898DFEE /* PBXContainerItemProxy */; + }; + 69F3FCD712F97B85ECD9D3C87B717781 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = InjectableLoggers; + target = D5CD245C01DC2C08B05F702A59D9D4A8 /* InjectableLoggers */; + targetProxy = 82E764DC79F34333BA42EE0C00ABB9CC /* PBXContainerItemProxy */; + }; + 738F0703DE4FE456D14A2F2DC5F4D34D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = InjectableLoggers; + target = D5CD245C01DC2C08B05F702A59D9D4A8 /* InjectableLoggers */; + targetProxy = A3F3D09944ACADD143BFAC56401290F4 /* PBXContainerItemProxy */; + }; + 8AB67B55E5A47EB06F4FC2333D44227B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Pods-QuickGWT_Example"; + target = E2CA809DE79481CC9615FB051961FDC2 /* Pods-QuickGWT_Example */; + targetProxy = DAC13C3EEA6AD0BD98F2882B1E81EFC6 /* PBXContainerItemProxy */; + }; + 9048903D3019860850E247941B8BA250 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Quick; + target = 7A1D901838772835B926373F48B959E5 /* Quick */; + targetProxy = 8D37FE59D349591A945A49D335BCC525 /* PBXContainerItemProxy */; + }; + EC887359E62550D25B0D7D5BB6CFE1E1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Nimble; + target = 84B900852143C358F09CAEF776B1A86E /* Nimble */; + targetProxy = A4DC0B14587306EF7727ACDB064863F8 /* PBXContainerItemProxy */; + }; + F08F86B35A41330BAF1FC03CF964449D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Quick; + target = 7A1D901838772835B926373F48B959E5 /* Quick */; + targetProxy = FA4D3FA868B30F341E611BA9321DF3DE /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1D2B9FC0C99CAA86925A024FB79E26EB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AA70315B21C71A6216B62FCB892A768E /* QuickGWT.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/QuickGWT/QuickGWT-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/QuickGWT/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/QuickGWT/QuickGWT.modulemap"; + PRODUCT_MODULE_NAME = QuickGWT; + PRODUCT_NAME = QuickGWT; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 5F7AD9F432E9493AF0ABDA59C51EC57E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3EC87580F0CF0F5D88836A821C8E330B /* Pods-QuickGWT_Example.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-QuickGWT_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 785CCB37822195C61A8576305A5594C9 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BCE063628FC457020690501527904F64 /* Pods-QuickGWT_Tests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-QuickGWT_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 7D9C5CB18AC8AE87BB16DA8C9EBA60D8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D65384F5E52FD1989C9977C772A00948 /* InjectableLoggers.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/InjectableLoggers/InjectableLoggers-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/InjectableLoggers/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/InjectableLoggers/InjectableLoggers.modulemap"; + PRODUCT_MODULE_NAME = InjectableLoggers; + PRODUCT_NAME = InjectableLoggers; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 8B33C5230DE4A9DFA6D8F46505DD7AF7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 8FA3818EFC5C3CD221AA7F35062BCF6D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7E6EF001F145625349D09D3C53596929 /* Pods-QuickGWT_Example.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-QuickGWT_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 9841D6C44355BE9A50CB296ACD959D27 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 103D4A21C5E5B8013C4C4223001EEC82 /* Quick.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; + PRODUCT_MODULE_NAME = Quick; + PRODUCT_NAME = Quick; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + A2D68836AA89B794E657C9622617F22D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D65384F5E52FD1989C9977C772A00948 /* InjectableLoggers.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/InjectableLoggers/InjectableLoggers-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/InjectableLoggers/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/InjectableLoggers/InjectableLoggers.modulemap"; + PRODUCT_MODULE_NAME = InjectableLoggers; + PRODUCT_NAME = InjectableLoggers; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + A66134EACD56B88D5BED461FA9A883F1 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 75F48CD5F3AF8D360F63A41B2A13C1C4 /* Pods-QuickGWT_Tests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-QuickGWT_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + B42B54097A876E8A982CBF5DAA91B1AB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + B6BF9847B5AF89F27CF109872A208BF6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A1BBCE76440EE9FDFFA753BED858C43C /* Nimble.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + PRODUCT_MODULE_NAME = Nimble; + PRODUCT_NAME = Nimble; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + C2729428ED2D1B7C915646A4FF2239D7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A1BBCE76440EE9FDFFA753BED858C43C /* Nimble.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + PRODUCT_MODULE_NAME = Nimble; + PRODUCT_NAME = Nimble; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E68F5D40C91B7DB76CAE9BC7CD4C700B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AA70315B21C71A6216B62FCB892A768E /* QuickGWT.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/QuickGWT/QuickGWT-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/QuickGWT/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/QuickGWT/QuickGWT.modulemap"; + PRODUCT_MODULE_NAME = QuickGWT; + PRODUCT_NAME = QuickGWT; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E8DE1E85B5A00DDE9E3AC68AEBFADB1B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 103D4A21C5E5B8013C4C4223001EEC82 /* Quick.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; + PRODUCT_MODULE_NAME = Quick; + PRODUCT_NAME = Quick; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + FA62B04612BF93FC81203FF32FE4735A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 92AF69A2C7F0E30401A4815A535E58E9 /* MockNStub.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/MockNStub/MockNStub-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/MockNStub/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/MockNStub/MockNStub.modulemap"; + PRODUCT_MODULE_NAME = MockNStub; + PRODUCT_NAME = MockNStub; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + FD67CB345D1E073F56FCAC083AD7EDE4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 92AF69A2C7F0E30401A4815A535E58E9 /* MockNStub.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/MockNStub/MockNStub-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/MockNStub/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/MockNStub/MockNStub.modulemap"; + PRODUCT_MODULE_NAME = MockNStub; + PRODUCT_NAME = MockNStub; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8B33C5230DE4A9DFA6D8F46505DD7AF7 /* Debug */, + B42B54097A876E8A982CBF5DAA91B1AB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 41CFFA5954C6CB94E6B574C8530E49B1 /* Build configuration list for PBXNativeTarget "Nimble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C2729428ED2D1B7C915646A4FF2239D7 /* Debug */, + B6BF9847B5AF89F27CF109872A208BF6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4B768D2F954ABE68D8F473075158C007 /* Build configuration list for PBXNativeTarget "MockNStub" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FA62B04612BF93FC81203FF32FE4735A /* Debug */, + FD67CB345D1E073F56FCAC083AD7EDE4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7B2CF3ADFCAE3DC0BF0B5363F2537A24 /* Build configuration list for PBXNativeTarget "InjectableLoggers" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A2D68836AA89B794E657C9622617F22D /* Debug */, + 7D9C5CB18AC8AE87BB16DA8C9EBA60D8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A191BA0D14423D14B80F4F481958F4AB /* Build configuration list for PBXNativeTarget "Pods-QuickGWT_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 785CCB37822195C61A8576305A5594C9 /* Debug */, + A66134EACD56B88D5BED461FA9A883F1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A358A9C55999A6B2399413EA9CAFED0C /* Build configuration list for PBXNativeTarget "Quick" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E8DE1E85B5A00DDE9E3AC68AEBFADB1B /* Debug */, + 9841D6C44355BE9A50CB296ACD959D27 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + ABFC906AC10234CFAB068761AF70533E /* Build configuration list for PBXNativeTarget "Pods-QuickGWT_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8FA3818EFC5C3CD221AA7F35062BCF6D /* Debug */, + 5F7AD9F432E9493AF0ABDA59C51EC57E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E9252DA570C327C3BD77AC6B7AB6ABBB /* Build configuration list for PBXNativeTarget "QuickGWT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E68F5D40C91B7DB76CAE9BC7CD4C700B /* Debug */, + 1D2B9FC0C99CAA86925A024FB79E26EB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Example/Pods/Quick/LICENSE b/Example/Pods/Quick/LICENSE new file mode 100644 index 0000000..e900165 --- /dev/null +++ b/Example/Pods/Quick/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014, Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Example/Pods/Quick/README.md b/Example/Pods/Quick/README.md new file mode 100644 index 0000000..e6dc0ad --- /dev/null +++ b/Example/Pods/Quick/README.md @@ -0,0 +1,88 @@ +![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png) + +[![Build Status](https://travis-ci.org/Quick/Quick.svg?branch=master)](https://travis-ci.org/Quick/Quick) +[![CocoaPods](https://img.shields.io/cocoapods/v/Quick.svg)](https://cocoapods.org/pods/Quick) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Platforms](https://img.shields.io/cocoapods/p/Quick.svg)](https://cocoapods.org/pods/Quick) + +Quick is a behavior-driven development framework for Swift and Objective-C. +Inspired by [RSpec](https://github.com/rspec/rspec), [Specta](https://github.com/specta/specta), and [Ginkgo](https://github.com/onsi/ginkgo). + +![](https://raw.githubusercontent.com/Quick/Assets/master/Screenshots/QuickSpec%20screenshot.png) + +```swift +// Swift + +import Quick +import Nimble + +class TableOfContentsSpec: QuickSpec { + override func spec() { + describe("the 'Documentation' directory") { + it("has everything you need to get started") { + let sections = Directory("Documentation").sections + expect(sections).to(contain("Organized Tests with Quick Examples and Example Groups")) + expect(sections).to(contain("Installing Quick")) + } + + context("if it doesn't have what you're looking for") { + it("needs to be updated") { + let you = You(awesome: true) + expect{you.submittedAnIssue}.toEventually(beTruthy()) + } + } + } + } +} +``` +#### Nimble +Quick comes together with [Nimble](https://github.com/Quick/Nimble) — a matcher framework for your tests. You can learn why `XCTAssert()` statements make your expectations unclear and how to fix that using Nimble assertions [here](./Documentation/en-us/NimbleAssertions.md). + +## Swift Version + +Certain versions of Quick and Nimble only support certain versions of Swift. Depending on which version of Swift your project uses, you should use specific versions of Quick and Nimble. Use the table below to determine which versions of Quick and Nimble are compatible with your project. + +|Swift version |Quick version |Nimble version | +|:--------------------|:---------------|:--------------| +|Swift 3 |v1.0.0 or later |v5.0.0 or later| +|Swift 2.2 / Swift 2.3|v0.9.3 |v4.1.0 | + +## Documentation + +All documentation can be found in the [Documentation folder](./Documentation), including [detailed installation instructions](./Documentation/en-us/InstallingQuick.md) for CocoaPods, Carthage, Git submodules, and more. For example, you can install Quick and [Nimble](https://github.com/Quick/Nimble) using CocoaPods by adding the following to your Podfile: + +```rb +# Podfile + +use_frameworks! + +target "MyApp" do + # Normal libraries + + abstract_target 'Tests' do + inherit! :search_paths + target "MyAppTests" + target "MyAppUITests" + + pod 'Quick' + pod 'Nimble' + end +end +``` + +## Projects using Quick + +Over ten-thousand apps use either Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them. + +Does your organization or project use Quick and Nimble? If yes, [please add your project to the list](https://github.com/Quick/Quick/wiki/Projects-using-Quick). + +## Who uses Quick + +Similar to projects using Quick, it would be nice to hear why people use Quick and Nimble. Are there features you love? Are there features that are just okay? Are there some features we have that no one uses? + +Have something positive to say about Quick (or Nimble)? If yes, [provide a testimonial here](https://github.com/Quick/Quick/wiki/Who-uses-Quick). + + +## License + +Apache 2.0 license. See the [`LICENSE`](LICENSE) file for details. diff --git a/Example/Pods/Quick/Sources/Quick/Behavior.swift b/Example/Pods/Quick/Sources/Quick/Behavior.swift new file mode 100644 index 0000000..1d98702 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Behavior.swift @@ -0,0 +1,17 @@ +/** + A `Behavior` encapsulates a set of examples that can be re-used in several locations using the `itBehavesLike` function with a context instance of the generic type. + */ + +open class Behavior { + + open static var name: String { return String(describing: self) } + /** + override this method in your behavior to define a set of reusable examples. + + This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach` + and `afterEach` closures, as well as any number of examples (defined using `it`). + + - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject. + */ + open class func spec(_ aContext: @escaping () -> Context) {} +} diff --git a/Example/Pods/Quick/Sources/Quick/Callsite.swift b/Example/Pods/Quick/Sources/Quick/Callsite.swift new file mode 100644 index 0000000..f5e3711 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Callsite.swift @@ -0,0 +1,45 @@ +import Foundation + +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + public class _CallsiteBase: NSObject {} + #else + public class _CallsiteBase: NSObject {} + #endif +#else +public class _CallsiteBase: NSObject {} +#endif + +/** + An object encapsulating the file and line number at which + a particular example is defined. +*/ +final public class Callsite: _CallsiteBase { + /** + The absolute path of the file in which an example is defined. + */ + public let file: String + + /** + The line number on which an example is defined. + */ + public let line: UInt + + internal init(file: String, line: UInt) { + self.file = file + self.line = line + } +} + +extension Callsite { + /** + Returns a boolean indicating whether two Callsite objects are equal. + If two callsites are in the same file and on the same line, they must be equal. + */ + @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool { + return lhs.file == rhs.file && lhs.line == rhs.line + } +} diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift b/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift new file mode 100644 index 0000000..dbb95f1 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift @@ -0,0 +1,161 @@ +import Foundation + +/** + A closure that temporarily exposes a Configuration object within + the scope of the closure. +*/ +public typealias QuickConfigurer = (_ configuration: Configuration) -> Void + +/** + A closure that, given metadata about an example, returns a boolean value + indicating whether that example should be run. +*/ +public typealias ExampleFilter = (_ example: Example) -> Bool + +/** + A configuration encapsulates various options you can use + to configure Quick's behavior. +*/ +final public class Configuration: NSObject { + internal let exampleHooks = ExampleHooks() + internal let suiteHooks = SuiteHooks() + internal var exclusionFilters: [ExampleFilter] = [ { example in + if let pending = example.filterFlags[Filter.pending] { + return pending + } else { + return false + } + }] + internal var inclusionFilters: [ExampleFilter] = [ { example in + if let focused = example.filterFlags[Filter.focused] { + return focused + } else { + return false + } + }] + + /** + Run all examples if none match the configured filters. True by default. + */ + public var runAllWhenEverythingFiltered = true + + /** + Registers an inclusion filter. + + All examples are filtered using all inclusion filters. + The remaining examples are run. If no examples remain, all examples are run. + + - parameter filter: A filter that, given an example, returns a value indicating + whether that example should be included in the examples + that are run. + */ + public func include(_ filter: @escaping ExampleFilter) { + inclusionFilters.append(filter) + } + + /** + Registers an exclusion filter. + + All examples that remain after being filtered by the inclusion filters are + then filtered via all exclusion filters. + + - parameter filter: A filter that, given an example, returns a value indicating + whether that example should be excluded from the examples + that are run. + */ + public func exclude(_ filter: @escaping ExampleFilter) { + exclusionFilters.append(filter) + } + + /** + Identical to Quick.Configuration.beforeEach, except the closure is + provided with metadata on the example that the closure is being run + prior to. + */ +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + @objc(beforeEachWithMetadata:) + public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { + exampleHooks.appendBefore(closure) + } +#else + public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { + exampleHooks.appendBefore(closure) + } +#endif + + /** + Like Quick.DSL.beforeEach, this configures Quick to execute the + given closure before each example that is run. The closure + passed to this method is executed before each example Quick runs, + globally across the test suite. You may call this method multiple + times across mulitple +[QuickConfigure configure:] methods in order + to define several closures to run before each example. + + Note that, since Quick makes no guarantee as to the order in which + +[QuickConfiguration configure:] methods are evaluated, there is no + guarantee as to the order in which beforeEach closures are evaluated + either. Mulitple beforeEach defined on a single configuration, however, + will be executed in the order they're defined. + + - parameter closure: The closure to be executed before each example + in the test suite. + */ + public func beforeEach(_ closure: @escaping BeforeExampleClosure) { + exampleHooks.appendBefore(closure) + } + + /** + Identical to Quick.Configuration.afterEach, except the closure + is provided with metadata on the example that the closure is being + run after. + */ +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + @objc(afterEachWithMetadata:) + public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { + exampleHooks.appendAfter(closure) + } +#else + public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { + exampleHooks.appendAfter(closure) + } +#endif + + /** + Like Quick.DSL.afterEach, this configures Quick to execute the + given closure after each example that is run. The closure + passed to this method is executed after each example Quick runs, + globally across the test suite. You may call this method multiple + times across mulitple +[QuickConfigure configure:] methods in order + to define several closures to run after each example. + + Note that, since Quick makes no guarantee as to the order in which + +[QuickConfiguration configure:] methods are evaluated, there is no + guarantee as to the order in which afterEach closures are evaluated + either. Mulitple afterEach defined on a single configuration, however, + will be executed in the order they're defined. + + - parameter closure: The closure to be executed before each example + in the test suite. + */ + public func afterEach(_ closure: @escaping AfterExampleClosure) { + exampleHooks.appendAfter(closure) + } + + /** + Like Quick.DSL.beforeSuite, this configures Quick to execute + the given closure prior to any and all examples that are run. + The two methods are functionally equivalent. + */ + public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { + suiteHooks.appendBefore(closure) + } + + /** + Like Quick.DSL.afterSuite, this configures Quick to execute + the given closure after all examples have been run. + The two methods are functionally equivalent. + */ + public func afterSuite(_ closure: @escaping AfterSuiteClosure) { + suiteHooks.appendAfter(closure) + } +} diff --git a/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift b/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift new file mode 100644 index 0000000..94f20c5 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift @@ -0,0 +1,271 @@ +/** + Defines a closure to be run prior to any examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. + + If the test suite crashes before the first example is run, this closure + will not be executed. + + - parameter closure: The closure to be run prior to any examples in the test suite. +*/ +public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { + World.sharedWorld.beforeSuite(closure) +} + +/** + Defines a closure to be run after all of the examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. + + If the test suite crashes before all examples are run, this closure + will not be executed. + + - parameter closure: The closure to be run after all of the examples in the test suite. +*/ +public func afterSuite(_ closure: @escaping AfterSuiteClosure) { + World.sharedWorld.afterSuite(closure) +} + +/** + Defines a group of shared examples. These examples can be re-used in several locations + by using the `itBehavesLike` function. + + - parameter name: The name of the shared example group. This must be unique across all shared example + groups defined in a test suite. + - parameter closure: A closure containing the examples. This behaves just like an example group defined + using `describe` or `context`--the closure may contain any number of `beforeEach` + and `afterEach` closures, as well as any number of examples (defined using `it`). +*/ +public func sharedExamples(_ name: String, closure: @escaping () -> Void) { + World.sharedWorld.sharedExamples(name) { _ in closure() } +} + +/** + Defines a group of shared examples. These examples can be re-used in several locations + by using the `itBehavesLike` function. + + - parameter name: The name of the shared example group. This must be unique across all shared example + groups defined in a test suite. + - parameter closure: A closure containing the examples. This behaves just like an example group defined + using `describe` or `context`--the closure may contain any number of `beforeEach` + and `afterEach` closures, as well as any number of examples (defined using `it`). + + The closure takes a SharedExampleContext as an argument. This context is a function + that can be executed to retrieve parameters passed in via an `itBehavesLike` function. +*/ +public func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { + World.sharedWorld.sharedExamples(name, closure: closure) +} + +/** + Defines an example group. Example groups are logical groupings of examples. + Example groups can share setup and teardown code. + + - parameter description: An arbitrary string describing the example group. + - parameter closure: A closure that can contain other examples. + - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. +*/ +public func describe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { + World.sharedWorld.describe(description, flags: flags, closure: closure) +} + +/** + Defines an example group. Equivalent to `describe`. +*/ +public func context(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { + World.sharedWorld.context(description, flags: flags, closure: closure) +} + +/** + Defines a closure to be run prior to each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of beforeEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + - parameter closure: The closure to be run prior to each example. +*/ +public func beforeEach(_ closure: @escaping BeforeExampleClosure) { + World.sharedWorld.beforeEach(closure) +} + +/** + Identical to Quick.DSL.beforeEach, except the closure is provided with + metadata on the example that the closure is being run prior to. +*/ +public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { + World.sharedWorld.beforeEach(closure: closure) +} + +/** + Defines a closure to be run after each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of afterEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + - parameter closure: The closure to be run after each example. +*/ +public func afterEach(_ closure: @escaping AfterExampleClosure) { + World.sharedWorld.afterEach(closure) +} + +/** + Identical to Quick.DSL.afterEach, except the closure is provided with + metadata on the example that the closure is being run after. +*/ +public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { + World.sharedWorld.afterEach(closure: closure) +} + +/** + Defines an example. Examples use assertions to demonstrate how code should + behave. These are like "tests" in XCTest. + + - parameter description: An arbitrary string describing what the example is meant to specify. + - parameter closure: A closure that can contain assertions. + - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. + Empty by default. + - parameter file: The absolute path to the file containing the example. A sensible default is provided. + - parameter line: The line containing the example. A sensible default is provided. +*/ +public func it(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { + World.sharedWorld.it(description, flags: flags, file: file, line: line, closure: closure) +} + +/** + Inserts the examples defined using a `sharedExamples` function into the current example group. + The shared examples are executed at this location, as if they were written out manually. + + - parameter name: The name of the shared examples group to be executed. This must be identical to the + name of a shared examples group defined using `sharedExamples`. If there are no shared + examples that match the name given, an exception is thrown and the test suite will crash. + - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. + Empty by default. + - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. + - parameter line: The line containing the current example group. A sensible default is provided. +*/ +public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { + itBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) +} + +/** + Inserts the examples defined using a `sharedExamples` function into the current example group. + The shared examples are executed at this location, as if they were written out manually. + This function also passes those shared examples a context that can be evaluated to give the shared + examples extra information on the subject of the example. + + - parameter name: The name of the shared examples group to be executed. This must be identical to the + name of a shared examples group defined using `sharedExamples`. If there are no shared + examples that match the name given, an exception is thrown and the test suite will crash. + - parameter sharedExampleContext: A closure that, when evaluated, returns key-value pairs that provide the + shared examples with extra information on the subject of the example. + - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. + Empty by default. + - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. + - parameter line: The line containing the current example group. A sensible default is provided. +*/ +public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { + World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) +} + +/** + Inserts the examples defined using a `Behavior` into the current example group. + The shared examples are executed at this location, as if they were written out manually. + This function also passes a strongly-typed context that can be evaluated to give the shared examples extra information on the subject of the example. + + - parameter behavior: The type of `Behavior` class defining the example group to be executed. + - parameter context: A closure that, when evaluated, returns an instance of `Behavior`'s context type to provide its example group with extra information on the subject of the example. + - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. + Empty by default. + - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. + - parameter line: The line containing the current example group. A sensible default is provided. + */ +public func itBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.itBehavesLike(behavior, context: context, flags: flags, file: file, line: line) +} + +/** + Defines an example or example group that should not be executed. Use `pending` to temporarily disable + examples or groups that should not be run yet. + + - parameter description: An arbitrary string describing the example or example group. + - parameter closure: A closure that will not be evaluated. +*/ +public func pending(_ description: String, closure: () -> Void) { + World.sharedWorld.pending(description, closure: closure) +} + +/** + Use this to quickly mark a `describe` closure as pending. + This disables all examples within the closure. +*/ +public func xdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { + World.sharedWorld.xdescribe(description, flags: flags, closure: closure) +} + +/** + Use this to quickly mark a `context` closure as pending. + This disables all examples within the closure. +*/ +public func xcontext(_ description: String, flags: FilterFlags, closure: () -> Void) { + xdescribe(description, flags: flags, closure: closure) +} + +/** + Use this to quickly mark an `it` closure as pending. + This disables the example and ensures the code within the closure is never run. +*/ +public func xit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { + World.sharedWorld.xit(description, flags: flags, file: file, line: line, closure: closure) +} + +/** + Use this to quicklu mark an `itBehavesLike` closure as pending. + This disables the example group defined by this behavior and ensures the code within is never run. +*/ +public func xitBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.xitBehavesLike(behavior, context: context, flags: flags, file: file, line: line) +} +/** + Use this to quickly focus a `describe` closure, focusing the examples in the closure. + If any examples in the test suite are focused, only those examples are executed. + This trumps any explicitly focused or unfocused examples within the closure--they are all treated as focused. +*/ +public func fdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { + World.sharedWorld.fdescribe(description, flags: flags, closure: closure) +} + +/** + Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. +*/ +public func fcontext(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { + fdescribe(description, flags: flags, closure: closure) +} + +/** + Use this to quickly focus an `it` closure, focusing the example. + If any examples in the test suite are focused, only those examples are executed. +*/ +public func fit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { + World.sharedWorld.fit(description, flags: flags, file: file, line: line, closure: closure) +} + +/** + Use this to quickly focus an `itBehavesLike` closure. +*/ +public func fitBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { + fitBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) +} + +/** + Use this to quickly focus an `itBehavesLike` closure. +*/ +public func fitBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { + World.sharedWorld.fitBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) +} + +/** + Use this to quickly focus on `itBehavesLike` closure. + */ +public func fitBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.fitBehavesLike(behavior, context: context, flags: flags, file: file, line: line) +} diff --git a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift new file mode 100644 index 0000000..5249027 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift @@ -0,0 +1,205 @@ +import Foundation + +/** + Adds methods to World to support top-level DSL functions (Swift) and + macros (Objective-C). These functions map directly to the DSL that test + writers use in their specs. +*/ +extension World { + internal func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { + suiteHooks.appendBefore(closure) + } + + internal func afterSuite(_ closure: @escaping AfterSuiteClosure) { + suiteHooks.appendAfter(closure) + } + + internal func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { + registerSharedExample(name, closure: closure) + } + + internal func describe(_ description: String, flags: FilterFlags, closure: () -> Void) { + guard currentExampleMetadata == nil else { + raiseError("'describe' cannot be used inside '\(currentPhase)', 'describe' may only be used inside 'context' or 'describe'. ") + } + guard currentExampleGroup != nil else { + raiseError("Error: example group was not created by its parent QuickSpec spec. Check that describe() or context() was used in QuickSpec.spec() and not a more general context (i.e. an XCTestCase test)") + } + let group = ExampleGroup(description: description, flags: flags) + currentExampleGroup.appendExampleGroup(group) + performWithCurrentExampleGroup(group, closure: closure) + } + + internal func context(_ description: String, flags: FilterFlags, closure: () -> Void) { + guard currentExampleMetadata == nil else { + raiseError("'context' cannot be used inside '\(currentPhase)', 'context' may only be used inside 'context' or 'describe'. ") + } + self.describe(description, flags: flags, closure: closure) + } + + internal func fdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { + var focusedFlags = flags + focusedFlags[Filter.focused] = true + self.describe(description, flags: focusedFlags, closure: closure) + } + + internal func xdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { + var pendingFlags = flags + pendingFlags[Filter.pending] = true + self.describe(description, flags: pendingFlags, closure: closure) + } + + internal func beforeEach(_ closure: @escaping BeforeExampleClosure) { + guard currentExampleMetadata == nil else { + raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'. ") + } + currentExampleGroup.hooks.appendBefore(closure) + } + +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objc(beforeEachWithMetadata:) + internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { + currentExampleGroup.hooks.appendBefore(closure) + } +#else + internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { + currentExampleGroup.hooks.appendBefore(closure) + } +#endif + + internal func afterEach(_ closure: @escaping AfterExampleClosure) { + guard currentExampleMetadata == nil else { + raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'. ") + } + currentExampleGroup.hooks.appendAfter(closure) + } + +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objc(afterEachWithMetadata:) + internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { + currentExampleGroup.hooks.appendAfter(closure) + } +#else + internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { + currentExampleGroup.hooks.appendAfter(closure) + } +#endif + + internal func it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { + if beforesCurrentlyExecuting { + raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'. ") + } + if aftersCurrentlyExecuting { + raiseError("'it' cannot be used inside 'afterEach', 'it' may only be used inside 'context' or 'describe'. ") + } + guard currentExampleMetadata == nil else { + raiseError("'it' cannot be used inside 'it', 'it' may only be used inside 'context' or 'describe'. ") + } + let callsite = Callsite(file: file, line: line) + let example = Example(description: description, callsite: callsite, flags: flags, closure: closure) + currentExampleGroup.appendExample(example) + } + + internal func fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { + var focusedFlags = flags + focusedFlags[Filter.focused] = true + self.it(description, flags: focusedFlags, file: file, line: line, closure: closure) + } + + internal func xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { + var pendingFlags = flags + pendingFlags[Filter.pending] = true + self.it(description, flags: pendingFlags, file: file, line: line, closure: closure) + } + + internal func itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + guard currentExampleMetadata == nil else { + raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'. ") + } + let callsite = Callsite(file: file, line: line) + let closure = World.sharedWorld.sharedExample(name) + + let group = ExampleGroup(description: name, flags: flags) + currentExampleGroup.appendExampleGroup(group) + performWithCurrentExampleGroup(group) { + closure(sharedExampleContext) + } + + group.walkDownExamples { (example: Example) in + example.isSharedExample = true + example.callsite = callsite + } + } + + internal func fitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + var focusedFlags = flags + focusedFlags[Filter.focused] = true + self.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: focusedFlags, file: file, line: line) + } + + internal func itBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: String, line: UInt) { + guard currentExampleMetadata == nil else { + raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'. ") + } + let callsite = Callsite(file: file, line: line) + let closure = behavior.spec + let group = ExampleGroup(description: behavior.name, flags: flags) + currentExampleGroup.appendExampleGroup(group) + performWithCurrentExampleGroup(group) { + closure(context) + } + + group.walkDownExamples { (example: Example) in + example.isSharedExample = true + example.callsite = callsite + } + } + + internal func fitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: String, line: UInt) { + var focusedFlags = flags + focusedFlags[Filter.focused] = true + self.itBehavesLike(behavior, context: context, flags: focusedFlags, file: file, line: line) + } + + internal func xitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: String, line: UInt) { + var pendingFlags = flags + pendingFlags[Filter.pending] = true + self.itBehavesLike(behavior, context: context, flags: pendingFlags, file: file, line: line) + } + +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objc(itWithDescription:flags:file:line:closure:) + private func objc_it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { + it(description, flags: flags, file: file, line: line, closure: closure) + } + + @objc(fitWithDescription:flags:file:line:closure:) + private func objc_fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { + fit(description, flags: flags, file: file, line: line, closure: closure) + } + + @objc(xitWithDescription:flags:file:line:closure:) + private func objc_xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { + xit(description, flags: flags, file: file, line: line, closure: closure) + } + + @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:flags:file:line:) + private func objc_itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) + } +#endif + + internal func pending(_ description: String, closure: () -> Void) { + print("Pending: \(description)") + } + + private var currentPhase: String { + if beforesCurrentlyExecuting { + return "beforeEach" + } else if aftersCurrentlyExecuting { + return "afterEach" + } + + return "it" + } +} diff --git a/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift b/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift new file mode 100644 index 0000000..155fefd --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift @@ -0,0 +1,10 @@ +import Foundation + +internal func raiseError(_ message: String) -> Never { +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() +#endif + + // This won't be reached when ObjC is available and the exception above is raisd + fatalError(message) +} diff --git a/Example/Pods/Quick/Sources/Quick/Example.swift b/Example/Pods/Quick/Sources/Quick/Example.swift new file mode 100644 index 0000000..c15b31a --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Example.swift @@ -0,0 +1,131 @@ +import Foundation + +private var numberOfExamplesRun = 0 +private var numberOfIncludedExamples = 0 + +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + public class _ExampleBase: NSObject {} + #else + public class _ExampleBase: NSObject {} + #endif +#else +public class _ExampleBase: NSObject {} +#endif + +/** + Examples, defined with the `it` function, use assertions to + demonstrate how code should behave. These are like "tests" in XCTest. +*/ +final public class Example: _ExampleBase { + /** + A boolean indicating whether the example is a shared example; + i.e.: whether it is an example defined with `itBehavesLike`. + */ + public var isSharedExample = false + + /** + The site at which the example is defined. + This must be set correctly in order for Xcode to highlight + the correct line in red when reporting a failure. + */ + public var callsite: Callsite + + weak internal var group: ExampleGroup? + + private let internalDescription: String + private let closure: () -> Void + private let flags: FilterFlags + + internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () -> Void) { + self.internalDescription = description + self.closure = closure + self.callsite = callsite + self.flags = flags + } + + public override var description: String { + return internalDescription + } + + /** + The example name. A name is a concatenation of the name of + the example group the example belongs to, followed by the + description of the example itself. + + The example name is used to generate a test method selector + to be displayed in Xcode's test navigator. + */ + public var name: String { + guard let groupName = group?.name else { return description } + return "\(groupName), \(description)" + } + + /** + Executes the example closure, as well as all before and after + closures defined in the its surrounding example groups. + */ + public func run() { + let world = World.sharedWorld + + if numberOfIncludedExamples == 0 { + numberOfIncludedExamples = world.includedExampleCount + } + + if numberOfExamplesRun == 0 { + world.suiteHooks.executeBefores() + } + + let exampleMetadata = ExampleMetadata(example: self, exampleIndex: numberOfExamplesRun) + world.currentExampleMetadata = exampleMetadata + + world.exampleHooks.executeBefores(exampleMetadata) + group!.phase = .beforesExecuting + for before in group!.befores { + before(exampleMetadata) + } + group!.phase = .beforesFinished + + closure() + + group!.phase = .aftersExecuting + for after in group!.afters { + after(exampleMetadata) + } + group!.phase = .aftersFinished + world.exampleHooks.executeAfters(exampleMetadata) + + numberOfExamplesRun += 1 + + if !world.isRunningAdditionalSuites && numberOfExamplesRun >= numberOfIncludedExamples { + world.suiteHooks.executeAfters() + } + } + + /** + Evaluates the filter flags set on this example and on the example groups + this example belongs to. Flags set on the example are trumped by flags on + the example group it belongs to. Flags on inner example groups are trumped + by flags on outer example groups. + */ + internal var filterFlags: FilterFlags { + var aggregateFlags = flags + for (key, value) in group!.filterFlags { + aggregateFlags[key] = value + } + return aggregateFlags + } +} + +extension Example { + /** + Returns a boolean indicating whether two Example objects are equal. + If two examples are defined at the exact same callsite, they must be equal. + */ + @nonobjc public static func == (lhs: Example, rhs: Example) -> Bool { + return lhs.callsite == rhs.callsite + } +} diff --git a/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift b/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift new file mode 100644 index 0000000..129bed0 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift @@ -0,0 +1,99 @@ +import Foundation + +/** + Example groups are logical groupings of examples, defined with + the `describe` and `context` functions. Example groups can share + setup and teardown code. +*/ +final public class ExampleGroup: NSObject { + weak internal var parent: ExampleGroup? + internal let hooks = ExampleHooks() + + internal var phase: HooksPhase = .nothingExecuted + + private let internalDescription: String + private let flags: FilterFlags + private let isInternalRootExampleGroup: Bool + private var childGroups = [ExampleGroup]() + private var childExamples = [Example]() + + internal init(description: String, flags: FilterFlags, isInternalRootExampleGroup: Bool = false) { + self.internalDescription = description + self.flags = flags + self.isInternalRootExampleGroup = isInternalRootExampleGroup + } + + public override var description: String { + return internalDescription + } + + /** + Returns a list of examples that belong to this example group, + or to any of its descendant example groups. + */ + public var examples: [Example] { + return childExamples + childGroups.flatMap { $0.examples } + } + + internal var name: String? { + guard let parent = parent else { + return isInternalRootExampleGroup ? nil : description + } + + guard let name = parent.name else { return description } + return "\(name), \(description)" + } + + internal var filterFlags: FilterFlags { + var aggregateFlags = flags + walkUp { group in + for (key, value) in group.flags { + aggregateFlags[key] = value + } + } + return aggregateFlags + } + + internal var befores: [BeforeExampleWithMetadataClosure] { + var closures = Array(hooks.befores.reversed()) + walkUp { group in + closures.append(contentsOf: Array(group.hooks.befores.reversed())) + } + return Array(closures.reversed()) + } + + internal var afters: [AfterExampleWithMetadataClosure] { + var closures = hooks.afters + walkUp { group in + closures.append(contentsOf: group.hooks.afters) + } + return closures + } + + internal func walkDownExamples(_ callback: (_ example: Example) -> Void) { + for example in childExamples { + callback(example) + } + for group in childGroups { + group.walkDownExamples(callback) + } + } + + internal func appendExampleGroup(_ group: ExampleGroup) { + group.parent = self + childGroups.append(group) + } + + internal func appendExample(_ example: Example) { + example.group = self + childExamples.append(example) + } + + private func walkUp(_ callback: (_ group: ExampleGroup) -> Void) { + var group = self + while let parent = group.parent { + callback(parent) + group = parent + } + } +} diff --git a/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift b/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift new file mode 100644 index 0000000..3dd28ab --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift @@ -0,0 +1,37 @@ +import Foundation + +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + public class _ExampleMetadataBase: NSObject {} + #else + public class _ExampleMetadataBase: NSObject {} + #endif +#else +public class _ExampleMetadataBase: NSObject {} +#endif + +/** + A class that encapsulates information about an example, + including the index at which the example was executed, as + well as the example itself. +*/ +final public class ExampleMetadata: _ExampleMetadataBase { + /** + The example for which this metadata was collected. + */ + public let example: Example + + /** + The index at which this example was executed in the + test suite. + */ + public let exampleIndex: Int + + internal init(example: Example, exampleIndex: Int) { + self.example = example + self.exampleIndex = exampleIndex + } +} diff --git a/Example/Pods/Quick/Sources/Quick/Filter.swift b/Example/Pods/Quick/Sources/Quick/Filter.swift new file mode 100644 index 0000000..da137f8 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Filter.swift @@ -0,0 +1,44 @@ +import Foundation + +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + public class _FilterBase: NSObject {} + #else + public class _FilterBase: NSObject {} + #endif +#else +public class _FilterBase: NSObject {} +#endif + +/** + A mapping of string keys to booleans that can be used to + filter examples or example groups. For example, a "focused" + example would have the flags [Focused: true]. +*/ +public typealias FilterFlags = [String: Bool] + +/** + A namespace for filter flag keys, defined primarily to make the + keys available in Objective-C. +*/ +final public class Filter: _FilterBase { + /** + Example and example groups with [Focused: true] are included in test runs, + excluding all other examples without this flag. Use this to only run one or + two tests that you're currently focusing on. + */ + public class var focused: String { + return "focused" + } + + /** + Example and example groups with [Pending: true] are excluded from test runs. + Use this to temporarily suspend examples that you know do not pass yet. + */ + public class var pending: String { + return "pending" + } +} diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift b/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift new file mode 100644 index 0000000..9c7d310 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift @@ -0,0 +1,35 @@ +// MARK: Example Hooks + +/** + A closure executed before an example is run. +*/ +public typealias BeforeExampleClosure = () -> Void + +/** + A closure executed before an example is run. The closure is given example metadata, + which contains information about the example that is about to be run. +*/ +public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void + +/** + A closure executed after an example is run. +*/ +public typealias AfterExampleClosure = BeforeExampleClosure + +/** + A closure executed after an example is run. The closure is given example metadata, + which contains information about the example that has just finished running. +*/ +public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure + +// MARK: Suite Hooks + +/** + A closure executed before any examples are run. +*/ +public typealias BeforeSuiteClosure = () -> Void + +/** + A closure executed after all examples have finished running. +*/ +public typealias AfterSuiteClosure = BeforeSuiteClosure diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift b/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift new file mode 100644 index 0000000..449cbfc --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift @@ -0,0 +1,42 @@ +/** + A container for closures to be executed before and after each example. +*/ +final internal class ExampleHooks { + internal var befores: [BeforeExampleWithMetadataClosure] = [] + internal var afters: [AfterExampleWithMetadataClosure] = [] + internal var phase: HooksPhase = .nothingExecuted + + internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { + befores.append(closure) + } + + internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { + befores.append { (_: ExampleMetadata) in closure() } + } + + internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { + afters.append(closure) + } + + internal func appendAfter(_ closure: @escaping AfterExampleClosure) { + afters.append { (_: ExampleMetadata) in closure() } + } + + internal func executeBefores(_ exampleMetadata: ExampleMetadata) { + phase = .beforesExecuting + for before in befores { + before(exampleMetadata) + } + + phase = .beforesFinished + } + + internal func executeAfters(_ exampleMetadata: ExampleMetadata) { + phase = .aftersExecuting + for after in afters { + after(exampleMetadata) + } + + phase = .aftersFinished + } +} diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift b/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift new file mode 100644 index 0000000..2440158 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift @@ -0,0 +1,11 @@ +/** + A description of the execution cycle of the current example with + respect to the hooks of that example. + */ +internal enum HooksPhase { + case nothingExecuted + case beforesExecuting + case beforesFinished + case aftersExecuting + case aftersFinished +} diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift b/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift new file mode 100644 index 0000000..b39292b --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift @@ -0,0 +1,32 @@ +/** + A container for closures to be executed before and after all examples. +*/ +final internal class SuiteHooks { + internal var befores: [BeforeSuiteClosure] = [] + internal var afters: [AfterSuiteClosure] = [] + internal var phase: HooksPhase = .nothingExecuted + + internal func appendBefore(_ closure: @escaping BeforeSuiteClosure) { + befores.append(closure) + } + + internal func appendAfter(_ closure: @escaping AfterSuiteClosure) { + afters.append(closure) + } + + internal func executeBefores() { + phase = .beforesExecuting + for before in befores { + before() + } + phase = .beforesFinished + } + + internal func executeAfters() { + phase = .aftersExecuting + for after in afters { + after() + } + phase = .aftersFinished + } +} diff --git a/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift b/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift new file mode 100644 index 0000000..d7a1442 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift @@ -0,0 +1,25 @@ +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) + +import Foundation + +extension Bundle { + + /** + Locates the first bundle with a '.xctest' file extension. + */ + internal static var currentTestBundle: Bundle? { + return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } + } + + /** + Return the module name of the bundle. + Uses the bundle filename and transform it to match Xcode's transformation. + Module name has to be a valid "C99 extended identifier". + */ + internal var moduleName: String { + let fileName = bundleURL.fileName as NSString + return fileName.c99ExtendedIdentifier + } +} + +#endif diff --git a/Example/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift b/Example/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift new file mode 100644 index 0000000..ef73762 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift @@ -0,0 +1,33 @@ +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) +import Foundation + +public extension NSString { + + private static var invalidCharacters: CharacterSet = { + var invalidCharacters = CharacterSet() + + let invalidCharacterSets: [CharacterSet] = [ + .whitespacesAndNewlines, + .illegalCharacters, + .controlCharacters, + .punctuationCharacters, + .nonBaseCharacters, + .symbols + ] + + for invalidSet in invalidCharacterSets { + invalidCharacters.formUnion(invalidSet) + } + + return invalidCharacters + }() + + @objc(qck_c99ExtendedIdentifier) + var c99ExtendedIdentifier: String { + let validComponents = components(separatedBy: NSString.invalidCharacters) + let result = validComponents.joined(separator: "_") + + return result.isEmpty ? "_" : result + } +} +#endif diff --git a/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift b/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift new file mode 100644 index 0000000..415b680 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift @@ -0,0 +1,74 @@ +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) +import Foundation + +/** + Responsible for building a "Selected tests" suite. This corresponds to a single + spec, and all its examples. + */ +internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { + + /** + The test spec class to run. + */ + let testCaseClass: AnyClass! + + /** + For Objective-C classes, returns the class name. For Swift classes without, + an explicit Objective-C name, returns a module-namespaced class name + (e.g., "FooTests.FooSpec"). + */ + var testSuiteClassName: String { + return NSStringFromClass(testCaseClass) + } + + /** + Given a test case name: + + FooSpec/testFoo + + Optionally constructs a test suite builder for the named test case class + in the running test bundle. + + If no test bundle can be found, or the test case class can't be found, + initialization fails and returns `nil`. + */ + init?(forTestCaseWithName name: String) { + guard let testCaseClass = testCaseClassForTestCaseWithName(name) else { + self.testCaseClass = nil + return nil + } + + self.testCaseClass = testCaseClass + } + + /** + Returns a `QuickTestSuite` that runs the associated test case class. + */ + func buildTestSuite() -> QuickTestSuite { + return QuickTestSuite(forTestCaseClass: testCaseClass) + } + +} + +/** + Searches `Bundle.allBundles()` for an xctest bundle, then looks up the named + test case class in that bundle. + + Returns `nil` if a bundle or test case class cannot be found. + */ +private func testCaseClassForTestCaseWithName(_ name: String) -> AnyClass? { + func extractClassName(_ name: String) -> String? { + return name.components(separatedBy: "/").first + } + + guard let className = extractClassName(name) else { return nil } + guard let bundle = Bundle.currentTestBundle else { return nil } + + if let testCaseClass = bundle.classNamed(className) { return testCaseClass } + + let moduleName = bundle.moduleName + + return NSClassFromString("\(moduleName).\(className)") +} + +#endif diff --git a/Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift b/Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift new file mode 100644 index 0000000..0fe76a7 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift @@ -0,0 +1,52 @@ +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) + +import XCTest + +/** + This protocol defines the role of an object that builds test suites. + */ +internal protocol QuickTestSuiteBuilder { + + /** + Construct a `QuickTestSuite` instance with the appropriate test cases added as tests. + + Subsequent calls to this method should return equivalent test suites. + */ + func buildTestSuite() -> QuickTestSuite + +} + +/** + A base class for a class cluster of Quick test suites, that should correctly + build dynamic test suites for XCTest to execute. + */ +public class QuickTestSuite: XCTestSuite { + + private static var builtTestSuites: Set = Set() + + /** + Construct a test suite for a specific, selected subset of test cases (rather + than the default, which as all test cases). + + If this method is called multiple times for the same test case class, e.g.. + + FooSpec/testFoo + FooSpec/testBar + + It is expected that the first call should return a valid test suite, and + all subsequent calls should return `nil`. + */ + @objc + public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { + guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } + + let (inserted, _) = builtTestSuites.insert(builder.testSuiteClassName) + if inserted { + return builder.buildTestSuite() + } else { + return nil + } + } +} + +#endif diff --git a/Example/Pods/Quick/Sources/Quick/URL+FileName.swift b/Example/Pods/Quick/Sources/Quick/URL+FileName.swift new file mode 100644 index 0000000..23c4781 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/URL+FileName.swift @@ -0,0 +1,12 @@ +import Foundation + +extension URL { + + /** + Returns the path file name without file extension. + */ + var fileName: String { + return self.deletingPathExtension().lastPathComponent + } + +} diff --git a/Example/Pods/Quick/Sources/Quick/World.swift b/Example/Pods/Quick/Sources/Quick/World.swift new file mode 100644 index 0000000..127239a --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/World.swift @@ -0,0 +1,247 @@ +import Foundation + +/** + A closure that, when evaluated, returns a dictionary of key-value + pairs that can be accessed from within a group of shared examples. +*/ +public typealias SharedExampleContext = () -> [String: Any] + +/** + A closure that is used to define a group of shared examples. This + closure may contain any number of example and example groups. +*/ +public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> Void + +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + internal class _WorldBase: NSObject {} + #else + internal class _WorldBase: NSObject {} + #endif +#else +internal class _WorldBase: NSObject {} +#endif + +/** + A collection of state Quick builds up in order to work its magic. + World is primarily responsible for maintaining a mapping of QuickSpec + classes to root example groups for those classes. + + It also maintains a mapping of shared example names to shared + example closures. + + You may configure how Quick behaves by calling the -[World configure:] + method from within an overridden +[QuickConfiguration configure:] method. +*/ +final internal class World: _WorldBase { + /** + The example group that is currently being run. + The DSL requires that this group is correctly set in order to build a + correct hierarchy of example groups and their examples. + */ + internal var currentExampleGroup: ExampleGroup! + + /** + The example metadata of the test that is currently being run. + This is useful for using the Quick test metadata (like its name) at + runtime. + */ + + internal var currentExampleMetadata: ExampleMetadata? + + /** + A flag that indicates whether additional test suites are being run + within this test suite. This is only true within the context of Quick + functional tests. + */ +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + // Convention of generating Objective-C selector has been changed on Swift 3 + @objc(isRunningAdditionalSuites) + internal var isRunningAdditionalSuites = false +#else + internal var isRunningAdditionalSuites = false +#endif + + private var specs: [String: ExampleGroup] = [:] + private var sharedExamples: [String: SharedExampleClosure] = [:] + private let configuration = Configuration() + + internal private(set) var isConfigurationFinalized = false + + internal var exampleHooks: ExampleHooks {return configuration.exampleHooks } + internal var suiteHooks: SuiteHooks { return configuration.suiteHooks } + + // MARK: Singleton Constructor + + private override init() {} + + static let sharedWorld = World() + + // MARK: Public Interface + + /** + Exposes the World's Configuration object within the scope of the closure + so that it may be configured. This method must not be called outside of + an overridden +[QuickConfiguration configure:] method. + + - parameter closure: A closure that takes a Configuration object that can + be mutated to change Quick's behavior. + */ + internal func configure(_ closure: QuickConfigurer) { + assert(!isConfigurationFinalized, + "Quick cannot be configured outside of a +[QuickConfiguration configure:] method. You should not call -[World configure:] directly. Instead, subclass QuickConfiguration and override the +[QuickConfiguration configure:] method.") + closure(configuration) + } + + /** + Finalizes the World's configuration. + Any subsequent calls to World.configure() will raise. + */ + internal func finalizeConfiguration() { + isConfigurationFinalized = true + } + + /** + Returns an internally constructed root example group for the given + QuickSpec class. + + A root example group with the description "root example group" is lazily + initialized for each QuickSpec class. This root example group wraps the + top level of a -[QuickSpec spec] method--it's thanks to this group that + users can define beforeEach and it closures at the top level, like so: + + override func spec() { + // These belong to the root example group + beforeEach {} + it("is at the top level") {} + } + + - parameter cls: The QuickSpec class for which to retrieve the root example group. + - returns: The root example group for the class. + */ + internal func rootExampleGroupForSpecClass(_ cls: AnyClass) -> ExampleGroup { + let name = String(describing: cls) + + if let group = specs[name] { + return group + } else { + let group = ExampleGroup( + description: "root example group", + flags: [:], + isInternalRootExampleGroup: true + ) + specs[name] = group + return group + } + } + + /** + Returns all examples that should be run for a given spec class. + There are two filtering passes that occur when determining which examples should be run. + That is, these examples are the ones that are included by inclusion filters, and are + not excluded by exclusion filters. + + - parameter specClass: The QuickSpec subclass for which examples are to be returned. + - returns: A list of examples to be run as test invocations. + */ + internal func examples(_ specClass: AnyClass) -> [Example] { + // 1. Grab all included examples. + let included = includedExamples + // 2. Grab the intersection of (a) examples for this spec, and (b) included examples. + let spec = rootExampleGroupForSpecClass(specClass).examples.filter { included.contains($0) } + // 3. Remove all excluded examples. + return spec.filter { example in + !self.configuration.exclusionFilters.reduce(false) { $0 || $1(example) } + } + } + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + @objc(examplesForSpecClass:) + private func objc_examples(_ specClass: AnyClass) -> [Example] { + return examples(specClass) + } +#endif + + // MARK: Internal + + internal func registerSharedExample(_ name: String, closure: @escaping SharedExampleClosure) { + raiseIfSharedExampleAlreadyRegistered(name) + sharedExamples[name] = closure + } + + internal func sharedExample(_ name: String) -> SharedExampleClosure { + raiseIfSharedExampleNotRegistered(name) + return sharedExamples[name]! + } + + internal var includedExampleCount: Int { + return includedExamples.count + } + + internal var beforesCurrentlyExecuting: Bool { + let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting + let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting + var groupBeforesExecuting = false + if let runningExampleGroup = currentExampleMetadata?.example.group { + groupBeforesExecuting = runningExampleGroup.phase == .beforesExecuting + } + + return suiteBeforesExecuting || exampleBeforesExecuting || groupBeforesExecuting + } + + internal var aftersCurrentlyExecuting: Bool { + let suiteAftersExecuting = suiteHooks.phase == .aftersExecuting + let exampleAftersExecuting = exampleHooks.phase == .aftersExecuting + var groupAftersExecuting = false + if let runningExampleGroup = currentExampleMetadata?.example.group { + groupAftersExecuting = runningExampleGroup.phase == .aftersExecuting + } + + return suiteAftersExecuting || exampleAftersExecuting || groupAftersExecuting + } + + internal func performWithCurrentExampleGroup(_ group: ExampleGroup, closure: () -> Void) { + let previousExampleGroup = currentExampleGroup + currentExampleGroup = group + + closure() + + currentExampleGroup = previousExampleGroup + } + + private var allExamples: [Example] { + var all: [Example] = [] + for (_, group) in specs { + group.walkDownExamples { all.append($0) } + } + return all + } + + private var includedExamples: [Example] { + let all = allExamples + let included = all.filter { example in + return self.configuration.inclusionFilters.reduce(false) { $0 || $1(example) } + } + + if included.isEmpty && configuration.runAllWhenEverythingFiltered { + return all + } else { + return included + } + } + + private func raiseIfSharedExampleAlreadyRegistered(_ name: String) { + if sharedExamples[name] != nil { + raiseError("A shared example named '\(name)' has already been registered.") + } + } + + private func raiseIfSharedExampleNotRegistered(_ name: String) { + if sharedExamples[name] == nil { + raiseError("No shared example named '\(name)' has been registered. Registered shared examples: '\(Array(sharedExamples.keys))'") + } + } +} diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h new file mode 100644 index 0000000..5646199 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h @@ -0,0 +1,30 @@ +#import + +@class Configuration; + +/** + Subclass QuickConfiguration and override the +[QuickConfiguration configure:] + method in order to configure how Quick behaves when running specs, or to define + shared examples that are used across spec files. + */ +@interface QuickConfiguration : NSObject + +/** + This method is executed on each subclass of this class before Quick runs + any examples. You may override this method on as many subclasses as you like, but + there is no guarantee as to the order in which these methods are executed. + + You can override this method in order to: + + 1. Configure how Quick behaves, by modifying properties on the Configuration object. + Setting the same properties in several methods has undefined behavior. + + 2. Define shared examples using `sharedExamples`. + + @param configuration A mutable object that is used to configure how Quick behaves on + a framework level. For details on all the options, see the + documentation in Configuration.swift. + */ ++ (void)configure:(Configuration *)configuration; + +@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m new file mode 100644 index 0000000..937b818 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m @@ -0,0 +1,83 @@ +#import "QuickConfiguration.h" +#import "World.h" +#import + +typedef void (^QCKClassEnumerationBlock)(Class klass); + +/** + Finds all direct subclasses of the given class and passes them to the block provided. + The classes are iterated over in the order that objc_getClassList returns them. + + @param klass The base class to find subclasses of. + @param block A block that takes a Class. This block will be executed once for each subclass of klass. + */ +void qck_enumerateSubclasses(Class klass, QCKClassEnumerationBlock block) { + Class *classes = NULL; + int classesCount = objc_getClassList(NULL, 0); + + if (classesCount > 0) { + classes = (Class *)calloc(sizeof(Class), classesCount); + classesCount = objc_getClassList(classes, classesCount); + + Class subclass, superclass; + for(int i = 0; i < classesCount; i++) { + subclass = classes[i]; + superclass = class_getSuperclass(subclass); + if (superclass == klass && block) { + block(subclass); + } + } + + free(classes); + } +} + +@implementation QuickConfiguration + +#pragma mark - Object Lifecycle + +/** + QuickConfiguration is not meant to be instantiated; it merely provides a hook + for users to configure how Quick behaves. Raise an exception if an instance of + QuickConfiguration is created. + */ +- (instancetype)init { + NSString *className = NSStringFromClass([self class]); + NSString *selectorName = NSStringFromSelector(@selector(configure:)); + [NSException raise:NSInternalInconsistencyException + format:@"%@ is not meant to be instantiated; " + @"subclass %@ and override %@ to configure Quick.", + className, className, selectorName]; + return nil; +} + +#pragma mark - NSObject Overrides + +/** + Hook into when QuickConfiguration is initialized in the runtime in order to + call +[QuickConfiguration configure:] on each of its subclasses. + */ ++ (void)initialize { + // Only enumerate over the subclasses of QuickConfiguration, not any of its subclasses. + if ([self class] == [QuickConfiguration class]) { + + // Only enumerate over subclasses once, even if +[QuickConfiguration initialize] + // were to be called several times. This is necessary because +[QuickSpec initialize] + // manually calls +[QuickConfiguration initialize]. + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + qck_enumerateSubclasses([QuickConfiguration class], ^(__unsafe_unretained Class klass) { + [[World sharedWorld] configure:^(Configuration *configuration) { + [klass configure:configuration]; + }]; + }); + [[World sharedWorld] finalizeConfiguration]; + }); + } +} + +#pragma mark - Public Interface + ++ (void)configure:(Configuration *)configuration { } + +@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h new file mode 100644 index 0000000..c5f3152 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h @@ -0,0 +1,234 @@ +#import + +@class ExampleMetadata; + +/** + Provides a hook for Quick to be configured before any examples are run. + Within this scope, override the +[QuickConfiguration configure:] method + to set properties on a configuration object to customize Quick behavior. + For details, see the documentation for Configuraiton.swift. + + @param name The name of the configuration class. Like any Objective-C + class name, this must be unique to the current runtime + environment. + */ +#define QuickConfigurationBegin(name) \ + @interface name : QuickConfiguration; @end \ + @implementation name \ + + +/** + Marks the end of a Quick configuration. + Make sure you put this after `QuickConfigurationBegin`. + */ +#define QuickConfigurationEnd \ + @end \ + + +/** + Defines a new QuickSpec. Define examples and example groups within the space + between this and `QuickSpecEnd`. + + @param name The name of the spec class. Like any Objective-C class name, this + must be unique to the current runtime environment. + */ +#define QuickSpecBegin(name) \ + @interface name : QuickSpec; @end \ + @implementation name \ + - (void)spec { \ + + +/** + Marks the end of a QuickSpec. Make sure you put this after `QuickSpecBegin`. + */ +#define QuickSpecEnd \ + } \ + @end \ + +typedef NSDictionary *(^QCKDSLSharedExampleContext)(void); +typedef void (^QCKDSLSharedExampleBlock)(QCKDSLSharedExampleContext); +typedef void (^QCKDSLEmptyBlock)(void); +typedef void (^QCKDSLExampleMetadataBlock)(ExampleMetadata *exampleMetadata); + +#define QUICK_EXPORT FOUNDATION_EXPORT + +QUICK_EXPORT void qck_beforeSuite(QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_afterSuite(QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure); +QUICK_EXPORT void qck_describe(NSString *description, QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_context(NSString *description, QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_beforeEach(QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure); +QUICK_EXPORT void qck_afterEach(QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure); +QUICK_EXPORT void qck_pending(NSString *description, QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure); +QUICK_EXPORT void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure); + +#ifndef QUICK_DISABLE_SHORT_SYNTAX +/** + Defines a closure to be run prior to any examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. + + If the test suite crashes before the first example is run, this closure + will not be executed. + + @param closure The closure to be run prior to any examples in the test suite. + */ +static inline void beforeSuite(QCKDSLEmptyBlock closure) { + qck_beforeSuite(closure); +} + + +/** + Defines a closure to be run after all of the examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. + + If the test suite crashes before all examples are run, this closure + will not be executed. + + @param closure The closure to be run after all of the examples in the test suite. + */ +static inline void afterSuite(QCKDSLEmptyBlock closure) { + qck_afterSuite(closure); +} + +/** + Defines a group of shared examples. These examples can be re-used in several locations + by using the `itBehavesLike` function. + + @param name The name of the shared example group. This must be unique across all shared example + groups defined in a test suite. + @param closure A closure containing the examples. This behaves just like an example group defined + using `describe` or `context`--the closure may contain any number of `beforeEach` + and `afterEach` closures, as well as any number of examples (defined using `it`). + */ +static inline void sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure) { + qck_sharedExamples(name, closure); +} + +/** + Defines an example group. Example groups are logical groupings of examples. + Example groups can share setup and teardown code. + + @param description An arbitrary string describing the example group. + @param closure A closure that can contain other examples. + */ +static inline void describe(NSString *description, QCKDSLEmptyBlock closure) { + qck_describe(description, closure); +} + +/** + Defines an example group. Equivalent to `describe`. + */ +static inline void context(NSString *description, QCKDSLEmptyBlock closure) { + qck_context(description, closure); +} + +/** + Defines a closure to be run prior to each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of beforeEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + @param closure The closure to be run prior to each example. + */ +static inline void beforeEach(QCKDSLEmptyBlock closure) { + qck_beforeEach(closure); +} + +/** + Identical to QCKDSL.beforeEach, except the closure is provided with + metadata on the example that the closure is being run prior to. + */ +static inline void beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure) { + qck_beforeEachWithMetadata(closure); +} + +/** + Defines a closure to be run after each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of afterEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + @param closure The closure to be run after each example. + */ +static inline void afterEach(QCKDSLEmptyBlock closure) { + qck_afterEach(closure); +} + +/** + Identical to QCKDSL.afterEach, except the closure is provided with + metadata on the example that the closure is being run after. + */ +static inline void afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { + qck_afterEachWithMetadata(closure); +} + +/** + Defines an example or example group that should not be executed. Use `pending` to temporarily disable + examples or groups that should not be run yet. + + @param description An arbitrary string describing the example or example group. + @param closure A closure that will not be evaluated. + */ +static inline void pending(NSString *description, QCKDSLEmptyBlock closure) { + qck_pending(description, closure); +} + +/** + Use this to quickly mark a `describe` block as pending. + This disables all examples within the block. + */ +static inline void xdescribe(NSString *description, QCKDSLEmptyBlock closure) { + qck_xdescribe(description, closure); +} + +/** + Use this to quickly mark a `context` block as pending. + This disables all examples within the block. + */ +static inline void xcontext(NSString *description, QCKDSLEmptyBlock closure) { + qck_xcontext(description, closure); +} + +/** + Use this to quickly focus a `describe` block, focusing the examples in the block. + If any examples in the test suite are focused, only those examples are executed. + This trumps any explicitly focused or unfocused examples within the block--they are all treated as focused. + */ +static inline void fdescribe(NSString *description, QCKDSLEmptyBlock closure) { + qck_fdescribe(description, closure); +} + +/** + Use this to quickly focus a `context` block. Equivalent to `fdescribe`. + */ +static inline void fcontext(NSString *description, QCKDSLEmptyBlock closure) { + qck_fcontext(description, closure); +} + +#define it qck_it +#define xit qck_xit +#define fit qck_fit +#define itBehavesLike qck_itBehavesLike +#define xitBehavesLike qck_xitBehavesLike +#define fitBehavesLike qck_fitBehavesLike +#endif + +#define qck_it qck_it_builder(@{}, @(__FILE__), __LINE__) +#define qck_xit qck_it_builder(@{Filter.pending: @YES}, @(__FILE__), __LINE__) +#define qck_fit qck_it_builder(@{Filter.focused: @YES}, @(__FILE__), __LINE__) +#define qck_itBehavesLike qck_itBehavesLike_builder(@{}, @(__FILE__), __LINE__) +#define qck_xitBehavesLike qck_itBehavesLike_builder(@{Filter.pending: @YES}, @(__FILE__), __LINE__) +#define qck_fitBehavesLike qck_itBehavesLike_builder(@{Filter.focused: @YES}, @(__FILE__), __LINE__) + +typedef void (^QCKItBlock)(NSString *description, QCKDSLEmptyBlock closure); +typedef void (^QCKItBehavesLikeBlock)(NSString *description, QCKDSLSharedExampleContext context); + +QUICK_EXPORT QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line); +QUICK_EXPORT QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line); diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m new file mode 100644 index 0000000..10e8a3d --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m @@ -0,0 +1,79 @@ +#import "QCKDSL.h" +#import "World.h" +#import "World+DSL.h" + +void qck_beforeSuite(QCKDSLEmptyBlock closure) { + [[World sharedWorld] beforeSuite:closure]; +} + +void qck_afterSuite(QCKDSLEmptyBlock closure) { + [[World sharedWorld] afterSuite:closure]; +} + +void qck_sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure) { + [[World sharedWorld] sharedExamples:name closure:closure]; +} + +void qck_describe(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] describe:description flags:@{} closure:closure]; +} + +void qck_context(NSString *description, QCKDSLEmptyBlock closure) { + qck_describe(description, closure); +} + +void qck_beforeEach(QCKDSLEmptyBlock closure) { + [[World sharedWorld] beforeEach:closure]; +} + +void qck_beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure) { + [[World sharedWorld] beforeEachWithMetadata:closure]; +} + +void qck_afterEach(QCKDSLEmptyBlock closure) { + [[World sharedWorld] afterEach:closure]; +} + +void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { + [[World sharedWorld] afterEachWithMetadata:closure]; +} + +QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line) { + return ^(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] itWithDescription:description + flags:flags + file:file + line:line + closure:closure]; + }; +} + +QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line) { + return ^(NSString *name, QCKDSLSharedExampleContext context) { + [[World sharedWorld] itBehavesLikeSharedExampleNamed:name + sharedExampleContext:context + flags:flags + file:file + line:line]; + }; +} + +void qck_pending(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] pending:description closure:closure]; +} + +void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] xdescribe:description flags:@{} closure:closure]; +} + +void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure) { + qck_xdescribe(description, closure); +} + +void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] fdescribe:description flags:@{} closure:closure]; +} + +void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure) { + qck_fdescribe(description, closure); +} diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h new file mode 100644 index 0000000..9f528ec --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h @@ -0,0 +1,24 @@ +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else +#import +#endif + +@interface World (SWIFT_EXTENSION(Quick)) +- (void)beforeSuite:(void (^ __nonnull)(void))closure; +- (void)afterSuite:(void (^ __nonnull)(void))closure; +- (void)sharedExamples:(NSString * __nonnull)name closure:(void (^ __nonnull)(NSDictionary * __nonnull (^ __nonnull)(void)))closure; +- (void)describe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; +- (void)context:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; +- (void)fdescribe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; +- (void)xdescribe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; +- (void)beforeEach:(void (^ __nonnull)(void))closure; +- (void)beforeEachWithMetadata:(void (^ __nonnull)(ExampleMetadata * __nonnull))closure; +- (void)afterEach:(void (^ __nonnull)(void))closure; +- (void)afterEachWithMetadata:(void (^ __nonnull)(ExampleMetadata * __nonnull))closure; +- (void)itWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; +- (void)fitWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; +- (void)xitWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; +- (void)itBehavesLikeSharedExampleNamed:(NSString * __nonnull)name sharedExampleContext:(NSDictionary * __nonnull (^ __nonnull)(void))sharedExampleContext flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line; +- (void)pending:(NSString * __nonnull)description closure:(void (^ __nonnull)(void))closure; +@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h b/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h new file mode 100644 index 0000000..87dad10 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h @@ -0,0 +1,11 @@ +#import + +//! Project version number for Quick. +FOUNDATION_EXPORT double QuickVersionNumber; + +//! Project version string for Quick. +FOUNDATION_EXPORT const unsigned char QuickVersionString[]; + +#import "QuickSpec.h" +#import "QCKDSL.h" +#import "QuickConfiguration.h" diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h new file mode 100644 index 0000000..21bc772 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h @@ -0,0 +1,56 @@ +#import + +/** + QuickSpec is a base class all specs written in Quick inherit from. + They need to inherit from QuickSpec, a subclass of XCTestCase, in + order to be discovered by the XCTest framework. + + XCTest automatically compiles a list of XCTestCase subclasses included + in the test target. It iterates over each class in that list, and creates + a new instance of that class for each test method. It then creates an + "invocation" to execute that test method. The invocation is an instance of + NSInvocation, which represents a single message send in Objective-C. + The invocation is set on the XCTestCase instance, and the test is run. + + Most of the code in QuickSpec is dedicated to hooking into XCTest events. + First, when the spec is first loaded and before it is sent any messages, + the +[NSObject initialize] method is called. QuickSpec overrides this method + to call +[QuickSpec spec]. This builds the example group stacks and + registers them with Quick.World, a global register of examples. + + Then, XCTest queries QuickSpec for a list of test methods. Normally, XCTest + automatically finds all methods whose selectors begin with the string "test". + However, QuickSpec overrides this default behavior by implementing the + +[XCTestCase testInvocations] method. This method iterates over each example + registered in Quick.World, defines a new method for that example, and + returns an invocation to call that method to XCTest. Those invocations are + the tests that are run by XCTest. Their selector names are displayed in + the Xcode test navigation bar. + */ +@interface QuickSpec : XCTestCase + +/** + Override this method in your spec to define a set of example groups + and examples. + + @code + override func spec() { + describe("winter") { + it("is coming") { + // ... + } + } + } + @endcode + + See DSL.swift for more information on what syntax is available. + */ +- (void)spec; + +/** + Returns the currently executing spec. Use in specs that require XCTestCase + methds, e.g. expectationWithDescription. +*/ +@property (class, nonatomic, readonly) QuickSpec *current; + +@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m new file mode 100644 index 0000000..4d5d37b --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m @@ -0,0 +1,149 @@ +#import "QuickSpec.h" +#import "QuickConfiguration.h" +#import "World.h" +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else +#import +#endif + +static QuickSpec *currentSpec = nil; + +@interface QuickSpec () +@property (nonatomic, strong) Example *example; +@end + +@implementation QuickSpec + +#pragma mark - XCTestCase Overrides + +/** + The runtime sends initialize to each class in a program just before the class, or any class + that inherits from it, is sent its first message from within the program. QuickSpec hooks into + this event to compile the example groups for this spec subclass. + + If an exception occurs when compiling the examples, report it to the user. Chances are they + included an expectation outside of a "it", "describe", or "context" block. + */ ++ (void)initialize { + [QuickConfiguration initialize]; + + World *world = [World sharedWorld]; + [world performWithCurrentExampleGroup:[world rootExampleGroupForSpecClass:self] closure:^{ + QuickSpec *spec = [self new]; + + @try { + [spec spec]; + } + @catch (NSException *exception) { + [NSException raise:NSInternalInconsistencyException + format:@"An exception occurred when building Quick's example groups.\n" + @"Some possible reasons this might happen include:\n\n" + @"- An 'expect(...).to' expectation was evaluated outside of " + @"an 'it', 'context', or 'describe' block\n" + @"- 'sharedExamples' was called twice with the same name\n" + @"- 'itBehavesLike' was called with a name that is not registered as a shared example\n\n" + @"Here's the original exception: '%@', reason: '%@', userInfo: '%@'", + exception.name, exception.reason, exception.userInfo]; + } + [self testInvocations]; + }]; +} + +/** + Invocations for each test method in the test case. QuickSpec overrides this method to define a + new method for each example defined in +[QuickSpec spec]. + + @return An array of invocations that execute the newly defined example methods. + */ ++ (NSArray *)testInvocations { + NSArray *examples = [[World sharedWorld] examplesForSpecClass:[self class]]; + NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:[examples count]]; + + NSMutableSet *selectorNames = [NSMutableSet set]; + + for (Example *example in examples) { + SEL selector = [self addInstanceMethodForExample:example classSelectorNames:selectorNames]; + + NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.selector = selector; + + [invocations addObject:invocation]; + } + + return invocations; +} + +#pragma mark - Public Interface + +- (void)spec { } + ++ (QuickSpec*) current { + return currentSpec; +} + +#pragma mark - Internal Methods + +/** + QuickSpec uses this method to dynamically define a new instance method for the + given example. The instance method runs the example, catching any exceptions. + The exceptions are then reported as test failures. + + In order to report the correct file and line number, examples must raise exceptions + containing following keys in their userInfo: + + - "SenTestFilenameKey": A String representing the file name + - "SenTestLineNumberKey": An Int representing the line number + + These keys used to be used by SenTestingKit, and are still used by some testing tools + in the wild. See: https://github.com/Quick/Quick/pull/41 + + @return The selector of the newly defined instance method. + */ ++ (SEL)addInstanceMethodForExample:(Example *)example classSelectorNames:(NSMutableSet *)selectorNames { + IMP implementation = imp_implementationWithBlock(^(QuickSpec *self){ + self.example = example; + currentSpec = self; + [example run]; + }); + + const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(void), @encode(id), @encode(SEL)] UTF8String]; + + NSString *originalName = example.name.qck_c99ExtendedIdentifier; + NSString *selectorName = originalName; + NSUInteger i = 2; + + while ([selectorNames containsObject:selectorName]) { + selectorName = [NSString stringWithFormat:@"%@_%tu", originalName, i++]; + } + + [selectorNames addObject:selectorName]; + + SEL selector = NSSelectorFromString(selectorName); + class_addMethod(self, selector, implementation, types); + + return selector; +} + +/** + This method is used to record failures, whether they represent example + expectations that were not met, or exceptions raised during test setup + and teardown. By default, the failure will be reported as an + XCTest failure, and the example will be highlighted in Xcode. + */ +- (void)recordFailureWithDescription:(NSString *)description + inFile:(NSString *)filePath + atLine:(NSUInteger)lineNumber + expected:(BOOL)expected { + if (self.example.isSharedExample) { + filePath = self.example.callsite.file; + lineNumber = self.example.callsite.line; + } + [currentSpec.testRun recordFailureWithDescription:description + inFile:filePath + atLine:lineNumber + expected:expected]; +} + +@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/World.h b/Example/Pods/Quick/Sources/QuickObjectiveC/World.h new file mode 100644 index 0000000..8cfed06 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/World.h @@ -0,0 +1,22 @@ +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else +#import +#endif + +@class ExampleGroup; +@class ExampleMetadata; + +SWIFT_CLASS("_TtC5Quick5World") +@interface World + +@property (nonatomic) ExampleGroup * __nullable currentExampleGroup; +@property (nonatomic) ExampleMetadata * __nullable currentExampleMetadata; +@property (nonatomic) BOOL isRunningAdditionalSuites; ++ (World * __nonnull)sharedWorld; +- (void)configure:(void (^ __nonnull)(Configuration * __nonnull))closure; +- (void)finalizeConfiguration; +- (ExampleGroup * __nonnull)rootExampleGroupForSpecClass:(Class __nonnull)cls; +- (NSArray * __nonnull)examplesForSpecClass:(Class __nonnull)specClass; +- (void)performWithCurrentExampleGroup:(ExampleGroup * __nonnull)group closure:(void (^ __nonnull)(void))closure; +@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m b/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m new file mode 100644 index 0000000..e39ed69 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m @@ -0,0 +1,44 @@ +#import +#import +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else +#import +#endif + +@interface XCTestSuite (QuickTestSuiteBuilder) +@end + +@implementation XCTestSuite (QuickTestSuiteBuilder) + +/** + In order to ensure we can correctly build dynamic test suites, we need to + replace some of the default test suite constructors. + */ ++ (void)load { + Method testCaseWithName = class_getClassMethod(self, @selector(testSuiteForTestCaseWithName:)); + Method hooked_testCaseWithName = class_getClassMethod(self, @selector(qck_hooked_testSuiteForTestCaseWithName:)); + method_exchangeImplementations(testCaseWithName, hooked_testCaseWithName); +} + +/** + The `+testSuiteForTestCaseWithName:` method is called when a specific test case + class is run from the Xcode test navigator. If the built test suite is `nil`, + Xcode will not run any tests for that test case. + + Given if the following test case class is run from the Xcode test navigator: + + FooSpec + testFoo + testBar + + XCTest will invoke this once per test case, with test case names following this format: + + FooSpec/testFoo + FooSpec/testBar + */ ++ (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name { + return [QuickTestSuite selectedTestSuiteForTestCaseWithName:name]; +} + +@end diff --git a/Example/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m b/Example/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m new file mode 100644 index 0000000..10b6f7e --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m @@ -0,0 +1,55 @@ +#import "QuickSpecBase.h" + +#pragma mark - _QuickSelectorWrapper + +@interface _QuickSelectorWrapper () +@property(nonatomic, assign) SEL selector; +@end + +@implementation _QuickSelectorWrapper + +- (instancetype)initWithSelector:(SEL)selector { + self = [super init]; + _selector = selector; + return self; +} + +@end + + +#pragma mark - _QuickSpecBase + +@implementation _QuickSpecBase + +- (instancetype)init { + self = [super initWithInvocation: nil]; + return self; +} + +/** + Invocations for each test method in the test case. QuickSpec overrides this method to define a + new method for each example defined in +[QuickSpec spec]. + + @return An array of invocations that execute the newly defined example methods. + */ ++ (NSArray *)testInvocations { + NSArray<_QuickSelectorWrapper *> *wrappers = [self _qck_testMethodSelectors]; + NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:wrappers.count]; + + for (_QuickSelectorWrapper *wrapper in wrappers) { + SEL selector = wrapper.selector; + NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.selector = selector; + + [invocations addObject:invocation]; + } + + return invocations; +} + ++ (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors { + return @[]; +} + +@end diff --git a/Example/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h b/Example/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h new file mode 100644 index 0000000..8881ca0 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h @@ -0,0 +1,11 @@ +#import +#import + +@interface _QuickSelectorWrapper : NSObject +- (instancetype)initWithSelector:(SEL)selector; +@end + +@interface _QuickSpecBase : XCTestCase ++ (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors; +- (instancetype)init NS_DESIGNATED_INITIALIZER; +@end diff --git a/Example/Pods/Target Support Files/InjectableLoggers/Info.plist b/Example/Pods/Target Support Files/InjectableLoggers/Info.plist new file mode 100644 index 0000000..2a9158a --- /dev/null +++ b/Example/Pods/Target Support Files/InjectableLoggers/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-dummy.m b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-dummy.m new file mode 100644 index 0000000..8a58607 --- /dev/null +++ b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_InjectableLoggers : NSObject +@end +@implementation PodsDummy_InjectableLoggers +@end diff --git a/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-prefix.pch b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-umbrella.h b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-umbrella.h new file mode 100644 index 0000000..15361eb --- /dev/null +++ b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double InjectableLoggersVersionNumber; +FOUNDATION_EXPORT const unsigned char InjectableLoggersVersionString[]; + diff --git a/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers.modulemap b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers.modulemap new file mode 100644 index 0000000..ee3485e --- /dev/null +++ b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers.modulemap @@ -0,0 +1,6 @@ +framework module InjectableLoggers { + umbrella header "InjectableLoggers-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers.xcconfig b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers.xcconfig new file mode 100644 index 0000000..b9fe81a --- /dev/null +++ b/Example/Pods/Target Support Files/InjectableLoggers/InjectableLoggers.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/InjectableLoggers +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/MockNStub/Info.plist b/Example/Pods/Target Support Files/MockNStub/Info.plist new file mode 100644 index 0000000..97eeeda --- /dev/null +++ b/Example/Pods/Target Support Files/MockNStub/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.1.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/MockNStub/MockNStub-dummy.m b/Example/Pods/Target Support Files/MockNStub/MockNStub-dummy.m new file mode 100644 index 0000000..88296bb --- /dev/null +++ b/Example/Pods/Target Support Files/MockNStub/MockNStub-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_MockNStub : NSObject +@end +@implementation PodsDummy_MockNStub +@end diff --git a/Example/Pods/Target Support Files/MockNStub/MockNStub-prefix.pch b/Example/Pods/Target Support Files/MockNStub/MockNStub-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/MockNStub/MockNStub-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/MockNStub/MockNStub-umbrella.h b/Example/Pods/Target Support Files/MockNStub/MockNStub-umbrella.h new file mode 100644 index 0000000..0834b2b --- /dev/null +++ b/Example/Pods/Target Support Files/MockNStub/MockNStub-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double MockNStubVersionNumber; +FOUNDATION_EXPORT const unsigned char MockNStubVersionString[]; + diff --git a/Example/Pods/Target Support Files/MockNStub/MockNStub.modulemap b/Example/Pods/Target Support Files/MockNStub/MockNStub.modulemap new file mode 100644 index 0000000..cb4bf38 --- /dev/null +++ b/Example/Pods/Target Support Files/MockNStub/MockNStub.modulemap @@ -0,0 +1,6 @@ +framework module MockNStub { + umbrella header "MockNStub-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/MockNStub/MockNStub.xcconfig b/Example/Pods/Target Support Files/MockNStub/MockNStub.xcconfig new file mode 100644 index 0000000..d4825b3 --- /dev/null +++ b/Example/Pods/Target Support Files/MockNStub/MockNStub.xcconfig @@ -0,0 +1,11 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MockNStub +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = -framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/MockNStub +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Nimble/Info.plist b/Example/Pods/Target Support Files/Nimble/Info.plist new file mode 100644 index 0000000..222481b --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 7.1.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-dummy.m b/Example/Pods/Target Support Files/Nimble/Nimble-dummy.m new file mode 100644 index 0000000..e8177ab --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Nimble-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Nimble : NSObject +@end +@implementation PodsDummy_Nimble +@end diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch b/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h new file mode 100644 index 0000000..3a2c2c8 --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h @@ -0,0 +1,24 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "Nimble.h" +#import "DSL.h" +#import "NMBExceptionCapture.h" +#import "NMBStringify.h" +#import "CwlCatchException.h" +#import "CwlMachBadInstructionHandler.h" +#import "mach_excServer.h" +#import "CwlPreconditionTesting.h" + +FOUNDATION_EXPORT double NimbleVersionNumber; +FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Nimble/Nimble.modulemap b/Example/Pods/Target Support Files/Nimble/Nimble.modulemap new file mode 100644 index 0000000..6f77009 --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Nimble.modulemap @@ -0,0 +1,6 @@ +framework module Nimble { + umbrella header "Nimble-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Nimble/Nimble.xcconfig b/Example/Pods/Target Support Files/Nimble/Nimble.xcconfig new file mode 100644 index 0000000..766d0bb --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Nimble.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble +ENABLE_BITCODE = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = -weak-lswiftXCTest -weak_framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) -suppress-warnings $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Info.plist b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-acknowledgements.markdown new file mode 100644 index 0000000..80e050f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-acknowledgements.markdown @@ -0,0 +1,254 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## InjectableLoggers + +Copyright (c) 2018 mclovink@me.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +## Quick + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014, Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +## QuickGWT + +Copyright (c) 2018 mennolovink + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-acknowledgements.plist new file mode 100644 index 0000000..979a9fc --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-acknowledgements.plist @@ -0,0 +1,298 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2018 mclovink@me.com <mclovink@me.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + InjectableLoggers + Type + PSGroupSpecifier + + + FooterText + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014, Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + License + Apache 2.0 + Title + Quick + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2018 mennolovink <mclovink@me.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + QuickGWT + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-dummy.m b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-dummy.m new file mode 100644 index 0000000..d2c6762 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_QuickGWT_Example : NSObject +@end +@implementation PodsDummy_Pods_QuickGWT_Example +@end diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-frameworks.sh new file mode 100755 index 0000000..2e2f23a --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-frameworks.sh @@ -0,0 +1,157 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/InjectableLoggers/InjectableLoggers.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" + install_framework "${BUILT_PRODUCTS_DIR}/QuickGWT/QuickGWT.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/InjectableLoggers/InjectableLoggers.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" + install_framework "${BUILT_PRODUCTS_DIR}/QuickGWT/QuickGWT.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-resources.sh b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-resources.sh new file mode 100755 index 0000000..345301f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-resources.sh @@ -0,0 +1,118 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi +fi diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-umbrella.h new file mode 100644 index 0000000..b47a3cf --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_QuickGWT_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_QuickGWT_ExampleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.debug.xcconfig new file mode 100644 index 0000000..d656822 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers/InjectableLoggers.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT/QuickGWT.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "InjectableLoggers" -framework "Quick" -framework "QuickGWT" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.modulemap b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.modulemap new file mode 100644 index 0000000..d754eec --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_QuickGWT_Example { + umbrella header "Pods-QuickGWT_Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.release.xcconfig new file mode 100644 index 0000000..d656822 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Example/Pods-QuickGWT_Example.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers/InjectableLoggers.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT/QuickGWT.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "InjectableLoggers" -framework "Quick" -framework "QuickGWT" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-acknowledgements.markdown new file mode 100644 index 0000000..f2999ef --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-acknowledgements.markdown @@ -0,0 +1,254 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## InjectableLoggers + +Copyright (c) 2018 mclovink@me.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +## MockNStub + +Copyright (c) 2018 mennolovink + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +## Nimble + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-acknowledgements.plist new file mode 100644 index 0000000..a1ae7e8 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-acknowledgements.plist @@ -0,0 +1,298 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2018 mclovink@me.com <mclovink@me.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + InjectableLoggers + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2018 mennolovink <mclovink@me.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + MockNStub + Type + PSGroupSpecifier + + + FooterText + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + License + Apache 2.0 + Title + Nimble + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-dummy.m new file mode 100644 index 0000000..eff2945 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_QuickGWT_Tests : NSObject +@end +@implementation PodsDummy_Pods_QuickGWT_Tests +@end diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-frameworks.sh new file mode 100755 index 0000000..fa64cd6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-frameworks.sh @@ -0,0 +1,157 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/InjectableLoggers/InjectableLoggers.framework" + install_framework "${BUILT_PRODUCTS_DIR}/MockNStub/MockNStub.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/InjectableLoggers/InjectableLoggers.framework" + install_framework "${BUILT_PRODUCTS_DIR}/MockNStub/MockNStub.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-resources.sh new file mode 100755 index 0000000..345301f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-resources.sh @@ -0,0 +1,118 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi +fi diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-umbrella.h new file mode 100644 index 0000000..a2e9645 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_QuickGWT_TestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_QuickGWT_TestsVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.debug.xcconfig new file mode 100644 index 0000000..20b47d9 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers" "${PODS_CONFIGURATION_BUILD_DIR}/MockNStub" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers/InjectableLoggers.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/MockNStub/MockNStub.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers/InjectableLoggers.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT/QuickGWT.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "InjectableLoggers" -framework "MockNStub" -framework "Nimble" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.modulemap b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.modulemap new file mode 100644 index 0000000..876d530 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_QuickGWT_Tests { + umbrella header "Pods-QuickGWT_Tests-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.release.xcconfig new file mode 100644 index 0000000..20b47d9 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-QuickGWT_Tests/Pods-QuickGWT_Tests.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers" "${PODS_CONFIGURATION_BUILD_DIR}/MockNStub" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers/InjectableLoggers.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/MockNStub/MockNStub.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/InjectableLoggers/InjectableLoggers.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT/QuickGWT.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "InjectableLoggers" -framework "MockNStub" -framework "Nimble" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Quick/Info.plist b/Example/Pods/Target Support Files/Quick/Info.plist new file mode 100644 index 0000000..b6b2813 --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.3.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Quick/Quick-dummy.m b/Example/Pods/Target Support Files/Quick/Quick-dummy.m new file mode 100644 index 0000000..54d7dc0 --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Quick-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Quick : NSObject +@end +@implementation PodsDummy_Quick +@end diff --git a/Example/Pods/Target Support Files/Quick/Quick-prefix.pch b/Example/Pods/Target Support Files/Quick/Quick-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Quick-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/Quick/Quick-umbrella.h b/Example/Pods/Target Support Files/Quick/Quick-umbrella.h new file mode 100644 index 0000000..1de6bf3 --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Quick-umbrella.h @@ -0,0 +1,20 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "QuickConfiguration.h" +#import "QCKDSL.h" +#import "Quick.h" +#import "QuickSpec.h" + +FOUNDATION_EXPORT double QuickVersionNumber; +FOUNDATION_EXPORT const unsigned char QuickVersionString[]; + diff --git a/Example/Pods/Target Support Files/Quick/Quick.modulemap b/Example/Pods/Target Support Files/Quick/Quick.modulemap new file mode 100644 index 0000000..1d12b21 --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Quick.modulemap @@ -0,0 +1,6 @@ +framework module Quick { + umbrella header "Quick-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Quick/Quick.xcconfig b/Example/Pods/Target Support Files/Quick/Quick.xcconfig new file mode 100644 index 0000000..92f73d7 --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Quick.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick +ENABLE_BITCODE = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = -framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/QuickGWT/Info.plist b/Example/Pods/Target Support Files/QuickGWT/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/QuickGWT/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/QuickGWT/QuickGWT-dummy.m b/Example/Pods/Target Support Files/QuickGWT/QuickGWT-dummy.m new file mode 100644 index 0000000..7a847bb --- /dev/null +++ b/Example/Pods/Target Support Files/QuickGWT/QuickGWT-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_QuickGWT : NSObject +@end +@implementation PodsDummy_QuickGWT +@end diff --git a/Example/Pods/Target Support Files/QuickGWT/QuickGWT-prefix.pch b/Example/Pods/Target Support Files/QuickGWT/QuickGWT-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/QuickGWT/QuickGWT-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/QuickGWT/QuickGWT-umbrella.h b/Example/Pods/Target Support Files/QuickGWT/QuickGWT-umbrella.h new file mode 100644 index 0000000..e1ba699 --- /dev/null +++ b/Example/Pods/Target Support Files/QuickGWT/QuickGWT-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double QuickGWTVersionNumber; +FOUNDATION_EXPORT const unsigned char QuickGWTVersionString[]; + diff --git a/Example/Pods/Target Support Files/QuickGWT/QuickGWT.modulemap b/Example/Pods/Target Support Files/QuickGWT/QuickGWT.modulemap new file mode 100644 index 0000000..f9f439d --- /dev/null +++ b/Example/Pods/Target Support Files/QuickGWT/QuickGWT.modulemap @@ -0,0 +1,6 @@ +framework module QuickGWT { + umbrella header "QuickGWT-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/QuickGWT/QuickGWT.xcconfig b/Example/Pods/Target Support Files/QuickGWT/QuickGWT.xcconfig new file mode 100644 index 0000000..67c6aa1 --- /dev/null +++ b/Example/Pods/Target Support Files/QuickGWT/QuickGWT.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/QuickGWT +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Quick" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/QuickGWT.xcworkspace/contents.xcworkspacedata b/Example/QuickGWT.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1b9c7ef --- /dev/null +++ b/Example/QuickGWT.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/QuickGWT.podspec b/QuickGWT.podspec index 178849d..93a7579 100644 --- a/QuickGWT.podspec +++ b/QuickGWT.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'QuickGWT' - s.version = '0.1.0' + s.version = '1.0.0' s.summary = 'Simply adds Given When and Then to Quick.' s.description = <<-DESC Simply adds Given When and Then to Quick. And makes sure the test outputs are looking pretty.