diff --git a/Example/MarkdownKit.xcodeproj/project.pbxproj b/Example/MarkdownKit.xcodeproj/project.pbxproj index 3a837ba..7b87a4a 100644 --- a/Example/MarkdownKit.xcodeproj/project.pbxproj +++ b/Example/MarkdownKit.xcodeproj/project.pbxproj @@ -15,7 +15,6 @@ 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 692A91EA158B568FC13AA8EE /* Pods_MarkdownKit_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 98F80248942349385F75D6C4 /* Pods_MarkdownKit_Example.framework */; }; C8B5D13471A29A0870015CD7 /* Pods_MarkdownKit_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7F6F1E950CA46794B56C014 /* Pods_MarkdownKit_Tests.framework */; }; /* End PBXBuildFile section */ @@ -44,7 +43,6 @@ 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 607FACE51AFB9204008FA782 /* MarkdownKit_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MarkdownKit_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 6E64BE9BDDB475BDDD3A0853 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 7EDB647DC3B29FA018ECBA8C /* Pods-MarkdownKit_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MarkdownKit_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.release.xcconfig"; sourceTree = ""; }; 90E244442C683C9DF202089B /* Pods-MarkdownKit_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MarkdownKit_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.debug.xcconfig"; sourceTree = ""; }; @@ -133,7 +131,6 @@ 607FACE81AFB9204008FA782 /* Tests */ = { isa = PBXGroup; children = ( - 607FACEB1AFB9204008FA782 /* Tests.swift */, 607FACE91AFB9204008FA782 /* Supporting Files */, ); path = Tests; @@ -224,9 +221,11 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; + LastSwiftMigration = 0800; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; + LastSwiftMigration = 0800; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -284,7 +283,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; 42BDD7DFF90B8757A31CA14D /* [CP] Embed Pods Frameworks */ = { @@ -344,7 +343,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; F561AFE7D8587BF142E6492A /* [CP] Embed Pods Frameworks */ = { @@ -380,7 +379,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -506,6 +504,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -519,6 +518,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -535,6 +535,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -547,6 +548,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/Example/MarkdownKit/AppDelegate.swift b/Example/MarkdownKit/AppDelegate.swift index 639308e..8f700cf 100644 --- a/Example/MarkdownKit/AppDelegate.swift +++ b/Example/MarkdownKit/AppDelegate.swift @@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { + func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/Example/MarkdownKit/MarkdownSubreddit.swift b/Example/MarkdownKit/MarkdownSubreddit.swift index 283afa6..b5be060 100644 --- a/Example/MarkdownKit/MarkdownSubreddit.swift +++ b/Example/MarkdownKit/MarkdownSubreddit.swift @@ -11,18 +11,18 @@ import MarkdownKit class MarkdownSubreddit: MarkdownLink { - private static let regex = "(^|\\s|\\W)(/?r/(\\w+)/?)" + fileprivate static let regex = "(^|\\s|\\W)(/?r/(\\w+)/?)" override var regex: String { return MarkdownSubreddit.regex } - override func match(match: NSTextCheckingResult, + override func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { - let subredditName = attributedString.attributedSubstringFromRange(match.rangeAtIndex(3)).string + let subredditName = attributedString.attributedSubstring(from: match.rangeAt(3)).string let linkURLString = "http://reddit.com/r/\(subredditName)" formatText(attributedString, range: match.range, link: linkURLString) addAttributes(attributedString, range: match.range, link: linkURLString) } -} \ No newline at end of file +} diff --git a/Example/MarkdownKit/String+HTMLDecode.swift b/Example/MarkdownKit/String+HTMLDecode.swift index 6d447a7..7b2e5a0 100644 --- a/Example/MarkdownKit/String+HTMLDecode.swift +++ b/Example/MarkdownKit/String+HTMLDecode.swift @@ -37,9 +37,9 @@ extension String { // Unicode character, e.g. // decodeNumeric("64", 10) --> "@" // decodeNumeric("20ac", 16) --> "€" - func decodeNumeric(string: String, base: Int32) -> Character? { + func decodeNumeric(_ string: String, base: Int32) -> Character? { let code = UInt32(strtoul(string, nil, base)) - return Character(UnicodeScalar(code)) + return Character(UnicodeScalar(code)!) } // Decode the HTML character entity to the corresponding @@ -48,12 +48,12 @@ extension String { // decode("€") --> "€" // decode("<") --> "<" // decode("&foo;") --> nil - func decode(entity: String) -> Character? { + func decode(_ entity: String) -> Character? { if entity.hasPrefix("&#x") || entity.hasPrefix("&#X") { - return decodeNumeric(entity.substringFromIndex(entity.startIndex.advancedBy(3)), base: 16) + return decodeNumeric(entity.substring(from: entity.characters.index(entity.startIndex, offsetBy: 3)), base: 16) } else if entity.hasPrefix("&#") { - return decodeNumeric(entity.substringFromIndex(entity.startIndex.advancedBy(2)), base: 10) + return decodeNumeric(entity.substring(from: entity.characters.index(entity.startIndex, offsetBy: 2)), base: 10) } else { return characterEntities[entity] } @@ -65,21 +65,21 @@ extension String { var position = startIndex // Find the next '&' and copy the characters preceding it to `result`: - while let ampRange = self.rangeOfString("&", range: position ..< endIndex) { - result.appendContentsOf(self[position ..< ampRange.startIndex]) - position = ampRange.startIndex + while let ampRange = self.range(of: "&", range: position ..< endIndex) { + result.append(self[position ..< ampRange.lowerBound]) + position = ampRange.lowerBound // Find the next ';' and copy everything from '&' to ';' into `entity` - if let semiRange = self.rangeOfString(";", range: position ..< endIndex) { - let entity = self[position ..< semiRange.endIndex] - position = semiRange.endIndex + if let semiRange = self.range(of: ";", range: position ..< endIndex) { + let entity = self[position ..< semiRange.upperBound] + position = semiRange.upperBound if let decoded = decode(entity) { // Replace by decoded character: result.append(decoded) } else { // Invalid entity, copy verbatim: - result.appendContentsOf(entity) + result.append(entity) } } else { // No matching ';'. @@ -87,7 +87,7 @@ extension String { } } // Copy remaining characters to `result`: - result.appendContentsOf(self[position ..< endIndex]) + result.append(self[position ..< endIndex]) return result } } diff --git a/Example/MarkdownKit/ViewController.swift b/Example/MarkdownKit/ViewController.swift index 87620f4..5b35e3e 100644 --- a/Example/MarkdownKit/ViewController.swift +++ b/Example/MarkdownKit/ViewController.swift @@ -11,12 +11,12 @@ import MarkdownKit class ViewController: UIViewController { - @IBOutlet private weak var textView: UITextView! { + @IBOutlet fileprivate weak var textView: UITextView! { didSet { textView.delegate = self } } - private let markdownParser = MarkdownParser() + fileprivate let markdownParser = MarkdownParser() override func viewDidLoad() { super.viewDidLoad() @@ -34,9 +34,9 @@ class ViewController: UIViewController { extension ViewController: UITextViewDelegate { - func textView(textView: UITextView, shouldInteractWithURL URL: NSURL, - inRange characterRange: NSRange) -> Bool { - UIApplication.sharedApplication().openURL(URL) + func textView(_ textView: UITextView, shouldInteractWith URL: URL, + in characterRange: NSRange) -> Bool { + UIApplication.shared.openURL(URL) return true } diff --git a/Example/Podfile b/Example/Podfile index 065ed90..6223b8f 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -6,7 +6,5 @@ target 'MarkdownKit_Example' do target 'MarkdownKit_Tests' do inherit! :search_paths - pod 'Quick', '~> 0.8' - pod 'Nimble', '~> 3.0' end end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 30259a3..1816f26 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,22 +1,16 @@ PODS: - - MarkdownKit (1.0.3) - - Nimble (3.2.0) - - Quick (0.9.3) + - MarkdownKit (1.1.0) DEPENDENCIES: - MarkdownKit (from `../`) - - Nimble (~> 3.0) - - Quick (~> 0.8) EXTERNAL SOURCES: MarkdownKit: :path: "../" SPEC CHECKSUMS: - MarkdownKit: 82e36166884b3afae588528f38abab321d18cfcc - Nimble: 703854335d181df169bbca9c97117b5cf8c47c1d - Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 + MarkdownKit: 60d759cd14169144e4b159cb34312f8a5dd77570 -PODFILE CHECKSUM: 37332923ac62269b229836ec80bf572c6603114d +PODFILE CHECKSUM: ccadfd166c0ec570bf4db2bbf94766db628792f3 -COCOAPODS: 1.0.1 +COCOAPODS: 1.1.0.rc.2 diff --git a/Example/Pods/Local Podspecs/MarkdownKit.podspec.json b/Example/Pods/Local Podspecs/MarkdownKit.podspec.json index 17e65cd..abfd9bb 100644 --- a/Example/Pods/Local Podspecs/MarkdownKit.podspec.json +++ b/Example/Pods/Local Podspecs/MarkdownKit.podspec.json @@ -1,6 +1,6 @@ { "name": "MarkdownKit", - "version": "1.0.3", + "version": "1.1.0", "summary": "MarkdownKit is a customizable and extensible Markdown parser for iOS.", "description": "MarkdownKit is a customizable and extensible Markdown parser for iOS.\nIt supports many of the standard Markdown elements through the use of Regular\nExpressions. It also allows customization of font and color attributes for\nall the Markdown elements.", "homepage": "https://github.com/ivanbruel/MarkdownKit", @@ -14,7 +14,7 @@ }, "source": { "git": "https://github.com/ivanbruel/MarkdownKit.git", - "tag": "1.0.3" + "tag": "1.1.0" }, "social_media_url": "https://twitter.com/ivanbruel", "platforms": { diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 30259a3..1816f26 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,22 +1,16 @@ PODS: - - MarkdownKit (1.0.3) - - Nimble (3.2.0) - - Quick (0.9.3) + - MarkdownKit (1.1.0) DEPENDENCIES: - MarkdownKit (from `../`) - - Nimble (~> 3.0) - - Quick (~> 0.8) EXTERNAL SOURCES: MarkdownKit: :path: "../" SPEC CHECKSUMS: - MarkdownKit: 82e36166884b3afae588528f38abab321d18cfcc - Nimble: 703854335d181df169bbca9c97117b5cf8c47c1d - Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 + MarkdownKit: 60d759cd14169144e4b159cb34312f8a5dd77570 -PODFILE CHECKSUM: 37332923ac62269b229836ec80bf572c6603114d +PODFILE CHECKSUM: ccadfd166c0ec570bf4db2bbf94766db628792f3 -COCOAPODS: 1.0.1 +COCOAPODS: 1.1.0.rc.2 diff --git a/Example/Pods/Nimble/LICENSE.md b/Example/Pods/Nimble/LICENSE.md deleted file mode 100644 index 0f3eb71..0000000 --- a/Example/Pods/Nimble/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ -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/Nimble/README.md b/Example/Pods/Nimble/README.md deleted file mode 100644 index e6f9e9f..0000000 --- a/Example/Pods/Nimble/README.md +++ /dev/null @@ -1,1217 +0,0 @@ -# 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 Checking](#type-checking) - - [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) - - [Equivalence](#equivalence) - - [Identity](#identity) - - [Comparisons](#comparisons) - - [Types/Classes](#typesclasses) - - [Truthiness](#truthiness) - - [Swift Error Handling](#swift-error-handling) - - [Exceptions](#exceptions) - - [Collection Membership](#collection-membership) - - [Strings](#strings) - - [Checking if all elements of a collection pass a condition](#checking-if-all-elements-of-a-collection-pass-a-condition) - - [Verify collection count](#verify-collection-count) - - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) -- [Writing Your Own Matchers](#writing-your-own-matchers) - - [Lazy Evaluation](#lazy-evaluation) - - [Type Checking via Swift Generics](#type-checking-via-swift-generics) - - [Customizing Failure Messages](#customizing-failure-messages) - - [Supporting Objective-C](#supporting-objective-c) - - [Properly Handling `nil` in Objective-C Matchers](#properly-handling-nil-in-objective-c-matchers) -- [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 Checking - -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 - -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) -``` - -```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 - // do some stuff that takes a while... - NSThread.sleepForTimeInterval(0.5) - done() -} -``` - -```objc -// Objective-C - -waitUntil(^(void (^done)(void)){ - // do some stuff that takes a while... - [NSThread sleepForTimeInterval:0.5]; - done(); -}); -``` - -`waitUntil` also optionally takes a timeout parameter: - -```swift -// Swift - -waitUntil(timeout: 10) { done in - // do some stuff that takes a while... - NSThread.sleepForTimeInterval(1) - done() -} -``` - -```objc -// Objective-C - -waitUntilTimeout(10, ^(void (^done)(void)){ - // do some stuff that takes a while... - [NSThread sleepForTimeInterval:1]; - 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.Defaults.AsyncTimeout = 5 - -// Slow the polling interval to 0.1 seconds: -Nimble.Defaults.AsyncPollInterval = 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: - - ```objc - // Objective-C - - @import Nimble; - - expect(@(1 + 1)).to(equal(@2)); - expect(@"Hello world").to(contain(@"world")); - ``` - -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()); - ``` - -## 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. - -## 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 -``` - -```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 BooleanType 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 BooleanType 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 BooleanType 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 BooleanType false): -expect(actual).to(beFalse()); - -// Passes if actual is nil: -expect(actual).to(beNil()); -``` - -## Swift Error Handling - -If you're using Swift 2.0+, you can use the `throwError` matcher to check if an error is thrown. - -```swift -// Swift - -// Passes if somethingThatThrows() throws an ErrorType: -expect{ try somethingThatThrows() }.to(throwError()) - -// Passes if somethingThatThrows() throws an error with a given domain: -expect{ try somethingThatThrows() }.to(throwError { (error: ErrorType) in - expect(error._domain).to(equal(NSCocoaErrorDomain)) -}) - -// Passes if somethingThatThrows() throws an error with a given case: -expect{ try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) - -// Passes if somethingThatThrows() throws an error with a given type: -expect{ try somethingThatThrows() }.to(throwError(errorType: MyError.self)) -``` - -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 and it passes expectations in the block -// (in this case, if 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 in the 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 an empty collection (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 an empty collection (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). - -## Strings - -```swift -// Swift - -// Passes if actual contains substring expected: -expect(actual).to(contain(expected)) - -// Passes if actual begins with substring: -expect(actual).to(beginWith(expected)) - -// Passes if actual ends with substring: -expect(actual).to(endWith(expected)) - -// Passes if actual is an 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 expected: -expect(actual).to(contain(expected)); - -// Passes if actual begins with substring: -expect(actual).to(beginWith(expected)); - -// Passes if actual ends with substring: -expect(actual).to(endWith(expected)); - -// Passes if actual is an empty string, "": -expect(actual).to(beEmpty()); - -// Passes if actual matches the regular expression defined in expected: -expect(actual).to(match(expected)) -``` - -## Checking if all elements of a collection pass a condition - -```swift -// Swift - -// with a custom function: -expect([1,2,3,4]).to(allPass({$0 < 5})) - -// with another matcher: -expect([1,2,3,4]).to(allPass(beLessThan(5))) -``` - -```objc -// Objective-C - -expect(@[@1, @2, @3,@4]).to(allPass(beLessThan(@5))); -``` - -For Swift the actual value has to be a SequenceType, e.g. an array, a set or a custom seqence type. - -For Objective-C the actual value has to be a NSFastEnumeration, e.g. NSArray and NSSet, of NSObjects and only the variant which -uses another matcher is available here. - -## Verify collection count - -```swift -// passes if actual collection's count is equal to expected -expect(actual).to(haveCount(expected)) - -// passes if actual collection's count is not equal to expected -expect(actual).notTo(haveCount(expected)) -``` - -```objc -// passes if actual collection's count is equal to expected -expect(actual).to(haveCount(expected)) - -// passes if actual collection's count is not equal to expected -expect(actual).notTo(haveCount(expected)) -``` - -For Swift the actual value must be a `CollectionType` such as array, dictionary or set. - -For Objective-C the actual value has to be one of the following classes `NSArray`, `NSDictionary`, `NSSet`, `NSHashTable` or one of their subclasses. - -## Matching a value to any of a group of matchers - -```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 -// 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. - -# Writing Your Own Matchers - -In Nimble, matchers are Swift functions that take an expected -value and return a `MatcherFunc` closure. Take `equal`, for example: - -```swift -// Swift - -public func equal(expectedValue: T?) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(expectedValue)>" - return actualExpression.evaluate() == expectedValue - } -} -``` - -The return value of a `MatcherFunc` closure is a `Bool` that indicates -whether the actual value matches the expectation: `true` if it does, or -`false` if it doesn't. - -> The actual `equal` matcher function does not match when either - `actual` or `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/Nimble/Matchers) -to see how Nimble's built-in set of matchers are implemented. You can -also check out the tips below. - -## 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() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be nil" - return actualExpression.evaluate() == 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. - -Use `expression.isClosure` to determine if the expression will be invoking -a closure to produce its value. - -## 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) -> MatcherFunc { - return MatcherFunc { actual, failureMessage in - return actual.evaluate().description == description - } -} -``` - -## Customizing Failure Messages - -By default, Nimble outputs the following failure message when an -expectation fails: - -``` -expected to match, got <\(actual)> -``` - -You can customize this message by modifying the `failureMessage` struct -from within your `MatcherFunc` closure. To change the verb "match" to -something else, update the `postfixMessage` property: - -```swift -// Swift - -// Outputs: expected to be under the sea, got <\(actual)> -failureMessage.postfixMessage = "be under the sea" -``` - -You can change how the `actual` value is displayed by updating -`failureMessage.actualValue`. Or, to remove it altogether, set it to -`nil`: - -```swift -// Swift - -// Outputs: expected to be under the sea -failureMessage.actualValue = nil -failureMessage.postfixMessage = "be under the sea" -``` - -## 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.generate() - 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) - } - } -} -``` - -# 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 - README](https://github.com/Quick/Quick#how-to-install-quick). - -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 iOS or OS X 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 iOS or OS X 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', '~> 3.1.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 deleted file mode 100644 index 306d4ce..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 09caf2a..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift +++ /dev/null @@ -1,20 +0,0 @@ - -/// 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 deleted file mode 100644 index a1615a7..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift +++ /dev/null @@ -1,100 +0,0 @@ -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 silently: Bool = false, closure: () -> 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 silently: Bool = false, closure: () -> 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/NimbleEnvironment.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift deleted file mode 100644 index 27cdac9..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift +++ /dev/null @@ -1,38 +0,0 @@ -import Foundation - -/// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this -/// class' existance -internal class NimbleEnvironment { - static var activeInstance: NimbleEnvironment { - get { - let env = NSThread.currentThread().threadDictionary["NimbleEnvironment"] - if let env = env as? NimbleEnvironment { - return env - } else { - let newEnv = NimbleEnvironment() - self.activeInstance = newEnv - return newEnv - } - } - set { - NSThread.currentThread().threadDictionary["NimbleEnvironment"] = newValue - } - } - - // TODO: eventually migrate the global to this environment value - var assertionHandler: AssertionHandler { - get { return NimbleAssertionHandler } - set { NimbleAssertionHandler = newValue } - } - -#if _runtime(_ObjC) - var awaiter: Awaiter - - init() { - awaiter = Awaiter( - waitLock: AssertionWaitLock(), - asyncQueue: dispatch_get_main_queue(), - timeoutQueue: dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) - } -#endif -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift deleted file mode 100644 index 7d84f45..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ /dev/null @@ -1,77 +0,0 @@ -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 _runtime(_ObjC) - /// 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 _runtime(_ObjC) - // 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 _runtime(_ObjC) - if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { - testCase.recordFailureWithDescription(message, inFile: location.file, atLine: location.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: NSInternalInconsistencyException, reason: msg, userInfo: nil).raise() - } -#else - XCTFail("\(message)\n", file: location.file, line: location.line) -#endif -} diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift deleted file mode 100644 index 63495c2..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift +++ /dev/null @@ -1,93 +0,0 @@ -import Foundation - -#if _runtime(_ObjC) -private enum ErrorResult { - case Exception(NSException) - case Error(ErrorType) - 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 { - internal class func until( - timeout timeout: NSTimeInterval, - file: FileString = __FILE__, - line: UInt = __LINE__, - action: (() -> Void) -> Void) -> Void { - return throwableUntil(timeout: timeout, file: file, line: line) { (done: () -> Void) throws -> Void in - action() { done() } - } - } - - // Using a throwable closure makes this method not objc compatible. - internal class func throwableUntil( - timeout timeout: NSTimeInterval, - file: FileString = __FILE__, - line: UInt = __LINE__, - action: (() -> Void) throws -> Void) -> Void { - let awaiter = NimbleEnvironment.activeInstance.awaiter - let leeway = timeout / 2.0 - let result = awaiter.performBlock { (done: (ErrorResult) -> Void) throws -> Void in - dispatch_async(dispatch_get_main_queue()) { - 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 - } - } - - @objc(untilFile:line:action:) - internal class func until(file: FileString = __FILE__, line: UInt = __LINE__, action: (() -> Void) -> Void) -> Void { - until(timeout: 1, file: file, line: line, action: action) - } -} - -internal func blockedRunLoopErrorMessageFor(fnName: String, leeway: NSTimeInterval) -> String { - 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 timeout: NSTimeInterval = 1, file: FileString = __FILE__, line: UInt = __LINE__, action: (() -> Void) -> Void) -> Void { - NMBWait.until(timeout: timeout, file: file, line: line, action: action) -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL.swift b/Example/Pods/Nimble/Sources/Nimble/DSL.swift deleted file mode 100644 index 4bfb702..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/DSL.swift +++ /dev/null @@ -1,68 +0,0 @@ -import Foundation - -/// Make an expectation on a given actual value. The value given is lazily evaluated. -@warn_unused_result(message="Follow 'expect(…)' with '.to(…)', '.toNot(…)', 'toEventually(…)', '==', etc.") -public func expect(@autoclosure(escaping) expression: () 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. -@warn_unused_result(message="Follow 'expect(…)' with '.to(…)', '.toNot(…)', 'toEventually(…)', '==', etc.") -public func expect(file: FileString = __FILE__, line: UInt = __LINE__, expression: () 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( - @autoclosure expr: () -> Bool, - @autoclosure _ name: () -> String, - @autoclosure _ message: () -> String, - file: StaticString = __FILE__, - line: UInt = __LINE__) -> Bool { - let result = expr() - if !result { -#if _runtime(_ObjC) - let e = NSException( - name: name(), - reason: message(), - userInfo: nil) - e.raise() -#else - preconditionFailure("\(name()) - \(message())", file: file, line: line) -#endif - } - return result -} - -@noreturn -internal func internalError(msg: String, file: FileString = __FILE__, line: UInt = __LINE__) { - 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." - ) -} \ No newline at end of file diff --git a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift b/Example/Pods/Nimble/Sources/Nimble/Expectation.swift deleted file mode 100644 index 520902d..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift +++ /dev/null @@ -1,65 +0,0 @@ -import Foundation - -internal func expressionMatches(expression: Expression, matcher: U, to: String, description: String?) -> (Bool, FailureMessage) { - 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.actualValue = "an unexpected error thrown: <\(error)>" - return (false, msg) - } -} - -internal func expressionDoesNotMatch(expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) { - 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.actualValue = "an unexpected error thrown: <\(error)>" - return (false, msg) - } -} - -public struct Expectation { - let expression: Expression - - public func verify(pass: Bool, _ message: FailureMessage) { - let handler = NimbleEnvironment.activeInstance.assertionHandler - handler.assert(pass, message: message, location: expression.location) - } - - /// Tests the actual value using a matcher to match. - public func to(matcher: U, description: String? = nil) { - let (pass, msg) = expressionMatches(expression, matcher: matcher, to: "to", description: description) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match. - public func toNot(matcher: U, description: String? = nil) { - let (pass, msg) = expressionDoesNotMatch(expression, matcher: matcher, toNot: "to not", description: description) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match. - /// - /// Alias to toNot(). - public func notTo(matcher: U, description: String? = nil) { - toNot(matcher, description: description) - } - - // see: - // - AsyncMatcherWrapper for extension - // - NMBExpectation for Objective-C interface -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Expression.swift b/Example/Pods/Nimble/Sources/Nimble/Expression.swift deleted file mode 100644 index f64ee24..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Expression.swift +++ /dev/null @@ -1,90 +0,0 @@ -import Foundation - -// Memoizes the given closure, only calling the passed -// closure once; even if repeat calls to the returned closure -internal func memoizedClosure(closure: () 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: () 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: (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: (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 deleted file mode 100644 index 4d23bc8..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift +++ /dev/null @@ -1,56 +0,0 @@ -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 = "" - public var userDescription: String? = nil - - public var stringValue: String { - get { - if let value = _stringValueOverride { - return value - } else { - return computeStringValue() - } - } - set { - _stringValueOverride = newValue - } - } - - internal var _stringValueOverride: String? - - public override init() { - } - - public init(stringValue: String) { - _stringValueOverride = stringValue - } - - internal func stripNewlines(str: String) -> String { - var lines: [String] = NSString(string: str).componentsSeparatedByString("\n") as [String] - let whitespace = NSCharacterSet.whitespaceAndNewlineCharacterSet() - lines = lines.map { line in NSString(string: line).stringByTrimmingCharactersInSet(whitespace) } - return lines.joinWithSeparator("") - } - - 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 userDescription = userDescription { - return "\(userDescription)\n\(value)" - } - - return value - } -} \ No newline at end of file diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift deleted file mode 100644 index d67714b..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift +++ /dev/null @@ -1,92 +0,0 @@ -import Foundation - -public func allPass - (passFunc: (T?) -> Bool) -> NonNilMatcherFunc { - return allPass("pass a condition", passFunc) -} - -public func allPass - (passName: String, _ passFunc: (T?) -> Bool) -> NonNilMatcherFunc { - return createAllPassMatcher() { - expression, failureMessage in - failureMessage.postfixMessage = passName - return passFunc(try expression.evaluate()) - } -} - -public func allPass - (matcher: V) -> NonNilMatcherFunc { - return createAllPassMatcher() { - try matcher.matches($0, failureMessage: $1) - } -} - -private func createAllPassMatcher - (elementEvaluator:(Expression, FailureMessage) throws -> Bool) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.actualValue = nil - if let actualValue = try actualExpression.evaluate() { - for currentElement in actualValue { - let exp = Expression( - expression: {currentElement}, location: actualExpression.location) - if try !elementEvaluator(exp, failureMessage) { - failureMessage.postfixMessage = - "all \(failureMessage.postfixMessage)," - + " but failed first at element <\(stringify(currentElement))>" - + " in <\(stringify(actualValue))>" - return false - } - } - failureMessage.postfixMessage = "all \(failureMessage.postfixMessage)" - } else { - failureMessage.postfixMessage = "all pass (use beNil() to match nils)" - return false - } - - return true - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func allPassMatcher(matcher: NMBObjCMatcher) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let location = actualExpression.location - let actualValue = try! actualExpression.evaluate() - var nsObjects = [NSObject]() - - var collectionIsUsable = true - if let value = actualValue as? NSFastEnumeration { - let generator = NSFastGenerator(value) - while let obj:AnyObject = generator.next() { - if let nsObject = obj as? NSObject { - nsObjects.append(nsObject) - } else { - collectionIsUsable = false - break - } - } - } else { - collectionIsUsable = false - } - - if !collectionIsUsable { - failureMessage.postfixMessage = - "allPass only works with NSFastEnumeration (NSArray, NSSet, ...) of NSObjects" - failureMessage.expected = "" - failureMessage.to = "" - return false - } - - let expr = Expression(expression: ({ nsObjects }), location: location) - let elementEvaluator: (Expression, FailureMessage) -> Bool = { - expression, failureMessage in - return matcher.matches( - {try! expression.evaluate()}, failureMessage: failureMessage, location: expr.location) - } - return try! createAllPassMatcher(elementEvaluator).matches( - expr, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift deleted file mode 100644 index d1f3737..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift +++ /dev/null @@ -1,38 +0,0 @@ -import Foundation - -#if _runtime(_ObjC) - -// A Nimble matcher that catches attempts to use beAKindOf with non Objective-C types -public func beAKindOf(expectedClass: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc {actualExpression, failureMessage in - failureMessage.stringValue = "beAKindOf only works on Objective-C types since" - + " the Swift compiler will automatically type check Swift-only types." - + " This expectation is redundant." - return false - } -} - -/// 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) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - let instance = try actualExpression.evaluate() - if let validInstance = instance { - failureMessage.actualValue = "<\(classAsString(validInstance.dynamicType)) instance>" - } else { - failureMessage.actualValue = "" - } - failureMessage.postfixMessage = "be a kind of \(classAsString(expectedClass))" - return instance != nil && instance!.isKindOfClass(expectedClass) - } -} - -extension NMBObjCMatcher { - 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 deleted file mode 100644 index 32477dd..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift +++ /dev/null @@ -1,40 +0,0 @@ -import Foundation - -// A Nimble matcher that catches attempts to use beAnInstanceOf with non Objective-C types -public func beAnInstanceOf(expectedClass: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc {actualExpression, failureMessage in - failureMessage.stringValue = "beAnInstanceOf only works on Objective-C types since" - + " the Swift compiler will automatically type check Swift-only types." - + " This expectation is redundant." - return false - } -} - -/// 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) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - let instance = try actualExpression.evaluate() - if let validInstance = instance { - failureMessage.actualValue = "<\(classAsString(validInstance.dynamicType)) instance>" - } else { - failureMessage.actualValue = "" - } - failureMessage.postfixMessage = "be an instance of \(classAsString(expectedClass))" -#if _runtime(_ObjC) - return instance != nil && instance!.isMemberOfClass(expectedClass) -#else - return instance != nil && instance!.dynamicType == expectedClass -#endif - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - 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 deleted file mode 100644 index bcab1c9..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift +++ /dev/null @@ -1,128 +0,0 @@ -#if os(Linux) -import Glibc -#endif -import Foundation - -internal let DefaultDelta = 0.0001 - -internal func isCloseTo(actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double, failureMessage: FailureMessage) -> Bool { - failureMessage.postfixMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" - if actualValue != nil { - failureMessage.actualValue = "<\(stringify(actualValue!))>" - } else { - failureMessage.actualValue = "" - } - return actualValue != nil && abs(actualValue!.doubleValue - expectedValue.doubleValue) < 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: Double, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage) - } -} - -/// 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) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage) - } -} - -#if _runtime(_ObjC) -public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { - var _expected: NSNumber - var _delta: CDouble - init(expected: NSNumber, within: CDouble) { - _expected = expected - _delta = within - } - - public func matches(actualExpression: () -> 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) - } - - public func doesNotMatch(actualExpression: () -> 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) - } - - public var within: (CDouble) -> NMBObjCBeCloseToMatcher { - return ({ delta in - return NMBObjCBeCloseToMatcher(expected: self._expected, within: delta) - }) - } -} - -extension NMBObjCMatcher { - 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) -> NonNilMatcherFunc <[Double]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" - if let actual = try actualExpression.evaluate() { - failureMessage.actualValue = "<\(stringify(actual))>" - - if actual.count != expectedValues.count { - return false - } else { - for (index, actualItem) in actual.enumerate() { - if fabs(actualItem - expectedValues[index]) > delta { - return false - } - } - return true - } - } - return false - } -} - -// MARK: - Operators - -infix operator ≈ { - associativity none - precedence 130 -} - -public func ≈(lhs: Expectation<[Double]>, rhs: [Double]) { - lhs.to(beCloseTo(rhs)) -} - -public func ≈(lhs: Expectation, rhs: Double) { - lhs.to(beCloseTo(rhs)) -} - -public func ≈(lhs: Expectation, rhs: (expected: Double, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) -} - -public func ==(lhs: Expectation, rhs: (expected: Double, 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 -infix operator ± { precedence 170 } -public func ±(lhs: Double, rhs: Double) -> (expected: Double, 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 deleted file mode 100644 index bc1bb9f..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift +++ /dev/null @@ -1,92 +0,0 @@ -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() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualSeq = try actualExpression.evaluate() - if actualSeq == nil { - return true - } - var generator = actualSeq!.generate() - return 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() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualString = try actualExpression.evaluate() - return 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() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualString = try actualExpression.evaluate() - return actualString == nil || actualString!.length == 0 - } -} - -// Without specific overrides, beEmpty() is ambiguous for NSDictionary, NSArray, -// etc, since they conform to SequenceType 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() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualDictionary = try actualExpression.evaluate() - return 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() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualArray = try actualExpression.evaluate() - return 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() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actual = try actualExpression.evaluate() - return actual == nil || actual!.count == 0 - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beEmptyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let location = actualExpression.location - let actualValue = try! actualExpression.evaluate() - failureMessage.postfixMessage = "be empty" - if let value = actualValue as? NMBCollection { - let expr = Expression(expression: ({ value as NMBCollection }), location: location) - return try! beEmpty().matches(expr, failureMessage: failureMessage) - } else if let value = actualValue as? NSString { - let expr = Expression(expression: ({ value as String }), location: location) - return try! beEmpty().matches(expr, failureMessage: failureMessage) - } else if let actualValue = actualValue { - failureMessage.postfixMessage = "be empty (only works for NSArrays, NSSets, NSDictionaries, NSHashTables, and NSStrings)" - failureMessage.actualValue = "\(classAsString(actualValue.dynamicType)) type" - } - return false - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift deleted file mode 100644 index 0f24ab5..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift +++ /dev/null @@ -1,39 +0,0 @@ -import Foundation - - -/// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" - return try actualExpression.evaluate() > expectedValue - } -} - -/// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedDescending - return matches - } -} - -public func >(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThan(rhs)) -} - -public func >(lhs: Expectation, rhs: NMBComparable?) { - lhs.to(beGreaterThan(rhs)) -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - 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 deleted file mode 100644 index c89ff07..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift +++ /dev/null @@ -1,41 +0,0 @@ -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?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - return actualValue >= expectedValue - } -} - -/// A Nimble matcher that succeeds when the actual value is greater than -/// or equal to the expected value. -public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { 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) != NSComparisonResult.OrderedAscending - return matches - } -} - -public func >=(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThanOrEqualTo(rhs)) -} - -public func >=(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThanOrEqualTo(rhs)) -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - 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 deleted file mode 100644 index a369501..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift +++ /dev/null @@ -1,39 +0,0 @@ -import Foundation - - -/// A Nimble matcher that succeeds when the actual value is the same instance -/// as the expected instance. -public func beIdenticalTo(expected: AnyObject?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - let actual = try actualExpression.evaluate() - failureMessage.actualValue = "\(identityAsString(actual))" - failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" - return actual === expected && actual !== nil - } -} - -public func ===(lhs: Expectation, rhs: AnyObject?) { - lhs.to(beIdenticalTo(rhs)) -} -public func !==(lhs: Expectation, rhs: AnyObject?) { - 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: AnyObject?) -> NonNilMatcherFunc { - return beIdenticalTo(expected) -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beIdenticalToMatcher(expected: NSObject?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let aExpr = actualExpression.cast { $0 as AnyObject? } - 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 deleted file mode 100644 index ea4725b..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift +++ /dev/null @@ -1,38 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" - return try actualExpression.evaluate() < expectedValue - } -} - -/// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedAscending - return matches - } -} - -public func <(lhs: Expectation, rhs: T) { - lhs.to(beLessThan(rhs)) -} - -public func <(lhs: Expectation, rhs: NMBComparable?) { - lhs.to(beLessThan(rhs)) -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - 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 deleted file mode 100644 index a24cf8c..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift +++ /dev/null @@ -1,39 +0,0 @@ -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?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" - return try actualExpression.evaluate() <= expectedValue - } -} - -/// A Nimble matcher that succeeds when the actual value is less than -/// or equal to the expected value. -public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { 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) != NSComparisonResult.OrderedDescending - } -} - -public func <=(lhs: Expectation, rhs: T) { - lhs.to(beLessThanOrEqualTo(rhs)) -} - -public func <=(lhs: Expectation, rhs: T) { - lhs.to(beLessThanOrEqualTo(rhs)) -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - 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 deleted file mode 100644 index cabf583..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift +++ /dev/null @@ -1,95 +0,0 @@ -import Foundation - -internal func matcherWithFailureMessage(matcher: M, postprocessor: (FailureMessage) -> Void) -> FullMatcherFunc { - return FullMatcherFunc { actualExpression, failureMessage, isNegation in - let pass: Bool - if isNegation { - pass = try matcher.doesNotMatch(actualExpression, failureMessage: failureMessage) - } else { - pass = try matcher.matches(actualExpression, failureMessage: failureMessage) - } - postprocessor(failureMessage) - return pass - } -} - -// 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() -> FullMatcherFunc { - return matcherWithFailureMessage(equal(true)) { failureMessage in - failureMessage.postfixMessage = "be true" - } -} - -/// A Nimble matcher that succeeds when the actual value is exactly false. -/// This matcher will not match against nils. -public func beFalse() -> FullMatcherFunc { - return matcherWithFailureMessage(equal(false)) { failureMessage in - failureMessage.postfixMessage = "be false" - } -} - -// MARK: beTruthy() / beFalsy() - -/// A Nimble matcher that succeeds when the actual value is not logically false. -public func beTruthy() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be truthy" - let actualValue = try actualExpression.evaluate() - if let actualValue = actualValue { - if let actualValue = actualValue as? BooleanType { - return actualValue.boolValue == true - } - } - return actualValue != nil - } -} - -/// A Nimble matcher that succeeds when the actual value is logically false. -/// This matcher will match against nils. -public func beFalsy() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be falsy" - let actualValue = try actualExpression.evaluate() - if let actualValue = actualValue { - if let actualValue = actualValue as? BooleanType { - return actualValue.boolValue != true - } - } - return actualValue == nil - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beTruthyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as BooleanType? } - return try! beTruthy().matches(expr, failureMessage: failureMessage) - } - } - - public class func beFalsyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as BooleanType? } - return try! beFalsy().matches(expr, failureMessage: failureMessage) - } - } - - public class func beTrueMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as Bool? } - return try! beTrue().matches(expr, failureMessage: failureMessage) - } - } - - public class func beFalseMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as Bool? } - 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 deleted file mode 100644 index a6fb31f..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift +++ /dev/null @@ -1,20 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is nil. -public func beNil() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be nil" - let actualValue = try actualExpression.evaluate() - return actualValue == nil - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - 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 deleted file mode 100644 index 8f86265..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is Void. -public func beVoid() -> MatcherFunc<()> { - return MatcherFunc { 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()) -} \ No newline at end of file diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift deleted file mode 100644 index 0b5e0e1..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift +++ /dev/null @@ -1,55 +0,0 @@ -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) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.generate() - return actualGenerator.next() == startingElement - } - return false - } -} - -/// A Nimble matcher that succeeds when the actual collection's first element -/// is equal to the expected object. -public func beginWith(startingElement: AnyObject) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - let collection = try actualExpression.evaluate() - return collection != nil && collection!.indexOfObject(startingElement) == 0 - } -} - -/// 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) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingSubstring)>" - if let actual = try actualExpression.evaluate() { - let range = actual.rangeOfString(startingSubstring) - return range != nil && range!.startIndex == actual.startIndex - } - return false - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beginWithMatcher(expected: AnyObject) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = try! actualExpression.evaluate() - if let _ = actual as? String { - 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 deleted file mode 100644 index bdac2d5..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift +++ /dev/null @@ -1,92 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual sequence contains the expected value. -public func contain(items: T...) -> NonNilMatcherFunc { - return contain(items) -} - -private func contain(items: [T]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" - if let actual = try actualExpression.evaluate() { - return items.all { - return actual.contains($0) - } - } - return false - } -} - -/// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(substrings: String...) -> NonNilMatcherFunc { - return contain(substrings) -} - -private func contain(substrings: [String]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" - if let actual = try actualExpression.evaluate() { - return substrings.all { - let range = actual.rangeOfString($0) - return range != nil && !range!.isEmpty - } - } - return false - } -} - -/// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(substrings: NSString...) -> NonNilMatcherFunc { - return contain(substrings) -} - -private func contain(substrings: [NSString]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" - if let actual = try actualExpression.evaluate() { - return substrings.all { actual.rangeOfString($0.description).length != 0 } - } - return false - } -} - -/// A Nimble matcher that succeeds when the actual collection contains the expected object. -public func contain(items: AnyObject?...) -> NonNilMatcherFunc { - return contain(items) -} - -private func contain(items: [AnyObject?]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { 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.containsObject(item!) - } - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - 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: [AnyObject?] = expected.map({ $0 as AnyObject? }) - 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 { - 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/EndWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift deleted file mode 100644 index ff2bd9e..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift +++ /dev/null @@ -1,65 +0,0 @@ -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) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "end with <\(endingElement)>" - - if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.generate() - var lastItem: T? - var item: T? - repeat { - lastItem = item - item = actualGenerator.next() - } while(item != nil) - - return lastItem == endingElement - } - return false - } -} - -/// A Nimble matcher that succeeds when the actual collection's last element -/// is equal to the expected object. -public func endWith(endingElement: AnyObject) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "end with <\(endingElement)>" - let collection = try actualExpression.evaluate() - return collection != nil && collection!.indexOfObject(endingElement) == collection!.count - 1 - } -} - - -/// 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) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "end with <\(endingSubstring)>" - if let collection = try actualExpression.evaluate() { - let range = collection.rangeOfString(endingSubstring) - return range != nil && range!.endIndex == collection.endIndex - } - return false - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func endWithMatcher(expected: AnyObject) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = try! actualExpression.evaluate() - if let _ = actual as? String { - 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 deleted file mode 100644 index 6373d8c..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift +++ /dev/null @@ -1,181 +0,0 @@ -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?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - let matches = actualValue == expectedValue && expectedValue != nil - if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - return false - } - return matches - } -} - -/// 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]?) -> NonNilMatcherFunc<[T: C]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - return false - } - return expectedValue! == actualValue! - } -} - -/// 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]?) -> NonNilMatcherFunc<[T]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - return false - } - return expectedValue! == actualValue! - } -} - -/// A Nimble matcher allowing comparison of collection with optional type -public func equal(expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - if let actualValue = try actualExpression.evaluate() { - if expectedValue.count != actualValue.count { - return false - } - - for (index, item) in actualValue.enumerate() { - let otherItem = expectedValue[index] - if item == nil && otherItem == nil { - continue - } else if item == nil && otherItem != nil { - return false - } else if item != nil && otherItem == nil { - return false - } else if item! != otherItem! { - return false - } - } - - return true - } else { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - - return false - } -} - -/// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(expectedValue: Set?) -> NonNilMatcherFunc> { - return equal(expectedValue, stringify: stringify) -} - -/// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(expectedValue: Set?) -> NonNilMatcherFunc> { - return equal(expectedValue, stringify: { - if let set = $0 { - return stringify(Array(set).sort { $0 < $1 }) - } else { - return "nil" - } - }) -} - -private func equal(expectedValue: Set?, stringify: Set? -> String) -> NonNilMatcherFunc> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - - if let expectedValue = expectedValue { - if let actualValue = try actualExpression.evaluate() { - failureMessage.actualValue = "<\(stringify(actualValue))>" - - if expectedValue == actualValue { - return true - } - - let missing = expectedValue.subtract(actualValue) - if missing.count > 0 { - failureMessage.postfixActual += ", missing <\(stringify(missing))>" - } - - let extra = actualValue.subtract(expectedValue) - if extra.count > 0 { - failureMessage.postfixActual += ", extra <\(stringify(extra))>" - } - } - } else { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - - return false - } -} - -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 _runtime(_ObjC) -extension NMBObjCMatcher { - 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 deleted file mode 100644 index 7a66d2a..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift +++ /dev/null @@ -1,50 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual CollectionType's count equals -/// the expected value -public func haveCount(expectedValue: T.Index.Distance) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(actualValue) with count \(expectedValue)" - let result = expectedValue == actualValue.count - failureMessage.actualValue = "\(actualValue.count)" - return result - } else { - return false - } - } -} - -/// A Nimble matcher that succeeds when the actual collection's count equals -/// the expected value -public func haveCount(expectedValue: Int) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(actualValue) with count \(expectedValue)" - let result = expectedValue == actualValue.count - failureMessage.actualValue = "\(actualValue.count)" - return result - } else { - return false - } - } -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - 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.integerValue).matches(expr, failureMessage: failureMessage) - } else if let actualValue = actualValue { - failureMessage.postfixMessage = "get type of NSArray, NSSet, NSDictionary, or NSHashTable" - failureMessage.actualValue = "\(classAsString(actualValue.dynamicType))" - } - return false - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift deleted file mode 100644 index 586e616..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift +++ /dev/null @@ -1,30 +0,0 @@ -import Foundation - -#if _runtime(_ObjC) - -/// A Nimble matcher that succeeds when the actual string satisfies the regular expression -/// described by the expected string. -public func match(expectedValue: String?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" - - if let actual = try actualExpression.evaluate() { - if let regexp = expectedValue { - return actual.rangeOfString(regexp, options: .RegularExpressionSearch) != nil - } - } - - return false - } -} - -extension NMBObjCMatcher { - 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/MatcherProtocols.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift deleted file mode 100644 index dd2e8b4..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift +++ /dev/null @@ -1,157 +0,0 @@ -import Foundation - -/// Implement this protocol to implement a custom matcher for Swift -public protocol Matcher { - typealias ValueType - func matches(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool - func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool -} - -#if _runtime(_ObjC) -/// Objective-C interface to the Swift variant of Matcher. -@objc public protocol NMBMatcher { - func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool - func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool -} -#endif - -#if _runtime(_ObjC) -/// Protocol for types that support contain() matcher. -@objc public protocol NMBContainer { - func containsObject(object: AnyObject!) -> Bool -} - -extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet -#else -public protocol NMBContainer { - func containsObject(object: AnyObject) -> Bool -} -#endif - -extension NSArray : NMBContainer {} -extension NSSet : NMBContainer {} - -#if _runtime(_ObjC) -/// Protocol for types that support only beEmpty(), haveCount() matchers -@objc public protocol NMBCollection { - var count: Int { get } -} - -extension NSHashTable : NMBCollection {} // Corelibs Foundation does not include these classes yet -extension NSMapTable : NMBCollection {} -#else -public protocol NMBCollection { - var count: Int { get } -} -#endif - -extension NSSet : NMBCollection {} -extension NSDictionary : NMBCollection {} - -#if _runtime(_ObjC) -/// Protocol for types that support beginWith(), endWith(), beEmpty() matchers -@objc public protocol NMBOrderedCollection : NMBCollection { - func indexOfObject(object: AnyObject!) -> Int -} -#else -public protocol NMBOrderedCollection : NMBCollection { - func indexOfObject(object: AnyObject) -> Int -} -#endif - -extension NSArray : NMBOrderedCollection {} - -#if _runtime(_ObjC) -/// Protocol for types to support beCloseTo() matcher -@objc public protocol NMBDoubleConvertible { - var doubleValue: CDouble { get } -} -#else -public protocol NMBDoubleConvertible { - var doubleValue: CDouble { get } -} - -extension Double : NMBDoubleConvertible { - public var doubleValue: CDouble { - get { - return self - } - } -} - -extension Float : NMBDoubleConvertible { - public var doubleValue: CDouble { - get { - return CDouble(self) - } - } -} -#endif - -extension NSNumber : NMBDoubleConvertible { -} - -private let dateFormatter: NSDateFormatter = { - let formatter = NSDateFormatter() - formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSS" - formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") - - return formatter -}() - -#if _runtime(_ObjC) -extension NSDate: NMBDoubleConvertible { - public var doubleValue: CDouble { - get { - return self.timeIntervalSinceReferenceDate - } - } -} -#endif - - -extension NMBDoubleConvertible { - public var stringRepresentation: String { - get { - if let date = self as? NSDate { - return dateFormatter.stringFromDate(date) - } - - if let debugStringConvertible = self as? CustomDebugStringConvertible { - return debugStringConvertible.debugDescription - } - - if let stringConvertible = self as? CustomStringConvertible { - return stringConvertible.description - } - - return "" - } - } -} - -/// 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 _runtime(_ObjC) -@objc public protocol NMBComparable { - func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult -} -#else -// This should become obsolete once Corelibs Foundation adds Comparable conformance to NSNumber -public protocol NMBComparable { - func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult -} -#endif - -extension NSNumber : NMBComparable { - public func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult { - return compare(otherObject as! NSNumber) - } -} -extension NSString : NMBComparable { - public func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult { - 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 deleted file mode 100644 index 0191f88..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift +++ /dev/null @@ -1,66 +0,0 @@ -import Foundation - -internal class NotificationCollector { - private(set) var observedNotifications: [NSNotification] - private let notificationCenter: NSNotificationCenter - #if _runtime(_ObjC) - private var token: AnyObject? - #else - private var token: NSObjectProtocol? - #endif - - required init(notificationCenter: NSNotificationCenter) { - self.notificationCenter = notificationCenter - self.observedNotifications = [] - } - - func startObserving() { - self.token = self.notificationCenter.addObserverForName(nil, object: nil, queue: nil) { - // linux-swift gets confused by .append(n) - [weak self] n in self?.observedNotifications += [n] - } - } - - deinit { - #if _runtime(_ObjC) - 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: NSNotificationCenter = NSNotificationCenter.defaultCenter()) - -> MatcherFunc { - let _ = mainThread // Force lazy-loading of this value - let collector = NotificationCollector(notificationCenter: center) - collector.startObserving() - var once: Bool = false - return MatcherFunc { 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 - } -} \ No newline at end of file diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift deleted file mode 100644 index ff6b74a..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift +++ /dev/null @@ -1,182 +0,0 @@ -import Foundation - -// This matcher requires the Objective-C, and being built by Xcode rather than the Swift Package Manager -#if _runtime(_ObjC) && !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 named: String? = nil, - reason: String? = nil, - userInfo: NSDictionary? = nil, - closure: ((NSException) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { 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) - } -} - -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 let _ = closure { - failureMessage.postfixMessage += " that satisfies block" - } - if named == nil && reason == nil && userInfo == nil && closure == nil { - failureMessage.postfixMessage = "raise any exception" - } - - if let exception = exception { - failureMessage.actualValue = "\(classAsString(exception.dynamicType)) { 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 named != nil && exception.name != named { - matches = false - } - if reason != nil && exception.reason != reason { - matches = false - } - if userInfo != nil && exception.userInfo != 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 - } - - public func matches(actualBlock: () -> 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) - } - - public func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - return !matches(actualBlock, failureMessage: failureMessage, location: location) - } - - public var named: (name: String) -> NMBObjCRaiseExceptionMatcher { - return ({ name in - return NMBObjCRaiseExceptionMatcher( - name: name, - reason: self._reason, - userInfo: self._userInfo, - block: self._block - ) - }) - } - - public var reason: (reason: String?) -> NMBObjCRaiseExceptionMatcher { - return ({ reason in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: reason, - userInfo: self._userInfo, - block: self._block - ) - }) - } - - public var userInfo: (userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { - return ({ userInfo in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: self._reason, - userInfo: userInfo, - block: self._block - ) - }) - } - - 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 { - 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/SatisfyAnyOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift deleted file mode 100644 index ddeddde..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift +++ /dev/null @@ -1,65 +0,0 @@ -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...) -> NonNilMatcherFunc { - return satisfyAnyOf(matchers) -} - -internal func satisfyAnyOf(matchers: [U]) -> NonNilMatcherFunc { - 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.addObject(NSString(string: "{\(failureMessage.postfixMessage)}")) - } - - failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoinedByString(", or ") - if let actualValue = try actualExpression.evaluate() { - failureMessage.actualValue = "\(actualValue)" - } - - return matches - } -} - -public func ||(left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> NonNilMatcherFunc { - return satisfyAnyOf(left, right) -} - -public func ||(left: FullMatcherFunc, right: FullMatcherFunc) -> NonNilMatcherFunc { - return satisfyAnyOf(left, right) -} - -public func ||(left: MatcherFunc, right: MatcherFunc) -> NonNilMatcherFunc { - return satisfyAnyOf(left, right) -} - -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func satisfyAnyOfMatcher(matchers: [NMBObjCMatcher]) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - if matchers.isEmpty { - failureMessage.stringValue = "satisfyAnyOf must be called with at least one matcher" - return false - } - - var elementEvaluators = [NonNilMatcherFunc]() - for matcher in matchers { - let elementEvaluator: (Expression, FailureMessage) -> Bool = { - expression, failureMessage in - return matcher.matches( - {try! expression.evaluate()}, failureMessage: failureMessage, location: actualExpression.location) - } - - elementEvaluators.append(NonNilMatcherFunc(elementEvaluator)) - } - - return try! satisfyAnyOf(elementEvaluators).matches(actualExpression, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift deleted file mode 100644 index c12e31c..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift +++ /dev/null @@ -1,181 +0,0 @@ -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 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? = nil, - errorType: T.Type? = nil, - closure: ((T) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - - var actualError: ErrorType? - do { - try actualExpression.evaluate() - } catch let catchedError { - actualError = catchedError - } - - setFailureMessageForError(failureMessage, actualError: actualError, error: error, errorType: errorType, closure: closure) - return errorMatchesNonNilFieldsOrClosure(actualError, error: error, errorType: errorType, closure: closure) - } -} - -internal func setFailureMessageForError( - failureMessage: FailureMessage, - actualError: ErrorType?, - error: T?, - errorType: T.Type? = nil, - closure: ((T) -> Void)?) { - failureMessage.postfixMessage = "throw error" - - if let error = error { - if let error = error as? CustomDebugStringConvertible { - failureMessage.postfixMessage += " <\(error.debugDescription)>" - } else { - failureMessage.postfixMessage += " <\(error)>" - } - } else if errorType != nil || closure != nil { - failureMessage.postfixMessage += " from type <\(T.self)>" - } - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" - } - if error == nil && errorType == nil && closure == nil { - failureMessage.postfixMessage = "throw any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesExpectedError( - actualError: ErrorType, - expectedError: T) -> Bool { - return actualError._domain == expectedError._domain - && actualError._code == expectedError._code -} - -internal func errorMatchesExpectedError( - actualError: ErrorType, - expectedError: T) -> Bool { - if let actualError = actualError as? T { - return actualError == expectedError - } - return false -} - -internal func errorMatchesNonNilFieldsOrClosure( - actualError: ErrorType?, - error: T?, - errorType: T.Type?, - closure: ((T) -> Void)?) -> Bool { - var matches = false - - if let actualError = actualError { - matches = true - - if let error = error { - if !errorMatchesExpectedError(actualError, expectedError: error) { - matches = false - } - } - if let actualError = actualError as? T { - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError as T) - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } else if errorType != nil && closure != nil { - // The closure expects another ErrorType as argument, so this - // is _supposed_ to fail, so that it becomes more obvious. - let assertions = gatherExpectations { - expect(actualError is T).to(equal(true)) - } - precondition(assertions.map { $0.message }.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 ErrorType in the closure. -/// -/// The closure only gets called when an error was thrown. -public func throwError( - closure closure: ((ErrorType) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - - var actualError: ErrorType? - do { - try actualExpression.evaluate() - } catch let catchedError { - actualError = catchedError - } - - setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) - return errorMatchesNonNilFieldsOrClosure(actualError, closure: closure) - } -} - -internal func setFailureMessageForError( - failureMessage: FailureMessage, - actualError: ErrorType?, - closure: ((ErrorType) -> Void)?) { - failureMessage.postfixMessage = "throw error" - - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" - } else { - failureMessage.postfixMessage = "throw any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesNonNilFieldsOrClosure( - actualError: ErrorType?, - closure: ((ErrorType) -> Void)?) -> Bool { - var matches = false - - if let actualError = 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 -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Nimble.h b/Example/Pods/Nimble/Sources/Nimble/Nimble.h deleted file mode 100644 index 296760c..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Nimble.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import "NMBExceptionCapture.h" -#import "DSL.h" - -FOUNDATION_EXPORT double NimbleVersionNumber; -FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; \ No newline at end of file diff --git a/Example/Pods/Nimble/Sources/Nimble/ObjCExpectation.swift b/Example/Pods/Nimble/Sources/Nimble/ObjCExpectation.swift deleted file mode 100644 index 3f18d06..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/ObjCExpectation.swift +++ /dev/null @@ -1,131 +0,0 @@ -import Foundation - -#if _runtime(_ObjC) - -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: NSTimeInterval = 1.0 - - public init(actualBlock: () -> 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? - } - } - - public var withTimeout: (NSTimeInterval) -> NMBExpectation { - return ({ timeout in self._timeout = timeout - return self - }) - } - - public var to: (NMBMatcher) -> Void { - return ({ matcher in - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher)) - }) - } - - public var toWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher), description: description) - }) - } - - public var toNot: (NMBMatcher) -> Void { - return ({ matcher in - self.expectValue.toNot( - ObjCMatcherWrapper(matcher: matcher) - ) - }) - } - - public var toNotWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - self.expectValue.toNot( - ObjCMatcherWrapper(matcher: matcher), description: description - ) - }) - } - - public var notTo: (NMBMatcher) -> Void { return toNot } - - public var notToWithDescription: (NMBMatcher, String) -> Void { return toNotWithDescription } - - public var toEventually: (NMBMatcher) -> Void { - return ({ matcher in - self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: nil - ) - }) - } - - public var toEventuallyWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: description - ) - }) - } - - public var toEventuallyNot: (NMBMatcher) -> Void { - return ({ matcher in - self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: nil - ) - }) - } - - public var toEventuallyNotWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: description - ) - }) - } - - public var toNotEventually: (NMBMatcher) -> Void { return toEventuallyNot } - - public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { return toEventuallyNotWithDescription } - - 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/Utils/Async.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift deleted file mode 100644 index 2a86749..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift +++ /dev/null @@ -1,358 +0,0 @@ -import Foundation - -#if _runtime(_ObjC) -import Dispatch - -private let timeoutLeeway: UInt64 = NSEC_PER_MSEC -private let pollLeeway: UInt64 = NSEC_PER_MSEC - -/// 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? = nil - init() { } - - func acquireWaitingLock(fnName: String, file: FileString, line: UInt) { - let info = WaitingInfo(name: fnName, file: file, lineNumber: line) - nimblePrecondition( - NSThread.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(ErrorType) - /// 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: dispatch_semaphore_t - - init() { - signal = dispatch_semaphore_create(1) - } - - /// 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 recieved first. - func resolveResult(result: AwaitResult) -> Bool { - if dispatch_semaphore_wait(signal, DISPATCH_TIME_NOW) == 0 { - self.asyncResult = result - return true - } else { - return false - } - } -} - -internal struct AwaitTrigger { - let timeoutSource: dispatch_source_t - let actionSource: dispatch_source_t? - 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: NSTimeInterval, forcefullyAbortTimeout: NSTimeInterval) -> 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. - dispatch_source_set_timer( - trigger.timeoutSource, - dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutInterval * Double(NSEC_PER_SEC))), - DISPATCH_TIME_FOREVER, - timeoutLeeway - ) - dispatch_source_set_event_handler(trigger.timeoutSource) { - guard self.promise.asyncResult.isIncomplete() else { return } - let timedOutSem = dispatch_semaphore_create(0) - let semTimedOutOrBlocked = dispatch_semaphore_create(0) - dispatch_semaphore_signal(semTimedOutOrBlocked) - let runLoop = CFRunLoopGetMain() - CFRunLoopPerformBlock(runLoop, kCFRunLoopDefaultMode) { - if dispatch_semaphore_wait(semTimedOutOrBlocked, DISPATCH_TIME_NOW) == 0 { - dispatch_semaphore_signal(timedOutSem) - dispatch_semaphore_signal(semTimedOutOrBlocked) - if self.promise.resolveResult(.TimedOut) { - CFRunLoopStop(CFRunLoopGetMain()) - } - } - } - // potentially interrupt blocking code on run loop to let timeout code run - CFRunLoopStop(runLoop) - let now = dispatch_time(DISPATCH_TIME_NOW, Int64(forcefullyAbortTimeout * Double(NSEC_PER_SEC))) - let didNotTimeOut = dispatch_semaphore_wait(timedOutSem, now) != 0 - let timeoutWasNotTriggered = dispatch_semaphore_wait(semTimedOutOrBlocked, 0) == 0 - 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 undesireable 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)) - } - dispatch_resume(self.trigger.timeoutSource) - while self.promise.asyncResult.isIncomplete() { - // Stopping the run loop does not work unless we run only 1 mode - NSRunLoop.currentRunLoop().runMode(NSDefaultRunLoopMode, beforeDate: NSDate.distantFuture()) - } - dispatch_suspend(self.trigger.timeoutSource) - dispatch_source_cancel(self.trigger.timeoutSource) - if let asyncSource = self.trigger.actionSource { - dispatch_source_cancel(asyncSource) - } - } - - return promise.asyncResult - } -} - -internal class Awaiter { - let waitLock: WaitLock - let timeoutQueue: dispatch_queue_t - let asyncQueue: dispatch_queue_t - - internal init( - waitLock: WaitLock, - asyncQueue: dispatch_queue_t, - timeoutQueue: dispatch_queue_t) { - self.waitLock = waitLock - self.asyncQueue = asyncQueue - self.timeoutQueue = timeoutQueue - } - - private func createTimerSource(queue: dispatch_queue_t) -> dispatch_source_t { - return dispatch_source_create( - DISPATCH_SOURCE_TYPE_TIMER, - 0, - DISPATCH_TIMER_STRICT, - queue - ) - } - - func performBlock( - closure: ((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 - nimblePrecondition( - completionCount < 2, - "InvalidNimbleAPIUsage", - "Done closure's was called multiple times. waitUntil(..) expects its " + - "completion closure to only be called once.") - if promise.resolveResult(.Completed($0)) { - CFRunLoopStop(CFRunLoopGetMain()) - } - } - } - - return AwaitPromiseBuilder( - awaiter: self, - waitLock: waitLock, - promise: promise, - trigger: trigger) - } - - func poll(pollInterval: NSTimeInterval, closure: () throws -> T?) -> AwaitPromiseBuilder { - let promise = AwaitPromise() - let timeoutSource = createTimerSource(timeoutQueue) - let asyncSource = createTimerSource(asyncQueue) - let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { - let interval = UInt64(pollInterval * Double(NSEC_PER_SEC)) - dispatch_source_set_timer(asyncSource, DISPATCH_TIME_NOW, interval, pollLeeway) - dispatch_source_set_event_handler(asyncSource) { - do { - if let result = try closure() { - if promise.resolveResult(.Completed(result)) { - CFRunLoopStop(CFRunLoopGetCurrent()) - } - } - } catch let error { - if promise.resolveResult(.ErrorThrown(error)) { - CFRunLoopStop(CFRunLoopGetCurrent()) - } - } - } - dispatch_resume(asyncSource) - } - - return AwaitPromiseBuilder( - awaiter: self, - waitLock: waitLock, - promise: promise, - trigger: trigger) - } -} - -internal func pollBlock( - pollInterval pollInterval: NSTimeInterval, - timeoutInterval: NSTimeInterval, - file: FileString, - line: UInt, - fnName: String = __FUNCTION__, - expression: () throws -> Bool) -> AwaitResult { - let awaiter = NimbleEnvironment.activeInstance.awaiter - let result = awaiter.poll(pollInterval) { () throws -> Bool? in - do { - if try expression() { - return true - } - return nil - } catch let error { - throw error - } - }.timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval / 2.0).wait(fnName, file: file, line: line) - - return result -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/ExceptionCapture.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/ExceptionCapture.swift deleted file mode 100644 index e94c45f..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/ExceptionCapture.swift +++ /dev/null @@ -1,31 +0,0 @@ -import Foundation - -#if !_runtime(_ObjC) -// swift-corelibs-foundation doesn't provide NSException at all, so provide a dummy -class NSException {} -#endif - -// NOTE: This file is not intended to be included in the Xcode project. It -// is picked up by the Swift Package Manager during its build process. - -/// A dummy reimplementation of the `NMBExceptionCapture` class to serve -/// as a stand-in for build and runtime environments that don't support -/// Objective C. -internal class ExceptionCapture { - let finally: (() -> Void)? - - init(handler: ((NSException!) -> Void)?, finally: (() -> Void)?) { - self.finally = finally - } - - func tryBlock(unsafeBlock: (() -> Void)) { - // We have no way of handling Objective C exceptions in Swift, - // so we just go ahead and run the unsafeBlock as-is - unsafeBlock() - - finally?() - } -} - -/// Compatibility with the actual Objective-C implementation -typealias NMBExceptionCapture = ExceptionCapture diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift deleted file mode 100644 index e85c755..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension SequenceType { - internal func all(fn: Generator.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 deleted file mode 100644 index a7279aa..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift +++ /dev/null @@ -1,31 +0,0 @@ -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 _runtime(_ObjC) -public typealias FileString = String -#else -public typealias FileString = StaticString -#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 deleted file mode 100644 index 3faab96..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift +++ /dev/null @@ -1,80 +0,0 @@ -import Foundation - - -internal func identityAsString(value: AnyObject?) -> String { - if let value = value { - return NSString(format: "<%p>", unsafeBitCast(value, Int.self)).description - } else { - return "nil" - } -} - -internal func classAsString(cls: AnyClass) -> String { -#if _runtime(_ObjC) - return NSStringFromClass(cls) -#else - return String(cls) -#endif -} - -internal func arrayAsString(items: [T], joiner: String = ", ") -> String { - return items.reduce("") { accum, item in - let prefix = (accum.isEmpty ? "" : joiner) - return accum + prefix + "\(stringify(item))" - } -} - -#if _runtime(_ObjC) -@objc internal protocol NMBStringer { - func NMB_stringify() -> String -} - -extension NSArray : NMBStringer { - func NMB_stringify() -> String { - let str = self.componentsJoinedByString(", ") - return "[\(str)]" - } -} -#endif - -internal func stringify(value: S) -> String { - var generator = value.generate() - var strings = [String]() - var value: S.Generator.Element? - repeat { - value = generator.next() - if value != nil { - strings.append(stringify(value)) - } - } while value != nil - let str = strings.joinWithSeparator(", ") - return "[\(str)]" -} - -internal func stringify(value: T) -> String { - if let value = value as? Double { - return NSString(format: "%.4f", (value)).description - } else if let value = value as? NSData { -#if os(Linux) - // FIXME: Swift on Linux triggers a segfault when calling NSData's hash() (last checked on 03-11) - return "NSData" -#else - return "NSData" -#endif - } - return String(value) -} - -internal func stringify(value: NMBDoubleConvertible) -> String { - if let value = value as? Double { - return NSString(format: "%.4f", (value)).description - } - return value.stringRepresentation -} - -internal func stringify(value: T?) -> String { - if let unboxed = value { - return stringify(unboxed) - } - return "nil" -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift b/Example/Pods/Nimble/Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift deleted file mode 100644 index 3df6eb6..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift +++ /dev/null @@ -1,140 +0,0 @@ -import Foundation - -#if _runtime(_ObjC) - -public struct AsyncDefaults { - public static var Timeout: NSTimeInterval = 1 - public static var PollInterval: NSTimeInterval = 0.01 -} - -internal struct AsyncMatcherWrapper: Matcher { - let fullMatcher: U - let timeoutInterval: NSTimeInterval - let pollInterval: NSTimeInterval - - init(fullMatcher: U, timeoutInterval: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = 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.actualValue = "an unexpected error thrown: <\(error)>" - return false - case let .RaisedException(exception): - failureMessage.actualValue = "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.actualValue = "an unexpected error thrown: <\(error)>" - return false - case let .RaisedException(exception): - failureMessage.actualValue = "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(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(matcher: U, timeout: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - 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: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - 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: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Wrappers/MatcherFunc.swift b/Example/Pods/Nimble/Sources/Nimble/Wrappers/MatcherFunc.swift deleted file mode 100644 index ff9c2ee..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Wrappers/MatcherFunc.swift +++ /dev/null @@ -1,95 +0,0 @@ -/// A convenience API to build matchers that allow full control over -/// to() and toNot() match cases. -/// -/// The final bool argument in the closure is if the match is for negation. -/// -/// 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. -public struct FullMatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage, Bool) throws -> Bool - - public init(_ matcher: (Expression, FailureMessage, Bool) throws -> Bool) { - self.matcher = matcher - } - - public func matches(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try matcher(actualExpression, failureMessage, false) - } - - public func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try matcher(actualExpression, failureMessage, true) - } -} - -/// 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 recieved 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. -public struct MatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage) throws -> Bool - - public init(_ matcher: (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) - } -} - -/// 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. -public struct NonNilMatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage) throws -> Bool - - public init(_ matcher: (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 - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Wrappers/ObjCMatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Wrappers/ObjCMatcher.swift deleted file mode 100644 index 9f31d42..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Wrappers/ObjCMatcher.swift +++ /dev/null @@ -1,81 +0,0 @@ -import Foundation - -#if _runtime(_ObjC) - -public typealias MatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage) -> Bool -public typealias FullMatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage, shouldNotMatch: Bool) -> Bool - -public class NMBObjCMatcher : NSObject, NMBMatcher { - let _match: MatcherBlock - let _doesNotMatch: MatcherBlock - let canMatchNil: Bool - - public init(canMatchNil: Bool, matcher: MatcherBlock, notMatcher: MatcherBlock) { - self.canMatchNil = canMatchNil - self._match = matcher - self._doesNotMatch = notMatcher - } - - public convenience init(matcher: MatcherBlock) { - self.init(canMatchNil: true, matcher: matcher) - } - - public convenience init(canMatchNil: Bool, matcher: MatcherBlock) { - self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage in - return !matcher(actualExpression: actualExpression, failureMessage: failureMessage) - })) - } - - public convenience init(matcher: FullMatcherBlock) { - self.init(canMatchNil: true, matcher: matcher) - } - - public convenience init(canMatchNil: Bool, matcher: FullMatcherBlock) { - self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage in - return matcher(actualExpression: actualExpression, failureMessage: failureMessage, shouldNotMatch: false) - }), notMatcher: ({ actualExpression, failureMessage in - return matcher(actualExpression: actualExpression, failureMessage: failureMessage, shouldNotMatch: 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: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let expr = Expression(expression: actualBlock, location: location) - let result = _match( - actualExpression: expr, - failureMessage: failureMessage) - if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { - return result - } else { - return false - } - } - - public func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let expr = Expression(expression: actualBlock, location: location) - let result = _doesNotMatch( - actualExpression: expr, - failureMessage: 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/objc/CurrentTestCaseTracker.m b/Example/Pods/Nimble/Sources/Nimble/objc/CurrentTestCaseTracker.m deleted file mode 100644 index 0d3b4db..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/objc/CurrentTestCaseTracker.m +++ /dev/null @@ -1,18 +0,0 @@ -#import -#import - -SWIFT_CLASS("_TtC6Nimble22CurrentTestCaseTracker") -@interface CurrentTestCaseTracker : NSObject -+ (CurrentTestCaseTracker *)sharedInstance; -@end - -@interface CurrentTestCaseTracker (Register) @end - -@implementation CurrentTestCaseTracker (Register) - -+ (void)load { - CurrentTestCaseTracker *tracker = [CurrentTestCaseTracker sharedInstance]; - [[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:tracker]; -} - -@end diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/DSL.h b/Example/Pods/Nimble/Sources/Nimble/objc/DSL.h deleted file mode 100644 index a499059..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/objc/DSL.h +++ /dev/null @@ -1,145 +0,0 @@ -#import - -@class NMBExpectation; -@class NMBObjCBeCloseToMatcher; -@class NMBObjCRaiseExceptionMatcher; -@protocol NMBMatcher; - - -#define NIMBLE_EXPORT FOUNDATION_EXPORT - -#ifdef NIMBLE_DISABLE_SHORT_SYNTAX -#define NIMBLE_SHORT(PROTO, ORIGINAL) -#else -#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); } -#endif - -NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line); -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line); - -NIMBLE_EXPORT id NMB_equal(id expectedValue); -NIMBLE_SHORT(id equal(id expectedValue), - NMB_equal(expectedValue)); - -NIMBLE_EXPORT id NMB_haveCount(id expectedValue); -NIMBLE_SHORT(id haveCount(id expectedValue), - NMB_haveCount(expectedValue)); - -NIMBLE_EXPORT NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); -NIMBLE_SHORT(NMBObjCBeCloseToMatcher *beCloseTo(id expectedValue), - NMB_beCloseTo(expectedValue)); - -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); -NIMBLE_SHORT(id beAnInstanceOf(Class expectedClass), - NMB_beAnInstanceOf(expectedClass)); - -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); -NIMBLE_SHORT(id beAKindOf(Class expectedClass), - NMB_beAKindOf(expectedClass)); - -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); -NIMBLE_SHORT(id beginWith(id itemElementOrSubstring), - NMB_beginWith(itemElementOrSubstring)); - -NIMBLE_EXPORT id NMB_beGreaterThan(NSNumber *expectedValue); -NIMBLE_SHORT(id beGreaterThan(NSNumber *expectedValue), - NMB_beGreaterThan(expectedValue)); - -NIMBLE_EXPORT id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); -NIMBLE_SHORT(id beGreaterThanOrEqualTo(NSNumber *expectedValue), - NMB_beGreaterThanOrEqualTo(expectedValue)); - -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)); - -NIMBLE_EXPORT id NMB_beLessThan(NSNumber *expectedValue); -NIMBLE_SHORT(id beLessThan(NSNumber *expectedValue), - NMB_beLessThan(expectedValue)); - -NIMBLE_EXPORT id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); -NIMBLE_SHORT(id beLessThanOrEqualTo(NSNumber *expectedValue), - NMB_beLessThanOrEqualTo(expectedValue)); - -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_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 - -// 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(^id{ 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 -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/DSL.m b/Example/Pods/Nimble/Sources/Nimble/objc/DSL.m deleted file mode 100644 index 2170238..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/objc/DSL.m +++ /dev/null @@ -1,150 +0,0 @@ -#import -#import - -SWIFT_CLASS("_TtC6Nimble7NMBWait") -@interface NMBWait : NSObject - -+ (void)untilTimeout:(NSTimeInterval)timeout file:(NSString *)file line:(NSUInteger)line action:(void(^)())action; -+ (void)untilFile:(NSString *)file line:(NSUInteger)line action:(void(^)())action; - -@end - -NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line) { - return [[NMBExpectation alloc] initWithActualBlock:actualBlock - negative:NO - file:file - line:line]; -} - -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), 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 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 id NMB_beGreaterThan(NSNumber *expectedValue) { - return [NMBObjCMatcher beGreaterThanMatcher:expectedValue]; -} - -NIMBLE_EXPORT 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 id NMB_beLessThan(NSNumber *expectedValue) { - return [NMBObjCMatcher beLessThanMatcher:expectedValue]; -} - -NIMBLE_EXPORT 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_endWith(id itemElementOrSubstring) { - return [NMBObjCMatcher endWithMatcher:itemElementOrSubstring]; -} - -NIMBLE_EXPORT id NMB_equal(id expectedValue) { - return [NMBObjCMatcher equalMatcher:expectedValue]; -} - -NIMBLE_EXPORT 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 NMBObjCRaiseExceptionMatcher *NMB_raiseException() { - return [NMBObjCMatcher raiseExceptionMatcher]; -} - -NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line) { - return ^(NSTimeInterval timeout, void (^action)(void (^)(void))) { - [NMBWait untilTimeout:timeout file:file line:line action:action]; - }; -} - -NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line) { - return ^(void (^action)(void (^)(void))) { - [NMBWait untilFile:file line:line action:action]; - }; -} diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.h b/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.h deleted file mode 100644 index 7e5fb07..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import - -@interface NMBExceptionCapture : NSObject - -- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; -- (void)tryBlock:(void(^)())unsafeBlock; - -@end - -typedef void(^NMBSourceCallbackBlock)(BOOL successful); diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.m b/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.m deleted file mode 100644 index 48f5739..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.m +++ /dev/null @@ -1,35 +0,0 @@ -#import "NMBExceptionCapture.h" - -@interface NMBExceptionCapture () -@property (nonatomic, copy) void(^handler)(NSException *exception); -@property (nonatomic, copy) void(^finally)(); -@end - -@implementation NMBExceptionCapture - -- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally { - self = [super init]; - if (self) { - self.handler = handler; - self.finally = finally; - } - return self; -} - -- (void)tryBlock:(void(^)())unsafeBlock { - @try { - unsafeBlock(); - } - @catch (NSException *exception) { - if (self.handler) { - self.handler(exception); - } - } - @finally { - if (self.finally) { - self.finally(); - } - } -} - -@end \ No newline at end of file diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index c4fc78c..b7288f2 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,138 +7,38 @@ objects = { /* Begin PBXBuildFile section */ - 000397554E8DD982879A21355DC11061 /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = 91EB10846A1D5A8B9A3BA28C5457DF56 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 03A9FD93E86C0CD07A37D7BF34A02F09 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4AE9C10DA93BFE440F17876611232E1 /* Match.swift */; }; 0B4AB0FCF592D2D2BA5535E4047CF103 /* MarkdownCommonElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51291E17F60CA68814ABEA8DE8A8E8DB /* MarkdownCommonElement.swift */; }; 0DCA1E76E678A16F35741C8C8B139E61 /* MarkdownKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A49365A49D9E34E21EFAE23159045383 /* MarkdownKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 112614F21939902B59102E6E876ADCBC /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A414C35360A25163AA8D7D17AB68C77 /* RaisesException.swift */; }; - 135B6326D35C977854AA0C12B3F6CB7D /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627E4E84747227302312F1E22D114789 /* DSL.swift */; }; - 13CC849FA70CADF802470B6A90DCDF79 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AD566EC508F35AEBD09410C38B0113 /* AllPass.swift */; }; - 19FE62EDCBEDA0E55E43CED17D706D1F /* String+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66CBE690E9186E686698A8A8A71C5355 /* String+FileName.swift */; }; - 1A418316D623787C91A3825053F60D34 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91B7C1953D52C630B7CEA85DC7D30371 /* ErrorUtility.swift */; }; - 1E7702EDE11983C8EAF4FC094D187CA3 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A1177F46842A02EE1A9A945434E453FF /* QuickSpec.m */; }; - 1ED8C77E9422C66BBF56E6C10D5826F0 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = D365431FBA3C40A9570E9266B44005D7 /* NMBExceptionCapture.m */; }; - 23626BC4DDA1A2E90A155728F57802FF /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DC1174FD42CD6684C5DE79AC08B57C5 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 24333B1DE195DDCB713796A988C058C6 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = C5DDC9824ED21BCC218F3C3E3E907AED /* XCTestSuite+QuickTestSuiteBuilder.m */; }; + 15F5B1693B7E250021D9F73313C588CD /* Pods-MarkdownKit_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E5A8A16BF25D3EED1BDEDE1C60BFED28 /* Pods-MarkdownKit_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2769E8D80EC655CD383ACD40E9DAA368 /* MarkdownHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0E13CA4BF5DA2C5BE06EA262C09693B /* MarkdownHeader.swift */; }; 2A3B940D16B48676872C2D47DF2DE49F /* MarkdownItalic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FE2C274ECA79A509C2CECA2A57F6D90 /* MarkdownItalic.swift */; }; - 2B33F0623C4CA06C5E36E21AF02B2B75 /* Pods-MarkdownKit_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E5A8A16BF25D3EED1BDEDE1C60BFED28 /* Pods-MarkdownKit_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2C9E00FF8823329FD8DE49F4BBA57E3E /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03925EC2DD9F80DCD0C2E5301B52DC9C /* QuickSelectedTestSuiteBuilder.swift */; }; - 2E869425BB68E1A06D3648837858DFDF /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F17FBDF6FF6B666A3D102EDD81DFE416 /* Filter.swift */; }; 3062AA7216AFB2981AEC2ACDAB2AF229 /* MarkdownAutomaticLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32948F796358A162964D55D59398E301 /* MarkdownAutomaticLink.swift */; }; - 30AACAA8D51DC8C429577D9B67BB016C /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 203A5C5D36EAB5C74A7CA2C7F3E57854 /* BeginWith.swift */; }; - 31629295E87A24C98238C66D41983C49 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFB2D871B9C6D5C6EE2172BB9AFD2627 /* BeVoid.swift */; }; - 321AEC88D395C63C656443025E9670D9 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4D34ECCB9113A10197320CD540DDA73 /* ExampleMetadata.swift */; }; - 3583D4A470B69DB89E224CAE0E61C076 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 008A5F43350B1984916B33BCAFD01149 /* UIKit.framework */; }; + 3583D4A470B69DB89E224CAE0E61C076 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E86668F20F252C440D1015B816BE59C5 /* UIKit.framework */; }; 35F4B76D5EE6893EEABB5F31E1CA81B6 /* MarkdownElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31FC62C0AB079C480AA839FC8E2F7E6D /* MarkdownElement.swift */; }; - 38F5CE4B4C59A81734A93E32D35B696E /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A562213D0385708961C195D0CF8C45E /* FailureMessage.swift */; }; - 3D1BB98DEA422D8F173613EC715488B9 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22BF65FFEC8A084057E63EDF139D2BD1 /* PostNotification.swift */; }; 3DECB34377D005410E95A92DFDC6A352 /* UIFont+Traits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 442C1FF52E42976A7444120D1B0E5F95 /* UIFont+Traits.swift */; }; 40EB06F1F38F9654C1AFB2C024DE274E /* MarkdownEscaping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CCCF7B4D2C15E917DA7C9418A294A54 /* MarkdownEscaping.swift */; }; - 415F29FE4E9D970954C46CD3CF4AE345 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C8C873CB5F43A0FA130C9B9FF74B6B0 /* SatisfyAnyOf.swift */; }; - 4237E9A8685C6851A4AE13428A18FAC2 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = DE3C8A356B44398ECE2F664B378A6443 /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 47CBCE8837CE75AE1B7484A63CE387ED /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A71B6C19E4D0C8A4D14A6EF1AB8728EB /* Foundation.framework */; }; - 486B74C8EFEB68AD25CE128F3051E432 /* ObjCExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A129290F935182407C183EB04C0C2C90 /* ObjCExpectation.swift */; }; 49DBAC259A9436C8E601A246A70D5DDD /* MarkdownUnescaping.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEF2217217452DEDC927C5CB2F824F60 /* MarkdownUnescaping.swift */; }; 4AB9A32C733C02EAC3DF963921B85FF6 /* Pods-MarkdownKit_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C179D98275D6B72775BA3D06CAD0F61 /* Pods-MarkdownKit_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4AF6C26A30D865059C24DC5317786B76 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F2748FABD1661E3A75F8B07E115CF96 /* BeNil.swift */; }; 4BA72E9513DF8540AC666BC963E5E789 /* MarkdownLinkElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65520C4799529A9A899B5CB86F96C16E /* MarkdownLinkElement.swift */; }; 4CD0F9E82832ECF88EBC612FDE812848 /* MarkdownParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = B08396BEB5CE8733EF93C630FEF494D2 /* MarkdownParser.swift */; }; - 4E5A721963877AA3A6AA3D80DAA4E5E9 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDAA753452F6B96DE24D2CF7D396628 /* AssertionRecorder.swift */; }; - 5104AE2989305145BF446E633B567924 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EE5DB72110FF4FE8D16C90A617EFD92 /* EndWith.swift */; }; - 5605012FE4AAA6DCD3A6ABB36D755CF2 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B16739831A57E59BFE39E8BF50128C /* NSBundle+CurrentTestBundle.swift */; }; - 5703EDDCBB627BECC13B95D21D3943A8 /* Pods-MarkdownKit_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A3FE0F89027F65BA3054BF745E2A49 /* Pods-MarkdownKit_Tests-dummy.m */; }; - 5EF5C00C6AECE1FCFFF118577817F5CE /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45D3661DD977D936FA0FEA7FDE08D852 /* Equal.swift */; }; - 63BBD83995BA60FA7D2E6AD4138C0D71 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 354B5315AD30C24D1172D4F1524B068D /* Functional.swift */; }; 640295165C642D68C841301358CFE995 /* MarkdownCodeEscaping.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB68ECF1745720211469510E0B6BEED7 /* MarkdownCodeEscaping.swift */; }; - 64539BE196D1741570018FFF86F14133 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971FBD63640E42D5B13E199D80A38E44 /* MatcherFunc.swift */; }; - 68527A7545342CBB4F923DC8543F7B20 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = FA89F15C3F95B9AD5D5608775C0DF7BD /* DSL.m */; }; - 6940948ECB0B0A245A6D4FDDAC5FBFBF /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EBC862576E582DF711B25DC28CFCDBE /* QuickTestSuite.swift */; }; 6A95EA9E259311E409E4832650319C34 /* MarkdownKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 543CA0D84BEAFA923CAD0FF2B597A3AF /* MarkdownKit-dummy.m */; }; - 6ED0409031540D9B2AD7B061B608B0C9 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75752235C59671F25A86BF987E354AFE /* DSL+Wait.swift */; }; - 7202A0B871C57B7857341D88C2883A3A /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 020CA039BDF669709230645FC23F7C77 /* BeIdenticalTo.swift */; }; - 7658C18CDE0FA60EB96064B6E47DF9BC /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44E91E6A6263B0D61B049B648F6271E7 /* XCTest.framework */; }; - 7734BABBECE0071CF5D4430515B938BF /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CE93FA4667205AEE386C8648ABDC57E /* BeCloseTo.swift */; }; - 775646739B95E828ECE349F6A39534F4 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E85327D01378E8AB714335E9E7CE7F /* NimbleEnvironment.swift */; }; 7A5F8E5F83A4ECC163EC689327E195B9 /* Pods-MarkdownKit_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C71C393F0B8E6B708E0B0BD2692EC5D2 /* Pods-MarkdownKit_Example-dummy.m */; }; 7C30A9A036BACE071C2232970FC16A0D /* MarkdownLevelElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3457FE244178722260912762E29F73E9 /* MarkdownLevelElement.swift */; }; - 7CC86ABC7F4135EE12A755B023F134CE /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D3267C4CAF13D33F026B9104C33238 /* AssertionDispatcher.swift */; }; - 7DC9B169B5FCC3EE99F6D36EC530FE1E /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D924A98F0691CB7100035FC7C2958D3 /* Async.swift */; }; - 7EBD6B630F4536CB673DC0B455CCB16D /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6988794BE3149D9E7253F7D057A0A92 /* BeGreaterThan.swift */; }; - 7F40FC3F4DE4EA4702F41F01A12A7353 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62C9EA115D167F4132613835B0AA5585 /* BeLessThan.swift */; }; - 800A161E9B82DEEDA41B7F1A746B24C4 /* ObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB75D143FA2C1D4F42F8F03369239006 /* ObjCMatcher.swift */; }; - 8040A37FF5BBDF1964CAB8C0068ED315 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAC325F77555916EE55065F37EA4C575 /* BeGreaterThanOrEqualTo.swift */; }; - 812457A6A78239B3ED9E49223C180BEF /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = B973D705E425F6A8CF2906380774F7EC /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 81E6453ECE511335537301CD3B1C1B82 /* ExceptionCapture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F50105FCC804A51F7EDCB8C8F84AF9A /* ExceptionCapture.swift */; }; - 86FB708FCFE6121A82BB09E5ADD84554 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = A2ADFE64923497AA07A24FC59913A587 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88C30E1231C6EDE6EBC70B81385CDA95 /* String+UTF16.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD28D7CFA3CDE1E22B33C3AC2938E5F0 /* String+UTF16.swift */; }; 8CBF747FA83EBD31AF3C45C8BF3DA850 /* MarkdownBold.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D573611A6212351868CEC3321446F07 /* MarkdownBold.swift */; }; - 90623B74595B365D7E1ABE97836D66AA /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = D772AF03D0B82E63647D129AEA9CCF1B /* SuiteHooks.swift */; }; - 91ED5B067FCA3CBD48E3114672941051 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC1FD51C6442C713FB319C1C9A49AB19 /* MatcherProtocols.swift */; }; - 93D62732828730AD72E9A09ACD5C4431 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66A3FFEFA87108503C1154659236D755 /* ExampleHooks.swift */; }; - 95472F609CB227300488E4A6E8646197 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 3973F89F7C13EAD4855CFC68BCC8511E /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 95805D10C67C57495F1D0C79C16C3C3E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A71B6C19E4D0C8A4D14A6EF1AB8728EB /* Foundation.framework */; }; - 96ED0CCA721955637A88FE0C9737EC56 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85564484FA6ABBE76C0B73863EFFFCDE /* SourceLocation.swift */; }; - 9B061EE7608AAD6023B036880CC36DB9 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC07B6CC006238186A56EEC6E8D3CD88 /* Callsite.swift */; }; + 93BA6B646239D6AA222D2806C19C24E1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2A6FF208CEC4C2861F1E9D42D651453 /* Foundation.framework */; }; + 95805D10C67C57495F1D0C79C16C3C3E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2A6FF208CEC4C2861F1E9D42D651453 /* Foundation.framework */; }; 9B3DE529A21CB30E8576865B70F81044 /* MarkdownStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = E69C97244CFFE9D2635F1C99FB46A4E2 /* MarkdownStyle.swift */; }; - 9B5DE58927557CE87968C051D2A1C47E /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = D29528E2ADACEB31F5B2380DA50612C1 /* BeLogical.swift */; }; - 9CDB5A556619932BEED6F6D01639E816 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A71B6C19E4D0C8A4D14A6EF1AB8728EB /* Foundation.framework */; }; - 9F08F74CB8740CF0EFF26746EEB0C930 /* CurrentTestCaseTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 9759ABA2939945FD31FB478AE32D9E15 /* CurrentTestCaseTracker.m */; }; - A2CABD326609AD67377700A148785E09 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = C34071C41916A37E669FEEBA855F42C2 /* BeAnInstanceOf.swift */; }; - A374A2729E32469085C5025EC7115EB8 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF762208E123E2F61AEE13E62DCA565 /* Stringers.swift */; }; - A55EC200F57C00E9A78D8A9DA4545338 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF1A6A09F31564DDB5769E5567558BD /* HaveCount.swift */; }; - A60893DCE3A5E03BBF4CA4207785335C /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ED85DFD58F13E73CC6080D18D5C1E10 /* Quick-dummy.m */; }; - A99D3D3FB1103446764CE5902AE169FC /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = E2353FC0C41320250E7132DE6734F885 /* QuickConfiguration.m */; }; - ABC5915D74FC7D22213C4257E766FE4C /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C369DE47B8FBDDF56994EF084D14F12 /* HooksPhase.swift */; }; B12BD10106EA5E94E0BB6C5A881AABB0 /* MarkdownCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013C606785D3E50DE58DBF26309C0DBF /* MarkdownCode.swift */; }; - B43EDBC7DA15A429006C67B63D45ACFD /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E904D9C3B8ED32F61307B82AF1DE02 /* ThrowError.swift */; }; - B74DA6D783EF08DF48E189BBB91FE550 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 69E738963C2EB4542069F1E6586836C9 /* QCKDSL.m */; }; - B9D2E426B5CA226D60A78A71FA289D4C /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9341EE27FCA41AD8B88193EC0C839859 /* AsyncMatcherWrapper.swift */; }; - BAEC0726AA887D902158DEEE03A63765 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE8CFDED63B2CD5BC846E14E3354AC73 /* Closures.swift */; }; + B1D9BD6D5C71DE86A2AC49630C2BB68D /* Pods-MarkdownKit_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A3FE0F89027F65BA3054BF745E2A49 /* Pods-MarkdownKit_Tests-dummy.m */; }; BC953DE542D95586F45B3B101D3C66BA /* MarkdownQuote.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACBA231A0B76C7AA986B5E45FD8893E1 /* MarkdownQuote.swift */; }; - C12E0930E021F1894B60BC6AFA8F2409 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62ADCB0AE00199FEACED77BDE119552F /* AdapterProtocols.swift */; }; - C3D80B3F6A4885DE920BC3444B9E3E01 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7005B0ADF96C275382B45359AE1A0FDC /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C81FFEEC76399EF3C7C1EE349C810E76 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2DE7320F652DCF39EB6A1476F0C761B /* NimbleXCTestHandler.swift */; }; - C877A01D36DE27B7C6B90152281BD018 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 299FCFFDCC88E9151397B8D50F79E36E /* World+DSL.swift */; }; - CD0A671D2A8DD31D50449BB358C56134 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41006CFFEC28B4197817C14B5D087239 /* Expression.swift */; }; - CF30E258A8AE712460C9C41A76466A42 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 702D610886AA829A76EF79A25B88E1AC /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D41F628A81153A978EB209E4FE925700 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = BE582507271FE02BA93C412C422D4ED8 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DCA54337E8687685A293CC24A97F936C /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65AB889028901EAF2823A40F21B4F5B /* Contain.swift */; }; - DE27763ABAC07DED7E935D49FE58978A /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBACEB31F87FDB2A294186DEFA980590 /* ExampleGroup.swift */; }; - DF0216DBDE0084F6C87FE9275A4E9F0D /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFF847D8C75EDD1CE2BA21A60D08E00 /* Nimble-dummy.m */; }; - DF4809D0E0148352D400000569D6A978 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A71B6C19E4D0C8A4D14A6EF1AB8728EB /* Foundation.framework */; }; - E29099A6B962C9434A973FEBEFB557A5 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EB79662DFF8CAC9A93BB403631D5490 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E4FCEE9A497A651DDF9C60F56A8B137E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A71B6C19E4D0C8A4D14A6EF1AB8728EB /* Foundation.framework */; }; - E6E5B7DD32715D333B50E363865FA782 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FECB7BA22714038546A0E8DD513114B /* Configuration.swift */; }; - E6F6FF9554A6C7EABD6B92B691751DAD /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F9CA5402AFA68BE2A5F70E09014318D /* BeLessThanOrEqual.swift */; }; - E89F85130E9F3345E0E1D9CD58B752B8 /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D4DEBAA391B6F9E5C9294F4DE25CA96 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E909D0D33037F3C642BBB8D47FC642B3 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EA1C305082DBF75710A818FFBD2714D2 /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E9217540A477984B61D07BBD3FB9F226 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 875A7681674D572B7002D69BBCD1BA09 /* Example.swift */; }; - E9A500611CF699885DE8A6BAB4E6B392 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9111139F990D8CA088F1437E67693E8D /* BeEmpty.swift */; }; - EB202071B87FC9DD2A697741431EF855 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AEDCA8E96FF6E3C7A604705D4D34B06 /* World.swift */; }; - EB272EB789FAE2840543641C288D2983 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 414114D9FD8600FA208D6152470C2DF0 /* DSL.swift */; }; + E4FCEE9A497A651DDF9C60F56A8B137E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2A6FF208CEC4C2861F1E9D42D651453 /* Foundation.framework */; }; F0BFD1E9800C9F8CE636A355FC1B0184 /* MarkdownList.swift in Sources */ = {isa = PBXBuildFile; fileRef = C419BCBEC055B43DD13A6F898A1876CA /* MarkdownList.swift */; }; - F6A8627B49BE2D56AEC2AF9A3E10D4FD /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A83F0092F039C6F7AFC5D9D1E55E3BE /* NSString+QCKSelectorName.m */; }; F77D4444D2AA23AC1775A1812F01CAFB /* MarkdownLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCB0BE26F9AE1BB7317319D2819AAE9F /* MarkdownLink.swift */; }; - F85A9207A8601CE7F835CEC56790616F /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51465DCF8ECE9AE4DD3DECD5656849CE /* Expectation.swift */; }; - FB09A16A6662F2689D4AA89538DBF1C1 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B6394838D23DE3BD6C1113A355553 /* BeAKindOf.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 8E65DAFDAD6352B7F9EFD5136AD9D847 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 03A04B4304F99D3C64F5EBBECBFD883F; - remoteInfo = Quick; - }; - 8EDAB3F16312915E64C13172FA8F902E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = FF61C7C740C1B196A3B33F37B77DBC68; - remoteInfo = Nimble; - }; EC17F801CE5A89B73B2F591C30967770 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -149,168 +49,65 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 008A5F43350B1984916B33BCAFD01149 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 013C606785D3E50DE58DBF26309C0DBF /* MarkdownCode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownCode.swift; sourceTree = ""; }; - 01E904D9C3B8ED32F61307B82AF1DE02 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; - 020CA039BDF669709230645FC23F7C77 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; - 03925EC2DD9F80DCD0C2E5301B52DC9C /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - 03AD566EC508F35AEBD09410C38B0113 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; + 01B8F0125B4EDB2BB41F9535CBAB0DA5 /* MarkdownKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MarkdownKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 06774B99B020CA42CBEE66785276E0F8 /* Pods-MarkdownKit_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MarkdownKit_Example-resources.sh"; sourceTree = ""; }; 0C06B5503A13886343DCEE886F53B36C /* Pods-MarkdownKit_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MarkdownKit_Tests-frameworks.sh"; sourceTree = ""; }; - 0CFF847D8C75EDD1CE2BA21A60D08E00 /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; 0D573611A6212351868CEC3321446F07 /* MarkdownBold.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownBold.swift; sourceTree = ""; }; - 0F2748FABD1661E3A75F8B07E115CF96 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - 12FD8C45CF9591F32C21657E578112C9 /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; 13696D8269EB53460CD79C1FA73D767E /* Pods-MarkdownKit_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MarkdownKit_Example.release.xcconfig"; sourceTree = ""; }; 136C2AA2E723997CE719C7A749255AE9 /* Pods-MarkdownKit_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-MarkdownKit_Tests.modulemap"; sourceTree = ""; }; - 14E1DC94DD47A6F91084F3EAA92AF552 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Quick.modulemap; sourceTree = ""; }; - 18D110A87EF135293B27C04BD720A8E8 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1A5CF93BBC528DB1160168F2CC4D63D0 /* Pods-MarkdownKit_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MarkdownKit_Tests.release.xcconfig"; sourceTree = ""; }; - 1C369DE47B8FBDDF56994EF084D14F12 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; - 203A5C5D36EAB5C74A7CA2C7F3E57854 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; - 22BF65FFEC8A084057E63EDF139D2BD1 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; - 23D3F787478B2953573939A0E8511140 /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; + 25665BB044C296061314E481B86821FF /* Pods_MarkdownKit_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MarkdownKit_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 26B158CA36F99E9ECDDF9140A5827FE3 /* Pods-MarkdownKit_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MarkdownKit_Example-frameworks.sh"; sourceTree = ""; }; - 299FCFFDCC88E9151397B8D50F79E36E /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; - 2A414C35360A25163AA8D7D17AB68C77 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; - 2AEDCA8E96FF6E3C7A604705D4D34B06 /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; - 2D4DEBAA391B6F9E5C9294F4DE25CA96 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/Quick/Configuration/QuickConfiguration.h; sourceTree = ""; }; - 30B16739831A57E59BFE39E8BF50128C /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; 31FC62C0AB079C480AA839FC8E2F7E6D /* MarkdownElement.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownElement.swift; sourceTree = ""; }; 32948F796358A162964D55D59398E301 /* MarkdownAutomaticLink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownAutomaticLink.swift; sourceTree = ""; }; 3457FE244178722260912762E29F73E9 /* MarkdownLevelElement.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownLevelElement.swift; sourceTree = ""; }; 34E2F037F0C1C5BADBC6C938B07DD8CA /* Pods-MarkdownKit_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MarkdownKit_Tests-acknowledgements.plist"; sourceTree = ""; }; - 354B5315AD30C24D1172D4F1524B068D /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; - 3967E353C11023B5BFA469EDF600CA68 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nimble.modulemap; sourceTree = ""; }; - 3973F89F7C13EAD4855CFC68BCC8511E /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/Quick/QuickSpec.h; sourceTree = ""; }; 3C77E5442C877E81254DDC5F4A576440 /* Pods-MarkdownKit_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-MarkdownKit_Example.modulemap"; sourceTree = ""; }; - 3DF1A6A09F31564DDB5769E5567558BD /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; 3F2BEBA2DD1BFD6ECBE9C4DF4AA6FE6E /* MarkdownKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MarkdownKit.xcconfig; sourceTree = ""; }; - 3F8F619D92D71FED493B6ABC720242E0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 3F9CA5402AFA68BE2A5F70E09014318D /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; - 404BAE43472CFD17261DA1D2BAC26223 /* MarkdownKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MarkdownKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 41006CFFEC28B4197817C14B5D087239 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - 414114D9FD8600FA208D6152470C2DF0 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; 442C1FF52E42976A7444120D1B0E5F95 /* UIFont+Traits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIFont+Traits.swift"; sourceTree = ""; }; - 44E91E6A6263B0D61B049B648F6271E7 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 45D3661DD977D936FA0FEA7FDE08D852 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - 4EBC862576E582DF711B25DC28CFCDBE /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; 4F4FFF07CD085EEF0BA0ABB1AB9F27D6 /* Pods-MarkdownKit_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MarkdownKit_Example-acknowledgements.plist"; sourceTree = ""; }; 51291E17F60CA68814ABEA8DE8A8E8DB /* MarkdownCommonElement.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownCommonElement.swift; sourceTree = ""; }; - 51465DCF8ECE9AE4DD3DECD5656849CE /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; 543CA0D84BEAFA923CAD0FF2B597A3AF /* MarkdownKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MarkdownKit-dummy.m"; sourceTree = ""; }; 56F737E148609AC4A590BEF33F264E69 /* MarkdownKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = MarkdownKit.modulemap; sourceTree = ""; }; - 5A923E7F6DB833CE73652CA17FA570C9 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5C8C873CB5F43A0FA130C9B9FF74B6B0 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; - 5CE93FA4667205AEE386C8648ABDC57E /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; 61D335C057448C0203BD3AD6EF0FB924 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 627E4E84747227302312F1E22D114789 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; - 62ADCB0AE00199FEACED77BDE119552F /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; - 62C9EA115D167F4132613835B0AA5585 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; 65520C4799529A9A899B5CB86F96C16E /* MarkdownLinkElement.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownLinkElement.swift; sourceTree = ""; }; - 66A3FFEFA87108503C1154659236D755 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; - 66CBE690E9186E686698A8A8A71C5355 /* String+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FileName.swift"; path = "Sources/Quick/String+FileName.swift"; sourceTree = ""; }; - 69E738963C2EB4542069F1E6586836C9 /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/Quick/DSL/QCKDSL.m; sourceTree = ""; }; - 6A5B6394838D23DE3BD6C1113A355553 /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; - 6CF762208E123E2F61AEE13E62DCA565 /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; - 7005B0ADF96C275382B45359AE1A0FDC /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/Quick/DSL/QCKDSL.h; sourceTree = ""; }; - 702D610886AA829A76EF79A25B88E1AC /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; - 75752235C59671F25A86BF987E354AFE /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; - 76F48CC70C3333B7508A86AE1CA80060 /* Pods_MarkdownKit_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MarkdownKit_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7C179D98275D6B72775BA3D06CAD0F61 /* Pods-MarkdownKit_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MarkdownKit_Example-umbrella.h"; sourceTree = ""; }; - 7EB79662DFF8CAC9A93BB403631D5490 /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/Quick/Quick.h; sourceTree = ""; }; - 7FECB7BA22714038546A0E8DD513114B /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; - 806E16176381587E8521C3EB80E220DA /* Pods_MarkdownKit_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MarkdownKit_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 85564484FA6ABBE76C0B73863EFFFCDE /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; - 875A7681674D572B7002D69BBCD1BA09 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; - 8A562213D0385708961C195D0CF8C45E /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; - 8A83F0092F039C6F7AFC5D9D1E55E3BE /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Sources/Quick/NSString+QCKSelectorName.m"; sourceTree = ""; }; - 8D924A98F0691CB7100035FC7C2958D3 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; - 8ED85DFD58F13E73CC6080D18D5C1E10 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; - 8EE5DB72110FF4FE8D16C90A617EFD92 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; - 8F50105FCC804A51F7EDCB8C8F84AF9A /* ExceptionCapture.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExceptionCapture.swift; path = Sources/Nimble/Utils/ExceptionCapture.swift; sourceTree = ""; }; 8FE2C274ECA79A509C2CECA2A57F6D90 /* MarkdownItalic.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownItalic.swift; sourceTree = ""; }; - 9111139F990D8CA088F1437E67693E8D /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; + 8FF509353EF79A57E5F8B6EE9068BB92 /* Pods_MarkdownKit_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MarkdownKit_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 913A41B49CC19256D40AA9C04618297B /* Pods-MarkdownKit_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MarkdownKit_Tests.debug.xcconfig"; sourceTree = ""; }; - 91B7C1953D52C630B7CEA85DC7D30371 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; - 91EB10846A1D5A8B9A3BA28C5457DF56 /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/Quick/NSString+QCKSelectorName.h"; sourceTree = ""; }; - 9341EE27FCA41AD8B88193EC0C839859 /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 971FBD63640E42D5B13E199D80A38E44 /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Wrappers/MatcherFunc.swift; sourceTree = ""; }; - 9759ABA2939945FD31FB478AE32D9E15 /* CurrentTestCaseTracker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CurrentTestCaseTracker.m; path = Sources/Nimble/objc/CurrentTestCaseTracker.m; sourceTree = ""; }; 9A4214C744916AED40CD11A1E81C957D /* Pods-MarkdownKit_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MarkdownKit_Tests-acknowledgements.markdown"; sourceTree = ""; }; 9CCCF7B4D2C15E917DA7C9418A294A54 /* MarkdownEscaping.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownEscaping.swift; sourceTree = ""; }; - 9DC1174FD42CD6684C5DE79AC08B57C5 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/Nimble/objc/DSL.h; sourceTree = ""; }; - A1177F46842A02EE1A9A945434E453FF /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/Quick/QuickSpec.m; sourceTree = ""; }; - A129290F935182407C183EB04C0C2C90 /* ObjCExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObjCExpectation.swift; path = Sources/Nimble/ObjCExpectation.swift; sourceTree = ""; }; - A2ADFE64923497AA07A24FC59913A587 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/Nimble/objc/NMBExceptionCapture.h; sourceTree = ""; }; + A2A6FF208CEC4C2861F1E9D42D651453 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; A49365A49D9E34E21EFAE23159045383 /* MarkdownKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MarkdownKit-umbrella.h"; sourceTree = ""; }; - A4AE9C10DA93BFE440F17876611232E1 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; - A4D34ECCB9113A10197320CD540DDA73 /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; - A71B6C19E4D0C8A4D14A6EF1AB8728EB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - A7E85327D01378E8AB714335E9E7CE7F /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - AAC325F77555916EE55065F37EA4C575 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; ACBA231A0B76C7AA986B5E45FD8893E1 /* MarkdownQuote.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownQuote.swift; sourceTree = ""; }; - AE8CFDED63B2CD5BC846E14E3354AC73 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; B08396BEB5CE8733EF93C630FEF494D2 /* MarkdownParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownParser.swift; sourceTree = ""; }; - B65AB889028901EAF2823A40F21B4F5B /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; - B6988794BE3149D9E7253F7D057A0A92 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; - B973D705E425F6A8CF2906380774F7EC /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/Quick/World.h; sourceTree = ""; }; - BBACEB31F87FDB2A294186DEFA980590 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; BCB0BE26F9AE1BB7317319D2819AAE9F /* MarkdownLink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownLink.swift; sourceTree = ""; }; - BE582507271FE02BA93C412C422D4ED8 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; - BEDAA753452F6B96DE24D2CF7D396628 /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; - C34071C41916A37E669FEEBA855F42C2 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; C3A7AA4CAC9BB6380210ECAD478F3BF8 /* Pods-MarkdownKit_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MarkdownKit_Example.debug.xcconfig"; sourceTree = ""; }; C419BCBEC055B43DD13A6F898A1876CA /* MarkdownList.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownList.swift; sourceTree = ""; }; - C5DDC9824ED21BCC218F3C3E3E907AED /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; C71C393F0B8E6B708E0B0BD2692EC5D2 /* Pods-MarkdownKit_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MarkdownKit_Example-dummy.m"; sourceTree = ""; }; CB68ECF1745720211469510E0B6BEED7 /* MarkdownCodeEscaping.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownCodeEscaping.swift; sourceTree = ""; }; - CB75D143FA2C1D4F42F8F03369239006 /* ObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObjCMatcher.swift; path = Sources/Nimble/Wrappers/ObjCMatcher.swift; sourceTree = ""; }; - D29528E2ADACEB31F5B2380DA50612C1 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; - D365431FBA3C40A9570E9266B44005D7 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/Nimble/objc/NMBExceptionCapture.m; sourceTree = ""; }; - D772AF03D0B82E63647D129AEA9CCF1B /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; D8A592150FD43F6A6299C6070692B982 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D90C7EF12BFF57324CAB1F99C968C0BF /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; D9DC8FA99A6183F1A2A06BB539AAC40E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DC07B6CC006238186A56EEC6E8D3CD88 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; - DC1FD51C6442C713FB319C1C9A49AB19 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; DD28D7CFA3CDE1E22B33C3AC2938E5F0 /* String+UTF16.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "String+UTF16.swift"; sourceTree = ""; }; - DE3C8A356B44398ECE2F664B378A6443 /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/Quick/DSL/World+DSL.h"; sourceTree = ""; }; DEF2217217452DEDC927C5CB2F824F60 /* MarkdownUnescaping.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownUnescaping.swift; sourceTree = ""; }; DF0C1B8E886413331E13F9640C67371E /* Pods-MarkdownKit_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MarkdownKit_Example-acknowledgements.markdown"; sourceTree = ""; }; E0E13CA4BF5DA2C5BE06EA262C09693B /* MarkdownHeader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownHeader.swift; sourceTree = ""; }; - E124D19BC9A195791938A5946C03B103 /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; - E2353FC0C41320250E7132DE6734F885 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/Quick/Configuration/QuickConfiguration.m; sourceTree = ""; }; - E2DE7320F652DCF39EB6A1476F0C761B /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; E5A8A16BF25D3EED1BDEDE1C60BFED28 /* Pods-MarkdownKit_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MarkdownKit_Tests-umbrella.h"; sourceTree = ""; }; E69C97244CFFE9D2635F1C99FB46A4E2 /* MarkdownStyle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MarkdownStyle.swift; sourceTree = ""; }; - EA1C305082DBF75710A818FFBD2714D2 /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - EFB2D871B9C6D5C6EE2172BB9AFD2627 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - F17FBDF6FF6B666A3D102EDD81DFE416 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; - F4D3267C4CAF13D33F026B9104C33238 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; + E86668F20F252C440D1015B816BE59C5 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; F8A10CF001472943932ADBD3B6130A51 /* Pods-MarkdownKit_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MarkdownKit_Tests-resources.sh"; sourceTree = ""; }; F9A3FE0F89027F65BA3054BF745E2A49 /* Pods-MarkdownKit_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MarkdownKit_Tests-dummy.m"; sourceTree = ""; }; - FA89F15C3F95B9AD5D5608775C0DF7BD /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/Nimble/objc/DSL.m; sourceTree = ""; }; FD1DC9D81152642D68C4715D10E72A7A /* MarkdownKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MarkdownKit-prefix.pch"; sourceTree = ""; }; - FD40F9BF5FC1D41562F9B9E7D66A6C6C /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 6A909A2431AC80E2EB522F105E7485D4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DF4809D0E0148352D400000569D6A978 /* Foundation.framework in Frameworks */, - 7658C18CDE0FA60EB96064B6E47DF9BC /* XCTest.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7DD30556BA818217034B965B68ED67C5 /* Frameworks */ = { + 0AD75E41719B39A5CB44F8BAE0EDD6F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9CDB5A556619932BEED6F6D01639E816 /* Foundation.framework in Frameworks */, + 93BA6B646239D6AA222D2806C19C24E1 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -331,14 +128,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FEF785D316E836E93C09637D3A3082CA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CBCE8837CE75AE1B7484A63CE387ED /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -352,24 +141,6 @@ path = Escaping; sourceTree = ""; }; - 08EF1010060E25B5CD5BA885B03DB0EA /* iOS */ = { - isa = PBXGroup; - children = ( - A71B6C19E4D0C8A4D14A6EF1AB8728EB /* Foundation.framework */, - 008A5F43350B1984916B33BCAFD01149 /* UIKit.framework */, - 44E91E6A6263B0D61B049B648F6271E7 /* XCTest.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 122DA2E5084A4393C29BE363C764795C /* Frameworks */ = { - isa = PBXGroup; - children = ( - 08EF1010060E25B5CD5BA885B03DB0EA /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; 1BFFBF71D6B11214946DDFF0E696976C /* Support Files */ = { isa = PBXGroup; children = ( @@ -384,18 +155,6 @@ path = "Example/Pods/Target Support Files/MarkdownKit"; sourceTree = ""; }; - 202D17E0EAD5DA2C94BC1419072F8C63 /* Products */ = { - isa = PBXGroup; - children = ( - 404BAE43472CFD17261DA1D2BAC26223 /* MarkdownKit.framework */, - 5A923E7F6DB833CE73652CA17FA570C9 /* Nimble.framework */, - 76F48CC70C3333B7508A86AE1CA80060 /* Pods_MarkdownKit_Example.framework */, - 806E16176381587E8521C3EB80E220DA /* Pods_MarkdownKit_Tests.framework */, - FD40F9BF5FC1D41562F9B9E7D66A6C6C /* Quick.framework */, - ); - name = Products; - sourceTree = ""; - }; 22C5C88200DFED379B8EC802BE845E1E /* MarkdownKit */ = { isa = PBXGroup; children = ( @@ -433,63 +192,6 @@ path = "Target Support Files/Pods-MarkdownKit_Tests"; sourceTree = ""; }; - 3DA718426B574401281FFA751D33D9BF /* Nimble */ = { - isa = PBXGroup; - children = ( - 62ADCB0AE00199FEACED77BDE119552F /* AdapterProtocols.swift */, - 03AD566EC508F35AEBD09410C38B0113 /* AllPass.swift */, - F4D3267C4CAF13D33F026B9104C33238 /* AssertionDispatcher.swift */, - BEDAA753452F6B96DE24D2CF7D396628 /* AssertionRecorder.swift */, - 8D924A98F0691CB7100035FC7C2958D3 /* Async.swift */, - 9341EE27FCA41AD8B88193EC0C839859 /* AsyncMatcherWrapper.swift */, - 6A5B6394838D23DE3BD6C1113A355553 /* BeAKindOf.swift */, - C34071C41916A37E669FEEBA855F42C2 /* BeAnInstanceOf.swift */, - 5CE93FA4667205AEE386C8648ABDC57E /* BeCloseTo.swift */, - 9111139F990D8CA088F1437E67693E8D /* BeEmpty.swift */, - 203A5C5D36EAB5C74A7CA2C7F3E57854 /* BeginWith.swift */, - B6988794BE3149D9E7253F7D057A0A92 /* BeGreaterThan.swift */, - AAC325F77555916EE55065F37EA4C575 /* BeGreaterThanOrEqualTo.swift */, - 020CA039BDF669709230645FC23F7C77 /* BeIdenticalTo.swift */, - 62C9EA115D167F4132613835B0AA5585 /* BeLessThan.swift */, - 3F9CA5402AFA68BE2A5F70E09014318D /* BeLessThanOrEqual.swift */, - D29528E2ADACEB31F5B2380DA50612C1 /* BeLogical.swift */, - 0F2748FABD1661E3A75F8B07E115CF96 /* BeNil.swift */, - EFB2D871B9C6D5C6EE2172BB9AFD2627 /* BeVoid.swift */, - B65AB889028901EAF2823A40F21B4F5B /* Contain.swift */, - 9759ABA2939945FD31FB478AE32D9E15 /* CurrentTestCaseTracker.m */, - 9DC1174FD42CD6684C5DE79AC08B57C5 /* DSL.h */, - FA89F15C3F95B9AD5D5608775C0DF7BD /* DSL.m */, - 627E4E84747227302312F1E22D114789 /* DSL.swift */, - 75752235C59671F25A86BF987E354AFE /* DSL+Wait.swift */, - 8EE5DB72110FF4FE8D16C90A617EFD92 /* EndWith.swift */, - 45D3661DD977D936FA0FEA7FDE08D852 /* Equal.swift */, - 8F50105FCC804A51F7EDCB8C8F84AF9A /* ExceptionCapture.swift */, - 51465DCF8ECE9AE4DD3DECD5656849CE /* Expectation.swift */, - 41006CFFEC28B4197817C14B5D087239 /* Expression.swift */, - 8A562213D0385708961C195D0CF8C45E /* FailureMessage.swift */, - 354B5315AD30C24D1172D4F1524B068D /* Functional.swift */, - 3DF1A6A09F31564DDB5769E5567558BD /* HaveCount.swift */, - A4AE9C10DA93BFE440F17876611232E1 /* Match.swift */, - 971FBD63640E42D5B13E199D80A38E44 /* MatcherFunc.swift */, - DC1FD51C6442C713FB319C1C9A49AB19 /* MatcherProtocols.swift */, - BE582507271FE02BA93C412C422D4ED8 /* Nimble.h */, - A7E85327D01378E8AB714335E9E7CE7F /* NimbleEnvironment.swift */, - E2DE7320F652DCF39EB6A1476F0C761B /* NimbleXCTestHandler.swift */, - A2ADFE64923497AA07A24FC59913A587 /* NMBExceptionCapture.h */, - D365431FBA3C40A9570E9266B44005D7 /* NMBExceptionCapture.m */, - A129290F935182407C183EB04C0C2C90 /* ObjCExpectation.swift */, - CB75D143FA2C1D4F42F8F03369239006 /* ObjCMatcher.swift */, - 22BF65FFEC8A084057E63EDF139D2BD1 /* PostNotification.swift */, - 2A414C35360A25163AA8D7D17AB68C77 /* RaisesException.swift */, - 5C8C873CB5F43A0FA130C9B9FF74B6B0 /* SatisfyAnyOf.swift */, - 85564484FA6ABBE76C0B73863EFFFCDE /* SourceLocation.swift */, - 6CF762208E123E2F61AEE13E62DCA565 /* Stringers.swift */, - 01E904D9C3B8ED32F61307B82AF1DE02 /* ThrowError.swift */, - E180574B2455184195E3B30A5E5E6FF4 /* Support Files */, - ); - path = Nimble; - sourceTree = ""; - }; 3E8BA49C97B209226C3D10FB39F3E3D9 /* Protocols */ = { isa = PBXGroup; children = ( @@ -502,6 +204,14 @@ path = Protocols; sourceTree = ""; }; + 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { + isa = PBXGroup; + children = ( + F302CD3B306AF1ED96B9AF31FCDBC26C /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; 4BE9437601FE4228E2B2EC877A8379AF /* MarkdownKit */ = { isa = PBXGroup; children = ( @@ -551,25 +261,20 @@ children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, A358C39405024D371B35578689E1E21D /* Development Pods */, - 122DA2E5084A4393C29BE363C764795C /* Frameworks */, - B2F3226D3D4A34C6FDC47A7E7567F3E3 /* Pods */, - 202D17E0EAD5DA2C94BC1419072F8C63 /* Products */, + 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, + 86ACFC1268D9D8ED7EC753496187A2DD /* Products */, F43EDDCB1371B5D52BE35ABBF8B6272C /* Targets Support Files */, ); sourceTree = ""; }; - 86298915AE0282D73F103DF4124EEF42 /* Support Files */ = { + 86ACFC1268D9D8ED7EC753496187A2DD /* Products */ = { isa = PBXGroup; children = ( - 18D110A87EF135293B27C04BD720A8E8 /* Info.plist */, - 14E1DC94DD47A6F91084F3EAA92AF552 /* Quick.modulemap */, - D90C7EF12BFF57324CAB1F99C968C0BF /* Quick.xcconfig */, - 8ED85DFD58F13E73CC6080D18D5C1E10 /* Quick-dummy.m */, - 12FD8C45CF9591F32C21657E578112C9 /* Quick-prefix.pch */, - 702D610886AA829A76EF79A25B88E1AC /* Quick-umbrella.h */, + 01B8F0125B4EDB2BB41F9535CBAB0DA5 /* MarkdownKit.framework */, + 8FF509353EF79A57E5F8B6EE9068BB92 /* Pods_MarkdownKit_Example.framework */, + 25665BB044C296061314E481B86821FF /* Pods_MarkdownKit_Tests.framework */, ); - name = "Support Files"; - path = "../Target Support Files/Quick"; + name = Products; sourceTree = ""; }; A358C39405024D371B35578689E1E21D /* Development Pods */ = { @@ -589,65 +294,13 @@ path = Extensions; sourceTree = ""; }; - B2F3226D3D4A34C6FDC47A7E7567F3E3 /* Pods */ = { - isa = PBXGroup; - children = ( - 3DA718426B574401281FFA751D33D9BF /* Nimble */, - CADC3EC948F24F3C262060ABA5F66D9A /* Quick */, - ); - name = Pods; - sourceTree = ""; - }; - CADC3EC948F24F3C262060ABA5F66D9A /* Quick */ = { - isa = PBXGroup; - children = ( - DC07B6CC006238186A56EEC6E8D3CD88 /* Callsite.swift */, - AE8CFDED63B2CD5BC846E14E3354AC73 /* Closures.swift */, - 7FECB7BA22714038546A0E8DD513114B /* Configuration.swift */, - 414114D9FD8600FA208D6152470C2DF0 /* DSL.swift */, - 91B7C1953D52C630B7CEA85DC7D30371 /* ErrorUtility.swift */, - 875A7681674D572B7002D69BBCD1BA09 /* Example.swift */, - BBACEB31F87FDB2A294186DEFA980590 /* ExampleGroup.swift */, - 66A3FFEFA87108503C1154659236D755 /* ExampleHooks.swift */, - A4D34ECCB9113A10197320CD540DDA73 /* ExampleMetadata.swift */, - F17FBDF6FF6B666A3D102EDD81DFE416 /* Filter.swift */, - 1C369DE47B8FBDDF56994EF084D14F12 /* HooksPhase.swift */, - 30B16739831A57E59BFE39E8BF50128C /* NSBundle+CurrentTestBundle.swift */, - 91EB10846A1D5A8B9A3BA28C5457DF56 /* NSString+QCKSelectorName.h */, - 8A83F0092F039C6F7AFC5D9D1E55E3BE /* NSString+QCKSelectorName.m */, - 7005B0ADF96C275382B45359AE1A0FDC /* QCKDSL.h */, - 69E738963C2EB4542069F1E6586836C9 /* QCKDSL.m */, - 7EB79662DFF8CAC9A93BB403631D5490 /* Quick.h */, - 2D4DEBAA391B6F9E5C9294F4DE25CA96 /* QuickConfiguration.h */, - E2353FC0C41320250E7132DE6734F885 /* QuickConfiguration.m */, - 03925EC2DD9F80DCD0C2E5301B52DC9C /* QuickSelectedTestSuiteBuilder.swift */, - 3973F89F7C13EAD4855CFC68BCC8511E /* QuickSpec.h */, - A1177F46842A02EE1A9A945434E453FF /* QuickSpec.m */, - 4EBC862576E582DF711B25DC28CFCDBE /* QuickTestSuite.swift */, - 66CBE690E9186E686698A8A8A71C5355 /* String+FileName.swift */, - D772AF03D0B82E63647D129AEA9CCF1B /* SuiteHooks.swift */, - B973D705E425F6A8CF2906380774F7EC /* World.h */, - 2AEDCA8E96FF6E3C7A604705D4D34B06 /* World.swift */, - DE3C8A356B44398ECE2F664B378A6443 /* World+DSL.h */, - 299FCFFDCC88E9151397B8D50F79E36E /* World+DSL.swift */, - C5DDC9824ED21BCC218F3C3E3E907AED /* XCTestSuite+QuickTestSuiteBuilder.m */, - 86298915AE0282D73F103DF4124EEF42 /* Support Files */, - ); - path = Quick; - sourceTree = ""; - }; - E180574B2455184195E3B30A5E5E6FF4 /* Support Files */ = { + F302CD3B306AF1ED96B9AF31FCDBC26C /* iOS */ = { isa = PBXGroup; children = ( - 3F8F619D92D71FED493B6ABC720242E0 /* Info.plist */, - 3967E353C11023B5BFA469EDF600CA68 /* Nimble.modulemap */, - E124D19BC9A195791938A5946C03B103 /* Nimble.xcconfig */, - 0CFF847D8C75EDD1CE2BA21A60D08E00 /* Nimble-dummy.m */, - 23D3F787478B2953573939A0E8511140 /* Nimble-prefix.pch */, - EA1C305082DBF75710A818FFBD2714D2 /* Nimble-umbrella.h */, + A2A6FF208CEC4C2861F1E9D42D651453 /* Foundation.framework */, + E86668F20F252C440D1015B816BE59C5 /* UIKit.framework */, ); - name = "Support Files"; - path = "../Target Support Files/Nimble"; + name = iOS; sourceTree = ""; }; F43EDDCB1371B5D52BE35ABBF8B6272C /* Targets Support Files */ = { @@ -678,94 +331,49 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 1DB9CC8E898DC15213E6DA520BCCAA46 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 2B33F0623C4CA06C5E36E21AF02B2B75 /* Pods-MarkdownKit_Tests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 56651AC7E3F7B2CDCFEEB8325476F8A3 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 23626BC4DDA1A2E90A155728F57802FF /* DSL.h in Headers */, - E909D0D33037F3C642BBB8D47FC642B3 /* Nimble-umbrella.h in Headers */, - D41F628A81153A978EB209E4FE925700 /* Nimble.h in Headers */, - 86FB708FCFE6121A82BB09E5ADD84554 /* NMBExceptionCapture.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 98CD90B3E36D5436A357945E150B184B /* Headers */ = { + 2B6A62EC99475B07A4970FE73D059021 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 000397554E8DD982879A21355DC11061 /* NSString+QCKSelectorName.h in Headers */, - C3D80B3F6A4885DE920BC3444B9E3E01 /* QCKDSL.h in Headers */, - CF30E258A8AE712460C9C41A76466A42 /* Quick-umbrella.h in Headers */, - E29099A6B962C9434A973FEBEFB557A5 /* Quick.h in Headers */, - E89F85130E9F3345E0E1D9CD58B752B8 /* QuickConfiguration.h in Headers */, - 95472F609CB227300488E4A6E8646197 /* QuickSpec.h in Headers */, - 4237E9A8685C6851A4AE13428A18FAC2 /* World+DSL.h in Headers */, - 812457A6A78239B3ED9E49223C180BEF /* World.h in Headers */, + 15F5B1693B7E250021D9F73313C588CD /* Pods-MarkdownKit_Tests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 03A04B4304F99D3C64F5EBBECBFD883F /* Quick */ = { + 3C19A590FD8D7E706D3715FB47281667 /* MarkdownKit */ = { isa = PBXNativeTarget; - buildConfigurationList = F07946AFED2DF412447979108F1FE80E /* Build configuration list for PBXNativeTarget "Quick" */; + buildConfigurationList = 5EFDA8C0215476E69F13435809D03379 /* Build configuration list for PBXNativeTarget "MarkdownKit" */; buildPhases = ( - 6572EB77C91058F6EE0C3DEE054B0CFD /* Sources */, - 6A909A2431AC80E2EB522F105E7485D4 /* Frameworks */, - 98CD90B3E36D5436A357945E150B184B /* Headers */, + 1E4DB2027458A648F2BBC326CF441C90 /* Sources */, + D7CEB3386844FCBF63FF4A6A041D515C /* Frameworks */, + 140218E94904BB09C2FBC7B3DBD464FD /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = Quick; - productName = Quick; - productReference = FD40F9BF5FC1D41562F9B9E7D66A6C6C /* Quick.framework */; + name = MarkdownKit; + productName = MarkdownKit; + productReference = 01B8F0125B4EDB2BB41F9535CBAB0DA5 /* MarkdownKit.framework */; productType = "com.apple.product-type.framework"; }; - 08D812C7BB2035918593D75CD6DAEF53 /* Pods-MarkdownKit_Tests */ = { + 60E13D84B72634F588C17B326A7AF45D /* Pods-MarkdownKit_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = F0B68F99B7FED554C685BC6E6A04E28B /* Build configuration list for PBXNativeTarget "Pods-MarkdownKit_Tests" */; + buildConfigurationList = 817C33F631C2145C59F2703F61806279 /* Build configuration list for PBXNativeTarget "Pods-MarkdownKit_Tests" */; buildPhases = ( - C14A309054D56B2DFE2E5123E1030F0B /* Sources */, - 7DD30556BA818217034B965B68ED67C5 /* Frameworks */, - 1DB9CC8E898DC15213E6DA520BCCAA46 /* Headers */, + AFCCAB960A769D8BA5FE13F9069779F2 /* Sources */, + 0AD75E41719B39A5CB44F8BAE0EDD6F8 /* Frameworks */, + 2B6A62EC99475B07A4970FE73D059021 /* Headers */, ); buildRules = ( ); dependencies = ( - 0A8334709D24E06024862F5B65A52340 /* PBXTargetDependency */, - 207E6705C5CE88B28C5889B7E833C19B /* PBXTargetDependency */, ); name = "Pods-MarkdownKit_Tests"; productName = "Pods-MarkdownKit_Tests"; - productReference = 806E16176381587E8521C3EB80E220DA /* Pods_MarkdownKit_Tests.framework */; - productType = "com.apple.product-type.framework"; - }; - 3C19A590FD8D7E706D3715FB47281667 /* MarkdownKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5EFDA8C0215476E69F13435809D03379 /* Build configuration list for PBXNativeTarget "MarkdownKit" */; - buildPhases = ( - 1E4DB2027458A648F2BBC326CF441C90 /* Sources */, - D7CEB3386844FCBF63FF4A6A041D515C /* Frameworks */, - 140218E94904BB09C2FBC7B3DBD464FD /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MarkdownKit; - productName = MarkdownKit; - productReference = 404BAE43472CFD17261DA1D2BAC26223 /* MarkdownKit.framework */; + productReference = 25665BB044C296061314E481B86821FF /* Pods_MarkdownKit_Tests.framework */; productType = "com.apple.product-type.framework"; }; 8F6CDC32B73BC5AC077C50A33113DF39 /* Pods-MarkdownKit_Example */ = { @@ -783,24 +391,7 @@ ); name = "Pods-MarkdownKit_Example"; productName = "Pods-MarkdownKit_Example"; - productReference = 76F48CC70C3333B7508A86AE1CA80060 /* Pods_MarkdownKit_Example.framework */; - productType = "com.apple.product-type.framework"; - }; - FF61C7C740C1B196A3B33F37B77DBC68 /* Nimble */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5FE57A1C8E467D246D7D1BCB203A09DC /* Build configuration list for PBXNativeTarget "Nimble" */; - buildPhases = ( - 2823BDA58F2F74DEAB39C2F345AA07A1 /* Sources */, - FEF785D316E836E93C09637D3A3082CA /* Frameworks */, - 56651AC7E3F7B2CDCFEEB8325476F8A3 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Nimble; - productName = Nimble; - productReference = 5A923E7F6DB833CE73652CA17FA570C9 /* Nimble.framework */; + productReference = 8FF509353EF79A57E5F8B6EE9068BB92 /* Pods_MarkdownKit_Example.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -820,15 +411,13 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 202D17E0EAD5DA2C94BC1419072F8C63 /* Products */; + productRefGroup = 86ACFC1268D9D8ED7EC753496187A2DD /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 3C19A590FD8D7E706D3715FB47281667 /* MarkdownKit */, - FF61C7C740C1B196A3B33F37B77DBC68 /* Nimble */, 8F6CDC32B73BC5AC077C50A33113DF39 /* Pods-MarkdownKit_Example */, - 08D812C7BB2035918593D75CD6DAEF53 /* Pods-MarkdownKit_Tests */, - 03A04B4304F99D3C64F5EBBECBFD883F /* Quick */, + 60E13D84B72634F588C17B326A7AF45D /* Pods-MarkdownKit_Tests */, ); }; /* End PBXProject section */ @@ -861,96 +450,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2823BDA58F2F74DEAB39C2F345AA07A1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C12E0930E021F1894B60BC6AFA8F2409 /* AdapterProtocols.swift in Sources */, - 13CC849FA70CADF802470B6A90DCDF79 /* AllPass.swift in Sources */, - 7CC86ABC7F4135EE12A755B023F134CE /* AssertionDispatcher.swift in Sources */, - 4E5A721963877AA3A6AA3D80DAA4E5E9 /* AssertionRecorder.swift in Sources */, - 7DC9B169B5FCC3EE99F6D36EC530FE1E /* Async.swift in Sources */, - B9D2E426B5CA226D60A78A71FA289D4C /* AsyncMatcherWrapper.swift in Sources */, - FB09A16A6662F2689D4AA89538DBF1C1 /* BeAKindOf.swift in Sources */, - A2CABD326609AD67377700A148785E09 /* BeAnInstanceOf.swift in Sources */, - 7734BABBECE0071CF5D4430515B938BF /* BeCloseTo.swift in Sources */, - E9A500611CF699885DE8A6BAB4E6B392 /* BeEmpty.swift in Sources */, - 30AACAA8D51DC8C429577D9B67BB016C /* BeginWith.swift in Sources */, - 7EBD6B630F4536CB673DC0B455CCB16D /* BeGreaterThan.swift in Sources */, - 8040A37FF5BBDF1964CAB8C0068ED315 /* BeGreaterThanOrEqualTo.swift in Sources */, - 7202A0B871C57B7857341D88C2883A3A /* BeIdenticalTo.swift in Sources */, - 7F40FC3F4DE4EA4702F41F01A12A7353 /* BeLessThan.swift in Sources */, - E6F6FF9554A6C7EABD6B92B691751DAD /* BeLessThanOrEqual.swift in Sources */, - 9B5DE58927557CE87968C051D2A1C47E /* BeLogical.swift in Sources */, - 4AF6C26A30D865059C24DC5317786B76 /* BeNil.swift in Sources */, - 31629295E87A24C98238C66D41983C49 /* BeVoid.swift in Sources */, - DCA54337E8687685A293CC24A97F936C /* Contain.swift in Sources */, - 9F08F74CB8740CF0EFF26746EEB0C930 /* CurrentTestCaseTracker.m in Sources */, - 6ED0409031540D9B2AD7B061B608B0C9 /* DSL+Wait.swift in Sources */, - 68527A7545342CBB4F923DC8543F7B20 /* DSL.m in Sources */, - 135B6326D35C977854AA0C12B3F6CB7D /* DSL.swift in Sources */, - 5104AE2989305145BF446E633B567924 /* EndWith.swift in Sources */, - 5EF5C00C6AECE1FCFFF118577817F5CE /* Equal.swift in Sources */, - 81E6453ECE511335537301CD3B1C1B82 /* ExceptionCapture.swift in Sources */, - F85A9207A8601CE7F835CEC56790616F /* Expectation.swift in Sources */, - CD0A671D2A8DD31D50449BB358C56134 /* Expression.swift in Sources */, - 38F5CE4B4C59A81734A93E32D35B696E /* FailureMessage.swift in Sources */, - 63BBD83995BA60FA7D2E6AD4138C0D71 /* Functional.swift in Sources */, - A55EC200F57C00E9A78D8A9DA4545338 /* HaveCount.swift in Sources */, - 03A9FD93E86C0CD07A37D7BF34A02F09 /* Match.swift in Sources */, - 64539BE196D1741570018FFF86F14133 /* MatcherFunc.swift in Sources */, - 91ED5B067FCA3CBD48E3114672941051 /* MatcherProtocols.swift in Sources */, - DF0216DBDE0084F6C87FE9275A4E9F0D /* Nimble-dummy.m in Sources */, - 775646739B95E828ECE349F6A39534F4 /* NimbleEnvironment.swift in Sources */, - C81FFEEC76399EF3C7C1EE349C810E76 /* NimbleXCTestHandler.swift in Sources */, - 1ED8C77E9422C66BBF56E6C10D5826F0 /* NMBExceptionCapture.m in Sources */, - 486B74C8EFEB68AD25CE128F3051E432 /* ObjCExpectation.swift in Sources */, - 800A161E9B82DEEDA41B7F1A746B24C4 /* ObjCMatcher.swift in Sources */, - 3D1BB98DEA422D8F173613EC715488B9 /* PostNotification.swift in Sources */, - 112614F21939902B59102E6E876ADCBC /* RaisesException.swift in Sources */, - 415F29FE4E9D970954C46CD3CF4AE345 /* SatisfyAnyOf.swift in Sources */, - 96ED0CCA721955637A88FE0C9737EC56 /* SourceLocation.swift in Sources */, - A374A2729E32469085C5025EC7115EB8 /* Stringers.swift in Sources */, - B43EDBC7DA15A429006C67B63D45ACFD /* ThrowError.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6572EB77C91058F6EE0C3DEE054B0CFD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9B061EE7608AAD6023B036880CC36DB9 /* Callsite.swift in Sources */, - BAEC0726AA887D902158DEEE03A63765 /* Closures.swift in Sources */, - E6E5B7DD32715D333B50E363865FA782 /* Configuration.swift in Sources */, - EB272EB789FAE2840543641C288D2983 /* DSL.swift in Sources */, - 1A418316D623787C91A3825053F60D34 /* ErrorUtility.swift in Sources */, - E9217540A477984B61D07BBD3FB9F226 /* Example.swift in Sources */, - DE27763ABAC07DED7E935D49FE58978A /* ExampleGroup.swift in Sources */, - 93D62732828730AD72E9A09ACD5C4431 /* ExampleHooks.swift in Sources */, - 321AEC88D395C63C656443025E9670D9 /* ExampleMetadata.swift in Sources */, - 2E869425BB68E1A06D3648837858DFDF /* Filter.swift in Sources */, - ABC5915D74FC7D22213C4257E766FE4C /* HooksPhase.swift in Sources */, - 5605012FE4AAA6DCD3A6ABB36D755CF2 /* NSBundle+CurrentTestBundle.swift in Sources */, - F6A8627B49BE2D56AEC2AF9A3E10D4FD /* NSString+QCKSelectorName.m in Sources */, - B74DA6D783EF08DF48E189BBB91FE550 /* QCKDSL.m in Sources */, - A60893DCE3A5E03BBF4CA4207785335C /* Quick-dummy.m in Sources */, - A99D3D3FB1103446764CE5902AE169FC /* QuickConfiguration.m in Sources */, - 2C9E00FF8823329FD8DE49F4BBA57E3E /* QuickSelectedTestSuiteBuilder.swift in Sources */, - 1E7702EDE11983C8EAF4FC094D187CA3 /* QuickSpec.m in Sources */, - 6940948ECB0B0A245A6D4FDDAC5FBFBF /* QuickTestSuite.swift in Sources */, - 19FE62EDCBEDA0E55E43CED17D706D1F /* String+FileName.swift in Sources */, - 90623B74595B365D7E1ABE97836D66AA /* SuiteHooks.swift in Sources */, - C877A01D36DE27B7C6B90152281BD018 /* World+DSL.swift in Sources */, - EB202071B87FC9DD2A697741431EF855 /* World.swift in Sources */, - 24333B1DE195DDCB713796A988C058C6 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C14A309054D56B2DFE2E5123E1030F0B /* Sources */ = { + AFCCAB960A769D8BA5FE13F9069779F2 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5703EDDCBB627BECC13B95D21D3943A8 /* Pods-MarkdownKit_Tests-dummy.m in Sources */, + B1D9BD6D5C71DE86A2AC49630C2BB68D /* Pods-MarkdownKit_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -965,18 +469,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 0A8334709D24E06024862F5B65A52340 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Nimble; - target = FF61C7C740C1B196A3B33F37B77DBC68 /* Nimble */; - targetProxy = 8EDAB3F16312915E64C13172FA8F902E /* PBXContainerItemProxy */; - }; - 207E6705C5CE88B28C5889B7E833C19B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Quick; - target = 03A04B4304F99D3C64F5EBBECBFD883F /* Quick */; - targetProxy = 8E65DAFDAD6352B7F9EFD5136AD9D847 /* PBXContainerItemProxy */; - }; C32C1CDDE4B9D9AABA99A02F3DBE7786 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = MarkdownKit; @@ -986,82 +478,13 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0ACDCBCB0B6796575F46FFA2F5410C6B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 134504E76C1D5E67827625E55658995E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1A5CF93BBC528DB1160168F2CC4D63D0 /* Pods-MarkdownKit_Tests.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-MarkdownKit_Tests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_MarkdownKit_Tests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 184D31B49A35CE6223261C4A8EC2319A /* Debug */ = { + 132A715F33E1EBE87DD120458C026E91 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C3A7AA4CAC9BB6380210ECAD478F3BF8 /* Pods-MarkdownKit_Example.debug.xcconfig */; + baseConfigurationReference = 3F2BEBA2DD1BFD6ECBE9C4DF4AA6FE6E /* MarkdownKit.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; @@ -1070,32 +493,31 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-MarkdownKit_Example/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/MarkdownKit/MarkdownKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/MarkdownKit/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.modulemap"; + MODULEMAP_FILE = "Target Support Files/MarkdownKit/MarkdownKit.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_MarkdownKit_Example; + PRODUCT_NAME = MarkdownKit; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 2BBB019B984C69D3D2EEAB6D7BB9ECFE /* Release */ = { + 4F4C9DF2F65F0F65BE40F6E129BBD92A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D90C7EF12BFF57324CAB1F99C968C0BF /* Quick.xcconfig */; + baseConfigurationReference = 1A5CF93BBC528DB1160168F2CC4D63D0 /* Pods-MarkdownKit_Tests.release.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -1104,42 +526,13 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - 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"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Quick; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 8B0E282651C77B7074B1A12E6244F165 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 913A41B49CC19256D40AA9C04618297B /* Pods-MarkdownKit_Tests.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-MarkdownKit_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -1147,50 +540,21 @@ PRODUCT_NAME = Pods_MarkdownKit_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9911953BB890E98DFA059F720CD829CE /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D90C7EF12BFF57324CAB1F99C968C0BF /* Quick.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - 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"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Quick; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - CB5F1C723F8C6D4079D65C6F0203FCF2 /* Debug */ = { + 7F6A420FCADE6EA2D103D8D218CC30EF /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 3F2BEBA2DD1BFD6ECBE9C4DF4AA6FE6E /* MarkdownKit.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1203,47 +567,58 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/MarkdownKit/MarkdownKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = MarkdownKit; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - D136996600E31F365F763213EFA35139 /* Release */ = { + 8DED8AD26D381A6ACFF202E5217EC498 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E124D19BC9A195791938A5946C03B103 /* Nimble.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - 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"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Nimble; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; }; name = Release; }; - D3E3D092A3FF7311A98E44BBA36FFD12 /* Debug */ = { + 9E1E4E48AF2EAB23169E611BF694090A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -1261,6 +636,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -1280,102 +656,117 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.3; ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - D98385FE06DF4CC30E0D480CA17D6FCE /* Release */ = { + A57C0B3C5FA84996AE09F1BDF1F4CB9B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 13696D8269EB53460CD79C1FA73D767E /* Pods-MarkdownKit_Example.release.xcconfig */; + baseConfigurationReference = 913A41B49CC19256D40AA9C04618297B /* Pods-MarkdownKit_Tests.debug.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-MarkdownKit_Example/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-MarkdownKit_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MODULEMAP_FILE = "Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_MarkdownKit_Example; + PRODUCT_NAME = Pods_MarkdownKit_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - F14745E2F2D90E33DB7401B9ED7C5F16 /* Debug */ = { + D14C2474A5CE4F191EF32B40E032568F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E124D19BC9A195791938A5946C03B103 /* Nimble.xcconfig */; + baseConfigurationReference = 13696D8269EB53460CD79C1FA73D767E /* Pods-MarkdownKit_Example.release.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-MarkdownKit_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Nimble; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_MarkdownKit_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - FB74080682626E5BAAAA22503597CF42 /* Release */ = { + F6CD783FC6DDA952B870045BCE0EBCC4 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3F2BEBA2DD1BFD6ECBE9C4DF4AA6FE6E /* MarkdownKit.xcconfig */; + baseConfigurationReference = C3A7AA4CAC9BB6380210ECAD478F3BF8 /* Pods-MarkdownKit_Example.debug.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/MarkdownKit/MarkdownKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/MarkdownKit/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-MarkdownKit_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/MarkdownKit/MarkdownKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = MarkdownKit; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_MarkdownKit_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; /* End XCBuildConfiguration section */ @@ -1383,8 +774,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - D3E3D092A3FF7311A98E44BBA36FFD12 /* Debug */, - 0ACDCBCB0B6796575F46FFA2F5410C6B /* Release */, + 9E1E4E48AF2EAB23169E611BF694090A /* Debug */, + 8DED8AD26D381A6ACFF202E5217EC498 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1392,8 +783,8 @@ 58F32B3B3CED1C32E904DAF053146241 /* Build configuration list for PBXNativeTarget "Pods-MarkdownKit_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 184D31B49A35CE6223261C4A8EC2319A /* Debug */, - D98385FE06DF4CC30E0D480CA17D6FCE /* Release */, + F6CD783FC6DDA952B870045BCE0EBCC4 /* Debug */, + D14C2474A5CE4F191EF32B40E032568F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1401,35 +792,17 @@ 5EFDA8C0215476E69F13435809D03379 /* Build configuration list for PBXNativeTarget "MarkdownKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - CB5F1C723F8C6D4079D65C6F0203FCF2 /* Debug */, - FB74080682626E5BAAAA22503597CF42 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5FE57A1C8E467D246D7D1BCB203A09DC /* Build configuration list for PBXNativeTarget "Nimble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F14745E2F2D90E33DB7401B9ED7C5F16 /* Debug */, - D136996600E31F365F763213EFA35139 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F07946AFED2DF412447979108F1FE80E /* Build configuration list for PBXNativeTarget "Quick" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9911953BB890E98DFA059F720CD829CE /* Debug */, - 2BBB019B984C69D3D2EEAB6D7BB9ECFE /* Release */, + 132A715F33E1EBE87DD120458C026E91 /* Debug */, + 7F6A420FCADE6EA2D103D8D218CC30EF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - F0B68F99B7FED554C685BC6E6A04E28B /* Build configuration list for PBXNativeTarget "Pods-MarkdownKit_Tests" */ = { + 817C33F631C2145C59F2703F61806279 /* Build configuration list for PBXNativeTarget "Pods-MarkdownKit_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8B0E282651C77B7074B1A12E6244F165 /* Debug */, - 134504E76C1D5E67827625E55658995E /* Release */, + A57C0B3C5FA84996AE09F1BDF1F4CB9B /* Debug */, + 4F4C9DF2F65F0F65BE40F6E129BBD92A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Quick/LICENSE b/Example/Pods/Quick/LICENSE deleted file mode 100644 index e900165..0000000 --- a/Example/Pods/Quick/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -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 deleted file mode 100644 index bced23c..0000000 --- a/Example/Pods/Quick/README.md +++ /dev/null @@ -1,61 +0,0 @@ -![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png) - -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). - -## 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! - -def testing_pods - pod 'Quick' - pod 'Nimble' -end - -target 'MyTests' do - testing_pods -end - -target 'MyUITests' do - testing_pods -end -``` - -## License - -Apache 2.0 license. See the `LICENSE` file for details. diff --git a/Example/Pods/Quick/Sources/Quick/Callsite.swift b/Example/Pods/Quick/Sources/Quick/Callsite.swift deleted file mode 100644 index 53496cd..0000000 --- a/Example/Pods/Quick/Sources/Quick/Callsite.swift +++ /dev/null @@ -1,30 +0,0 @@ -import Foundation - -/** - An object encapsulating the file and line number at which - a particular example is defined. -*/ -final public class Callsite: NSObject { - /** - 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 - } -} - -/** - 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. -*/ -public 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 deleted file mode 100644 index 7b8c2db..0000000 --- a/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift +++ /dev/null @@ -1,161 +0,0 @@ -import Foundation - -/** - A closure that temporarily exposes a Configuration object within - the scope of the closure. -*/ -public typealias QuickConfigurer = (configuration: Configuration) -> () - -/** - 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: 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: 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 _runtime(_ObjC) - @objc(beforeEachWithMetadata:) - public func beforeEach(closure: BeforeExampleWithMetadataClosure) { - exampleHooks.appendBefore(closure) - } -#else - public func beforeEach(closure: 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: 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 _runtime(_ObjC) - @objc(afterEachWithMetadata:) - public func afterEach(closure: AfterExampleWithMetadataClosure) { - exampleHooks.appendAfter(closure) - } -#else - public func afterEach(closure: 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: 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: 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: AfterSuiteClosure) { - suiteHooks.appendAfter(closure) - } -} diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.h b/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.h deleted file mode 100644 index 5646199..0000000 --- a/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.h +++ /dev/null @@ -1,30 +0,0 @@ -#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/Quick/Configuration/QuickConfiguration.m b/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.m deleted file mode 100644 index 937b818..0000000 --- a/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.m +++ /dev/null @@ -1,83 +0,0 @@ -#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/Quick/DSL/DSL.swift b/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift deleted file mode 100644 index bc0e0b4..0000000 --- a/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift +++ /dev/null @@ -1,227 +0,0 @@ -/** - 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: 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: 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: () -> ()) { - World.sharedWorld.sharedExamples(name, closure: { (NSDictionary) 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: 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: () -> ()) { - World.sharedWorld.describe(description, flags: flags, closure: closure) -} - -/** - Defines an example group. Equivalent to `describe`. -*/ -public func context(description: String, flags: FilterFlags = [:], closure: () -> ()) { - 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: 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: 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: 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: 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: () -> ()) { - 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: SharedExampleContext) { - World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, 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: () -> ()) { - 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: () -> ()) { - 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: () -> ()) { - 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: () -> ()) { - World.sharedWorld.xit(description, flags: flags, file: file, line: line, closure: closure) -} - -/** - 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: () -> ()) { - 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: () -> ()) { - 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: () -> ()) { - World.sharedWorld.fit(description, flags: flags, file: file, line: line, closure: closure) -} diff --git a/Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.h b/Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.h deleted file mode 100644 index c5f3152..0000000 --- a/Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.h +++ /dev/null @@ -1,234 +0,0 @@ -#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/Quick/DSL/QCKDSL.m b/Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.m deleted file mode 100644 index 10e8a3d..0000000 --- a/Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.m +++ /dev/null @@ -1,79 +0,0 @@ -#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/Quick/DSL/World+DSL.h b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.h deleted file mode 100644 index a3b8524..0000000 --- a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.h +++ /dev/null @@ -1,20 +0,0 @@ -#import - -@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/Quick/DSL/World+DSL.swift b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift deleted file mode 100644 index 3b9a9be..0000000 --- a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift +++ /dev/null @@ -1,169 +0,0 @@ -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: BeforeSuiteClosure) { - suiteHooks.appendBefore(closure) - } - - internal func afterSuite(closure: AfterSuiteClosure) { - suiteHooks.appendAfter(closure) - } - - internal func sharedExamples(name: String, closure: SharedExampleClosure) { - registerSharedExample(name, closure: closure) - } - - internal func describe(description: String, flags: FilterFlags, closure: () -> ()) { - 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: () -> ()) { - 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: () -> ()) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.describe(description, flags: focusedFlags, closure: closure) - } - - internal func xdescribe(description: String, flags: FilterFlags, closure: () -> ()) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.describe(description, flags: pendingFlags, closure: closure) - } - - internal func beforeEach(closure: 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 _runtime(_ObjC) - @objc(beforeEachWithMetadata:) - internal func beforeEach(closure closure: BeforeExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendBefore(closure) - } -#else - internal func beforeEach(closure closure: BeforeExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendBefore(closure) - } -#endif - - internal func afterEach(closure: 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 _runtime(_ObjC) - @objc(afterEachWithMetadata:) - internal func afterEach(closure closure: AfterExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendAfter(closure) - } -#else - internal func afterEach(closure closure: AfterExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendAfter(closure) - } -#endif - - internal func it(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { - 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: () -> ()) { - 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: () -> ()) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.it(description, flags: pendingFlags, file: file, line: line, closure: closure) - } - - internal func itBehavesLike(name: String, sharedExampleContext: 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 - } - } - -#if _runtime(_ObjC) - @objc(itWithDescription:flags:file:line:closure:) - private func objc_it(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { - 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: () -> ()) { - 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: () -> ()) { - xit(description, flags: flags, file: file, line: line, closure: closure) - } - - @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:flags:file:line:) - private func objc_itBehavesLike(name: String, sharedExampleContext: SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { - itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) - } -#endif - - internal func pending(description: String, closure: () -> ()) { - 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 deleted file mode 100644 index 3c4035a..0000000 --- a/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift +++ /dev/null @@ -1,10 +0,0 @@ -import Foundation - -@noreturn internal func raiseError(message: String) { -#if _runtime(_ObjC) - NSException(name: NSInternalInconsistencyException, 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 deleted file mode 100644 index 8929525..0000000 --- a/Example/Pods/Quick/Sources/Quick/Example.swift +++ /dev/null @@ -1,113 +0,0 @@ -import Foundation - -private var numberOfExamplesRun = 0 - -/** - Examples, defined with the `it` function, use assertions to - demonstrate how code should behave. These are like "tests" in XCTest. -*/ -final public class Example: NSObject { - /** - 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: () -> () - private let flags: FilterFlags - - internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: () -> ()) { - 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 { - switch group!.name { - case .Some(let groupName): return "\(groupName), \(description)" - case .None: return 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 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: exampleMetadata) - } - group!.phase = .BeforesFinished - - closure() - - group!.phase = .AftersExecuting - for after in group!.afters { - after(exampleMetadata: exampleMetadata) - } - group!.phase = .AftersFinished - world.exampleHooks.executeAfters(exampleMetadata) - - numberOfExamplesRun += 1 - - if !world.isRunningAdditionalSuites && numberOfExamplesRun >= world.includedExampleCount { - 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 - } -} - -/** - Returns a boolean indicating whether two Example objects are equal. - If two examples are defined at the exact same callsite, they must be equal. -*/ -public 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 deleted file mode 100644 index cf2b983..0000000 --- a/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift +++ /dev/null @@ -1,105 +0,0 @@ -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] { - var examples = childExamples - for group in childGroups { - examples.appendContentsOf(group.examples) - } - return examples - } - - internal var name: String? { - if let parent = parent { - switch(parent.name) { - case .Some(let name): return "\(name), \(description)" - case .None: return description - } - } else { - return isInternalRootExampleGroup ? nil : description - } - } - - internal var filterFlags: FilterFlags { - var aggregateFlags = flags - walkUp() { (group: ExampleGroup) -> () in - for (key, value) in group.flags { - aggregateFlags[key] = value - } - } - return aggregateFlags - } - - internal var befores: [BeforeExampleWithMetadataClosure] { - var closures = Array(hooks.befores.reverse()) - walkUp() { (group: ExampleGroup) -> () in - closures.appendContentsOf(Array(group.hooks.befores.reverse())) - } - return Array(closures.reverse()) - } - - internal var afters: [AfterExampleWithMetadataClosure] { - var closures = hooks.afters - walkUp() { (group: ExampleGroup) -> () in - closures.appendContentsOf(group.hooks.afters) - } - return closures - } - - internal func walkDownExamples(callback: (example: Example) -> ()) { - for example in childExamples { - callback(example: 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) -> ()) { - var group = self - while let parent = group.parent { - callback(group: parent) - group = parent - } - } -} diff --git a/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift b/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift deleted file mode 100644 index e7510f7..0000000 --- a/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift +++ /dev/null @@ -1,24 +0,0 @@ -import Foundation - -/** - 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: NSObject { - /** - 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 deleted file mode 100644 index d452efe..0000000 --- a/Example/Pods/Quick/Sources/Quick/Filter.swift +++ /dev/null @@ -1,31 +0,0 @@ -import Foundation - -/** - 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: NSObject { - /** - 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 deleted file mode 100644 index 3252bbf..0000000 --- a/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift +++ /dev/null @@ -1,35 +0,0 @@ -// MARK: Example Hooks - -/** - A closure executed before an example is run. -*/ -public typealias BeforeExampleClosure = () -> () - -/** - 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) -> () - -/** - 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 = () -> () - -/** - 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 deleted file mode 100644 index 1d5fa91..0000000 --- a/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift +++ /dev/null @@ -1,42 +0,0 @@ -/** - 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: BeforeExampleWithMetadataClosure) { - befores.append(closure) - } - - internal func appendBefore(closure: BeforeExampleClosure) { - befores.append { (exampleMetadata: ExampleMetadata) in closure() } - } - - internal func appendAfter(closure: AfterExampleWithMetadataClosure) { - afters.append(closure) - } - - internal func appendAfter(closure: AfterExampleClosure) { - afters.append { (exampleMetadata: ExampleMetadata) in closure() } - } - - internal func executeBefores(exampleMetadata: ExampleMetadata) { - phase = .BeforesExecuting - for before in befores { - before(exampleMetadata: exampleMetadata) - } - - phase = .BeforesFinished - } - - internal func executeAfters(exampleMetadata: ExampleMetadata) { - phase = .AftersExecuting - for after in afters { - after(exampleMetadata: exampleMetadata) - } - - phase = .AftersFinished - } -} diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift b/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift deleted file mode 100644 index 8dc3784..0000000 --- a/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift +++ /dev/null @@ -1,11 +0,0 @@ -/** - A description of the execution cycle of the current example with - respect to the hooks of that example. - */ -internal enum HooksPhase: Int { - case NothingExecuted = 0 - 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 deleted file mode 100644 index 59bdcf2..0000000 --- a/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift +++ /dev/null @@ -1,32 +0,0 @@ -/** - 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: BeforeSuiteClosure) { - befores.append(closure) - } - - internal func appendAfter(closure: 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 deleted file mode 100644 index e8709e0..0000000 --- a/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift +++ /dev/null @@ -1,20 +0,0 @@ -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) - -import Foundation - -extension NSBundle { - - /** - Locates the first bundle with a '.xctest' file extension. - */ - internal static var currentTestBundle: NSBundle? { - return allBundles().lazy - .filter { - $0.bundlePath.hasSuffix(".xctest") - } - .first - } - -} - -#endif diff --git a/Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.h b/Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.h deleted file mode 100644 index 2da524e..0000000 --- a/Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.h +++ /dev/null @@ -1,17 +0,0 @@ -#import - -/** - QuickSpec converts example names into test methods. - Those test methods need valid selector names, which means no whitespace, - control characters, etc. This category gives NSString objects an easy way - to replace those illegal characters with underscores. - */ -@interface NSString (QCKSelectorName) - -/** - Returns a string with underscores in place of all characters that cannot - be included in a selector (SEL) name. - */ -@property (nonatomic, readonly) NSString *qck_selectorName; - -@end diff --git a/Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.m b/Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.m deleted file mode 100644 index d374be6..0000000 --- a/Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.m +++ /dev/null @@ -1,37 +0,0 @@ -#import "NSString+QCKSelectorName.h" - -@implementation NSString (QCKSelectorName) - -- (NSString *)qck_selectorName { - static NSMutableCharacterSet *invalidCharacters = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - invalidCharacters = [NSMutableCharacterSet new]; - - NSCharacterSet *whitespaceCharacterSet = [NSCharacterSet whitespaceCharacterSet]; - NSCharacterSet *newlineCharacterSet = [NSCharacterSet newlineCharacterSet]; - NSCharacterSet *illegalCharacterSet = [NSCharacterSet illegalCharacterSet]; - NSCharacterSet *controlCharacterSet = [NSCharacterSet controlCharacterSet]; - NSCharacterSet *punctuationCharacterSet = [NSCharacterSet punctuationCharacterSet]; - NSCharacterSet *nonBaseCharacterSet = [NSCharacterSet nonBaseCharacterSet]; - NSCharacterSet *symbolCharacterSet = [NSCharacterSet symbolCharacterSet]; - - [invalidCharacters formUnionWithCharacterSet:whitespaceCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:newlineCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:illegalCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:controlCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:punctuationCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:nonBaseCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:symbolCharacterSet]; - }); - - NSArray *validComponents = [self componentsSeparatedByCharactersInSet:invalidCharacters]; - - NSString *result = [validComponents componentsJoinedByString:@"_"]; - - return ([result length] == 0 - ? @"_" - : result); -} - -@end diff --git a/Example/Pods/Quick/Sources/Quick/Quick.h b/Example/Pods/Quick/Sources/Quick/Quick.h deleted file mode 100644 index 87dad10..0000000 --- a/Example/Pods/Quick/Sources/Quick/Quick.h +++ /dev/null @@ -1,11 +0,0 @@ -#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/Quick/QuickSelectedTestSuiteBuilder.swift b/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift deleted file mode 100644 index 5163a4e..0000000 --- a/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift +++ /dev/null @@ -1,73 +0,0 @@ -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) - -/** - 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 `NSBundle.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.characters.split("/").first.map(String.init) - } - - guard let className = extractClassName(name) else { return nil } - guard let bundle = NSBundle.currentTestBundle else { return nil } - - if let testCaseClass = bundle.classNamed(className) { return testCaseClass } - - guard let moduleName = bundle.bundlePath.fileName else { return nil } - - return NSClassFromString("\(moduleName).\(className)") -} - -#endif diff --git a/Example/Pods/Quick/Sources/Quick/QuickSpec.h b/Example/Pods/Quick/Sources/Quick/QuickSpec.h deleted file mode 100644 index 105a97e..0000000 --- a/Example/Pods/Quick/Sources/Quick/QuickSpec.h +++ /dev/null @@ -1,50 +0,0 @@ -#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; - -@end diff --git a/Example/Pods/Quick/Sources/Quick/QuickSpec.m b/Example/Pods/Quick/Sources/Quick/QuickSpec.m deleted file mode 100644 index ea64934..0000000 --- a/Example/Pods/Quick/Sources/Quick/QuickSpec.m +++ /dev/null @@ -1,170 +0,0 @@ -#import "QuickSpec.h" -#import "QuickConfiguration.h" -#import "NSString+QCKSelectorName.h" -#import "World.h" -#import - -static QuickSpec *currentSpec = nil; - -const void * const QCKExampleKey = &QCKExampleKey; - -@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]; - NSInvocation *invocation = [self invocationForInstanceMethodWithSelector:selector - example:example]; - [invocations addObject:invocation]; - } - - return invocations; -} - -/** - XCTest sets the invocation for the current test case instance using this setter. - QuickSpec hooks into this event to give the test case a reference to the current example. - It will need this reference to correctly report its name to XCTest. - */ -- (void)setInvocation:(NSInvocation *)invocation { - self.example = objc_getAssociatedObject(invocation, QCKExampleKey); - [super setInvocation:invocation]; -} - -#pragma mark - Public Interface - -- (void)spec { } - -#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){ - currentSpec = self; - [example run]; - }); - NSCharacterSet *characterSet = [NSCharacterSet alphanumericCharacterSet]; - NSMutableString *sanitizedFileName = [NSMutableString string]; - for (NSUInteger i = 0; i < example.callsite.file.length; i++) { - unichar ch = [example.callsite.file characterAtIndex:i]; - if ([characterSet characterIsMember:ch]) { - [sanitizedFileName appendFormat:@"%c", ch]; - } - } - - const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(id), @encode(id), @encode(SEL)] UTF8String]; - - NSString *originalName = example.name.qck_selectorName; - 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; -} - -+ (NSInvocation *)invocationForInstanceMethodWithSelector:(SEL)selector - example:(Example *)example { - NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - invocation.selector = selector; - objc_setAssociatedObject(invocation, - QCKExampleKey, - example, - OBJC_ASSOCIATION_RETAIN_NONATOMIC); - return invocation; -} - -/** - 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/Quick/QuickTestSuite.swift b/Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift deleted file mode 100644 index 0cb5187..0000000 --- a/Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift +++ /dev/null @@ -1,52 +0,0 @@ -#if os(OSX) || 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`. - */ - public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { - guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } - - if builtTestSuites.contains(builder.testSuiteClassName) { - return nil - } else { - builtTestSuites.insert(builder.testSuiteClassName) - return builder.buildTestSuite() - } - } - -} - -#endif diff --git a/Example/Pods/Quick/Sources/Quick/String+FileName.swift b/Example/Pods/Quick/Sources/Quick/String+FileName.swift deleted file mode 100644 index 87cea7a..0000000 --- a/Example/Pods/Quick/Sources/Quick/String+FileName.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension String { - - /** - If the receiver represents a path, returns its file name with a file extension. - */ - var fileName: String? { - return NSURL(string: self)?.URLByDeletingPathExtension?.lastPathComponent - } - -} diff --git a/Example/Pods/Quick/Sources/Quick/World.h b/Example/Pods/Quick/Sources/Quick/World.h deleted file mode 100644 index e638cf6..0000000 --- a/Example/Pods/Quick/Sources/Quick/World.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -@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/Quick/World.swift b/Example/Pods/Quick/Sources/Quick/World.swift deleted file mode 100644 index b2b58c8..0000000 --- a/Example/Pods/Quick/Sources/Quick/World.swift +++ /dev/null @@ -1,230 +0,0 @@ -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 = () -> (NSDictionary) - -/** - 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 = (SharedExampleContext) -> () - -/** - 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: NSObject { - /** - 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. - */ - internal var isRunningAdditionalSuites = false - - private var specs: Dictionary = [:] - private var sharedExamples: [String: SharedExampleClosure] = [:] - private let configuration = Configuration() - private 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: 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 { - #if _runtime(_ObjC) - let name = NSStringFromClass(cls) - #else - let name = String(cls) - #endif - - 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: example) } - } - } - -#if _runtime(_ObjC) - @objc(examplesForSpecClass:) - private func objc_examples(specClass: AnyClass) -> [Example] { - return examples(specClass) - } -#endif - - // MARK: Internal - - internal func registerSharedExample(name: String, closure: 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: 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/Quick/XCTestSuite+QuickTestSuiteBuilder.m b/Example/Pods/Quick/Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m deleted file mode 100644 index e49939e..0000000 --- a/Example/Pods/Quick/Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m +++ /dev/null @@ -1,40 +0,0 @@ -#import -#import -#import - -@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/Target Support Files/MarkdownKit/Info.plist b/Example/Pods/Target Support Files/MarkdownKit/Info.plist index 10ad18b..21a30b4 100644 --- a/Example/Pods/Target Support Files/MarkdownKit/Info.plist +++ b/Example/Pods/Target Support Files/MarkdownKit/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.3 + 1.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/Nimble/Info.plist b/Example/Pods/Target Support Files/Nimble/Info.plist deleted file mode 100644 index 9ae03a0..0000000 --- a/Example/Pods/Target Support Files/Nimble/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 3.2.0 - 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 deleted file mode 100644 index e8177ab..0000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#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 deleted file mode 100644 index aa992a4..0000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h deleted file mode 100644 index 5e5b5c8..0000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -#import "Nimble.h" -#import "DSL.h" -#import "NMBExceptionCapture.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 deleted file mode 100644 index 6f77009..0000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index bc9e893..0000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -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 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = -weak-lswiftXCTest -weak_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} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example-acknowledgements.plist index 2dd4863..47e6358 100644 --- a/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example-acknowledgements.plist @@ -36,6 +36,8 @@ 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 MarkdownKit Type diff --git a/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.debug.xcconfig index 65a3313..09798e1 100644 --- a/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.debug.xcconfig @@ -1,3 +1,4 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES EMBEDDED_CONTENT_CONTAINS_SWIFT = YES FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 diff --git a/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.release.xcconfig index 65a3313..09798e1 100644 --- a/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-MarkdownKit_Example/Pods-MarkdownKit_Example.release.xcconfig @@ -1,3 +1,4 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES EMBEDDED_CONTENT_CONTAINS_SWIFT = YES FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 diff --git a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-acknowledgements.markdown index 5444c67..102af75 100644 --- a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-acknowledgements.markdown +++ b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-acknowledgements.markdown @@ -1,413 +1,3 @@ # Acknowledgements This application makes use of the following third party libraries: - -## 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 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. - - -## 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. - Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-acknowledgements.plist index c128fb4..7acbad1 100644 --- a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-acknowledgements.plist @@ -12,424 +12,6 @@ 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. - - Title - Nimble - 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. - - Title - Quick - Type - PSGroupSpecifier - FooterText Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-frameworks.sh index 3e8d2e4..893c16a 100755 --- a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests-frameworks.sh @@ -82,12 +82,3 @@ strip_invalid_archs() { fi } - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" - install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" - install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" -fi diff --git a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.debug.xcconfig index df644d2..0d68fd3 100644 --- a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.debug.xcconfig @@ -1,10 +1,8 @@ -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit" +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit" 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/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit/MarkdownKit.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit/MarkdownKit.framework/Headers" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.release.xcconfig index df644d2..0d68fd3 100644 --- a/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-MarkdownKit_Tests/Pods-MarkdownKit_Tests.release.xcconfig @@ -1,10 +1,8 @@ -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit" +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit" 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/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit/MarkdownKit.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MarkdownKit/MarkdownKit.framework/Headers" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Quick/Info.plist b/Example/Pods/Target Support Files/Quick/Info.plist deleted file mode 100644 index b8a90bb..0000000 --- a/Example/Pods/Target Support Files/Quick/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.9.3 - 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 deleted file mode 100644 index 54d7dc0..0000000 --- a/Example/Pods/Target Support Files/Quick/Quick-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#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 deleted file mode 100644 index aa992a4..0000000 --- a/Example/Pods/Target Support Files/Quick/Quick-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Example/Pods/Target Support Files/Quick/Quick-umbrella.h b/Example/Pods/Target Support Files/Quick/Quick-umbrella.h deleted file mode 100644 index c1aab14..0000000 --- a/Example/Pods/Target Support Files/Quick/Quick-umbrella.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#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 deleted file mode 100644 index 1d12b21..0000000 --- a/Example/Pods/Target Support Files/Quick/Quick.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index f25ce83..0000000 --- a/Example/Pods/Target Support Files/Quick/Quick.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -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 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -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} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift deleted file mode 100644 index 9c6a3bd..0000000 --- a/Example/Tests/Tests.swift +++ /dev/null @@ -1,50 +0,0 @@ -// https://github.com/Quick/Quick - -import Quick -import Nimble -import MarkdownKit - -class TableOfContentsSpec: QuickSpec { - override func spec() { - describe("these will fail") { - - it("can do maths") { - expect(1) == 2 - } - - it("can read") { - expect("number") == "string" - } - - it("will eventually fail") { - expect("time").toEventually( equal("done") ) - } - - context("these will pass") { - - it("can do maths") { - expect(23) == 23 - } - - it("can read") { - expect("🐮") == "🐮" - } - - it("will eventually pass") { - var time = "passing" - - dispatch_async(dispatch_get_main_queue()) { - time = "done" - } - - waitUntil { done in - NSThread.sleepForTimeInterval(0.5) - expect(time) == "done" - - done() - } - } - } - } - } -} diff --git a/MarkdownKit/Classes/.DS_Store b/MarkdownKit/Classes/.DS_Store index 85333ca..ceaf8cd 100644 Binary files a/MarkdownKit/Classes/.DS_Store and b/MarkdownKit/Classes/.DS_Store differ diff --git a/MarkdownKit/Classes/Elements/Escaping/MarkdownCodeEscaping.swift b/MarkdownKit/Classes/Elements/Escaping/MarkdownCodeEscaping.swift index 86eb88d..46976a4 100644 --- a/MarkdownKit/Classes/Elements/Escaping/MarkdownCodeEscaping.swift +++ b/MarkdownKit/Classes/Elements/Escaping/MarkdownCodeEscaping.swift @@ -8,28 +8,28 @@ import UIKit -public class MarkdownCodeEscaping: MarkdownElement { +open class MarkdownCodeEscaping: MarkdownElement { - private static let regex = "(? NSRegularExpression { - return try NSRegularExpression(pattern: regex, options: .DotMatchesLineSeparators) + open func regularExpression() throws -> NSRegularExpression { + return try NSRegularExpression(pattern: regex, options: .dotMatchesLineSeparators) } - public func match(match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { - let range = match.rangeAtIndex(2) + open func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { + let range = match.rangeAt(2) // escaping all characters - let matchString = attributedString.attributedSubstringFromRange(range).string + let matchString = attributedString.attributedSubstring(from: range).string let escapedString = Array(matchString.utf16) .map { (value: UInt16) -> String in String(format: "%04x", value) } .reduce("") { (string: String, character: String) -> String in return "\(string)\(character)" } - attributedString.replaceCharactersInRange(range, withString: escapedString) + attributedString.replaceCharacters(in: range, with: escapedString) } } diff --git a/MarkdownKit/Classes/Elements/Escaping/MarkdownEscaping.swift b/MarkdownKit/Classes/Elements/Escaping/MarkdownEscaping.swift index 042dd49..8bfe82f 100644 --- a/MarkdownKit/Classes/Elements/Escaping/MarkdownEscaping.swift +++ b/MarkdownKit/Classes/Elements/Escaping/MarkdownEscaping.swift @@ -8,25 +8,25 @@ import UIKit -public class MarkdownEscaping: MarkdownElement { +open class MarkdownEscaping: MarkdownElement { - private static let regex = "\\\\." + fileprivate static let regex = "\\\\." - public var regex: String { + open var regex: String { return MarkdownEscaping.regex } - public func regularExpression() throws -> NSRegularExpression { - return try NSRegularExpression(pattern: regex, options: .DotMatchesLineSeparators) + open func regularExpression() throws -> NSRegularExpression { + return try NSRegularExpression(pattern: regex, options: .dotMatchesLineSeparators) } - public func match(match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { + open func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { let range = NSRange(location: match.range.location + 1, length: 1) // escape one character - let matchString = attributedString.attributedSubstringFromRange(range).string + let matchString = attributedString.attributedSubstring(from: range).string if let escapedString = Array(matchString.utf16).first .flatMap({ (value: UInt16) -> String in String(format: "%04x", value) }) { - attributedString.replaceCharactersInRange(range, withString: escapedString) + attributedString.replaceCharacters(in: range, with: escapedString) } } diff --git a/MarkdownKit/Classes/Elements/Escaping/MarkdownUnescaping.swift b/MarkdownKit/Classes/Elements/Escaping/MarkdownUnescaping.swift index 3e01669..c91ad17 100644 --- a/MarkdownKit/Classes/Elements/Escaping/MarkdownUnescaping.swift +++ b/MarkdownKit/Classes/Elements/Escaping/MarkdownUnescaping.swift @@ -8,22 +8,22 @@ import UIKit -public class MarkdownUnescaping: MarkdownElement { +open class MarkdownUnescaping: MarkdownElement { - private static let regex = "\\\\[0-9a-z]{4}" + fileprivate static let regex = "\\\\[0-9a-z]{4}" - public var regex: String { + open var regex: String { return MarkdownUnescaping.regex } - public func regularExpression() throws -> NSRegularExpression { - return try NSRegularExpression(pattern: regex, options: .DotMatchesLineSeparators) + open func regularExpression() throws -> NSRegularExpression { + return try NSRegularExpression(pattern: regex, options: .dotMatchesLineSeparators) } - public func match(match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { + open func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { let range = NSRange(location: match.range.location + 1, length: 4) - let matchString = attributedString.attributedSubstringFromRange(range).string + let matchString = attributedString.attributedSubstring(from: range).string guard let unescapedString = matchString.unescapeUTF16() else { return } - attributedString.replaceCharactersInRange(match.range, withString: unescapedString) + attributedString.replaceCharacters(in: match.range, with: unescapedString) } } diff --git a/MarkdownKit/Classes/Elements/MarkdownAutomaticLink.swift b/MarkdownKit/Classes/Elements/MarkdownAutomaticLink.swift index 94c576d..6e67df9 100644 --- a/MarkdownKit/Classes/Elements/MarkdownAutomaticLink.swift +++ b/MarkdownKit/Classes/Elements/MarkdownAutomaticLink.swift @@ -8,16 +8,16 @@ import Foundation -public class MarkdownAutomaticLink: MarkdownLink { +open class MarkdownAutomaticLink: MarkdownLink { - public override func regularExpression() throws -> NSRegularExpression { - return try NSDataDetector(types: NSTextCheckingType.Link.rawValue) + open override func regularExpression() throws -> NSRegularExpression { + return try NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue) } - public override func match(match: NSTextCheckingResult, + open override func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { - let linkURLString = attributedString.attributedSubstringFromRange(match.range).string + let linkURLString = attributedString.attributedSubstring(from: match.range).string formatText(attributedString, range: match.range, link: linkURLString) addAttributes(attributedString, range: match.range, link: linkURLString) } -} \ No newline at end of file +} diff --git a/MarkdownKit/Classes/Elements/MarkdownBold.swift b/MarkdownKit/Classes/Elements/MarkdownBold.swift index d46d750..edde821 100644 --- a/MarkdownKit/Classes/Elements/MarkdownBold.swift +++ b/MarkdownKit/Classes/Elements/MarkdownBold.swift @@ -8,14 +8,14 @@ import UIKit -public class MarkdownBold: MarkdownCommonElement { +open class MarkdownBold: MarkdownCommonElement { - private static let regex = "(\\s+|^)(\\*\\*|__)(.+?)(\\2)" + fileprivate static let regex = "(\\s+|^)(\\*\\*|__)(.+?)(\\2)" - public var font: UIFont? - public var color: UIColor? + open var font: UIFont? + open var color: UIColor? - public var regex: String { + open var regex: String { return MarkdownBold.regex } diff --git a/MarkdownKit/Classes/Elements/MarkdownCode.swift b/MarkdownKit/Classes/Elements/MarkdownCode.swift index 303599f..7c15603 100644 --- a/MarkdownKit/Classes/Elements/MarkdownCode.swift +++ b/MarkdownKit/Classes/Elements/MarkdownCode.swift @@ -8,14 +8,14 @@ import UIKit -public class MarkdownCode: MarkdownCommonElement { +open class MarkdownCode: MarkdownCommonElement { - private static let regex = "(\\s+|^)(`+)(\\s*.*?[^`]\\s*)(\\1)(?!`)" + fileprivate static let regex = "(\\s+|^)(`+)(\\s*.*?[^`]\\s*)(\\1)(?!`)" - public var font: UIFont? - public var color: UIColor? + open var font: UIFont? + open var color: UIColor? - public var regex: String { + open var regex: String { return MarkdownCode.regex } @@ -24,10 +24,10 @@ public class MarkdownCode: MarkdownCommonElement { self.color = color } - public func addAttributes(attributedString: NSMutableAttributedString, range: NSRange) { - let matchString: String = attributedString.attributedSubstringFromRange(range).string + open func addAttributes(_ attributedString: NSMutableAttributedString, range: NSRange) { + let matchString: String = attributedString.attributedSubstring(from: range).string guard let unescapedString = matchString.unescapeUTF16() else { return } - attributedString.replaceCharactersInRange(range, withString: unescapedString) + attributedString.replaceCharacters(in: range, with: unescapedString) attributedString.addAttributes(attributes, range: NSRange(location: range.location, length: unescapedString.characters.count)) } } diff --git a/MarkdownKit/Classes/Elements/MarkdownHeader.swift b/MarkdownKit/Classes/Elements/MarkdownHeader.swift index 9e4149c..2824fd5 100644 --- a/MarkdownKit/Classes/Elements/MarkdownHeader.swift +++ b/MarkdownKit/Classes/Elements/MarkdownHeader.swift @@ -8,21 +8,21 @@ import UIKit -public class MarkdownHeader: MarkdownLevelElement { +open class MarkdownHeader: MarkdownLevelElement { - private static let regex = "^(#{1,%@})\\s*(.+)$" + fileprivate static let regex = "^(#{1,%@})\\s*(.+)$" - public var maxLevel: Int - public var font: UIFont? - public var color: UIColor? - public var fontIncrease: Int + open var maxLevel: Int + open var font: UIFont? + open var color: UIColor? + open var fontIncrease: Int - public var regex: String { + open var regex: String { let level: String = maxLevel > 0 ? "\(maxLevel)" : "" return String(format: MarkdownHeader.regex, level) } - public init(font: UIFont? = UIFont.boldSystemFontOfSize(UIFont.smallSystemFontSize()), + public init(font: UIFont? = UIFont.boldSystemFont(ofSize: UIFont.smallSystemFontSize), maxLevel: Int = 0, fontIncrease: Int = 2, color: UIColor? = nil) { self.maxLevel = maxLevel self.font = font @@ -30,15 +30,15 @@ public class MarkdownHeader: MarkdownLevelElement { self.fontIncrease = fontIncrease } - public func formatText(attributedString: NSMutableAttributedString, range: NSRange, level: Int) { - attributedString.deleteCharactersInRange(range) + open func formatText(_ attributedString: NSMutableAttributedString, range: NSRange, level: Int) { + attributedString.deleteCharacters(in: range) } - public func attributesForLevel(level: Int) -> [String: AnyObject] { + open func attributesForLevel(_ level: Int) -> [String: AnyObject] { var attributes = self.attributes if let font = font { let headerFontSize: CGFloat = font.pointSize + (CGFloat(level) * CGFloat(fontIncrease)) - attributes[NSFontAttributeName] = font.fontWithSize(headerFontSize) + attributes[NSFontAttributeName] = font.withSize(headerFontSize) } return attributes } diff --git a/MarkdownKit/Classes/Elements/MarkdownItalic.swift b/MarkdownKit/Classes/Elements/MarkdownItalic.swift index 636214b..90537e6 100644 --- a/MarkdownKit/Classes/Elements/MarkdownItalic.swift +++ b/MarkdownKit/Classes/Elements/MarkdownItalic.swift @@ -8,14 +8,14 @@ import UIKit -public class MarkdownItalic: MarkdownCommonElement { +open class MarkdownItalic: MarkdownCommonElement { - private static let regex = "(\\s+|^)(\\*|_)(.+?)(\\2)" + fileprivate static let regex = "(\\s+|^)(\\*|_)(.+?)(\\2)" - public var font: UIFont? - public var color: UIColor? + open var font: UIFont? + open var color: UIColor? - public var regex: String { + open var regex: String { return MarkdownItalic.regex } diff --git a/MarkdownKit/Classes/Elements/MarkdownLink.swift b/MarkdownKit/Classes/Elements/MarkdownLink.swift index 27f2a8f..ea12e41 100644 --- a/MarkdownKit/Classes/Elements/MarkdownLink.swift +++ b/MarkdownKit/Classes/Elements/MarkdownLink.swift @@ -8,62 +8,62 @@ import UIKit -public class MarkdownLink: MarkdownLinkElement { +open class MarkdownLink: MarkdownLinkElement { - private static let regex = "\\[[^\\[]*?\\]\\([^\\)]*\\)" + fileprivate static let regex = "\\[[^\\[]*?\\]\\([^\\)]*\\)" - public var font: UIFont? - public var color: UIColor? + open var font: UIFont? + open var color: UIColor? - public var regex: String { + open var regex: String { return MarkdownLink.regex } - public func regularExpression() throws -> NSRegularExpression { - return try NSRegularExpression(pattern: regex, options: .DotMatchesLineSeparators) + open func regularExpression() throws -> NSRegularExpression { + return try NSRegularExpression(pattern: regex, options: .dotMatchesLineSeparators) } - public init(font: UIFont? = nil, color: UIColor? = UIColor.blueColor()) { + public init(font: UIFont? = nil, color: UIColor? = UIColor.blue) { self.font = font self.color = color } - public func formatText(attributedString: NSMutableAttributedString, range: NSRange, + open func formatText(_ attributedString: NSMutableAttributedString, range: NSRange, link: String) { - guard let encodedLink = link.stringByAddingPercentEncodingWithAllowedCharacters(.URLHostAllowedCharacterSet()) + guard let encodedLink = link.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlHostAllowed) else { return } - guard let url = NSURL(string: link) ?? NSURL(string: encodedLink) else { return } + guard let url = URL(string: link) ?? URL(string: encodedLink) else { return } attributedString.addAttribute(NSLinkAttributeName, value: url, range: range) } - public func match(match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { + open func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { let nsString = attributedString.string as NSString let linkStartInResult = nsString - .rangeOfString("(", options: .BackwardsSearch, range: match.range).location + .range(of: "(", options: .backwards, range: match.range).location let linkRange = NSRange(location: linkStartInResult, length: match.range.length + match.range.location - linkStartInResult - 1) let linkURLString = nsString - .substringWithRange(NSRange(location: linkRange.location + 1, length: linkRange.length - 1)) + .substring(with: NSRange(location: linkRange.location + 1, length: linkRange.length - 1)) // deleting trailing markdown // needs to be called before formattingBlock to support modification of length - attributedString.deleteCharactersInRange(NSRange(location: linkRange.location - 1, + attributedString.deleteCharacters(in: NSRange(location: linkRange.location - 1, length: linkRange.length + 2)) // deleting leading markdown // needs to be called before formattingBlock to provide a stable range - attributedString.deleteCharactersInRange(NSRange(location: match.range.location, length: 1)) + attributedString.deleteCharacters(in: NSRange(location: match.range.location, length: 1)) let formatRange = NSRange(location: match.range.location, length: linkStartInResult - match.range.location - 2) formatText(attributedString, range: formatRange, link: linkURLString) addAttributes(attributedString, range: formatRange, link: linkURLString) } - public func addAttributes(attributedString: NSMutableAttributedString, range: NSRange, + open func addAttributes(_ attributedString: NSMutableAttributedString, range: NSRange, link: String) { attributedString.addAttributes(attributes, range: range) } diff --git a/MarkdownKit/Classes/Elements/MarkdownList.swift b/MarkdownKit/Classes/Elements/MarkdownList.swift index 2927109..9b504a3 100644 --- a/MarkdownKit/Classes/Elements/MarkdownList.swift +++ b/MarkdownKit/Classes/Elements/MarkdownList.swift @@ -8,17 +8,17 @@ import UIKit -public class MarkdownList: MarkdownLevelElement { +open class MarkdownList: MarkdownLevelElement { - private static let regex = "^([\\*\\+\\-]{1,%@})\\s+(.+)$" + fileprivate static let regex = "^([\\*\\+\\-]{1,%@})\\s+(.+)$" - public var maxLevel: Int - public var font: UIFont? - public var color: UIColor? - public var separator: String - public var indicator: String + open var maxLevel: Int + open var font: UIFont? + open var color: UIColor? + open var separator: String + open var indicator: String - public var regex: String { + open var regex: String { let level: String = maxLevel > 0 ? "\(maxLevel)" : "" return String(format: MarkdownList.regex, level) } @@ -32,11 +32,11 @@ public class MarkdownList: MarkdownLevelElement { self.color = color } - public func formatText(attributedString: NSMutableAttributedString, range: NSRange, level: Int) { + open func formatText(_ attributedString: NSMutableAttributedString, range: NSRange, level: Int) { var string = (0.. String in return "\(string)\(separator)" } string = "\(string)\(indicator) " - attributedString.replaceCharactersInRange(range, withString: string) + attributedString.replaceCharacters(in: range, with: string) } } diff --git a/MarkdownKit/Classes/Elements/MarkdownQuote.swift b/MarkdownKit/Classes/Elements/MarkdownQuote.swift index f811de8..3420db1 100644 --- a/MarkdownKit/Classes/Elements/MarkdownQuote.swift +++ b/MarkdownKit/Classes/Elements/MarkdownQuote.swift @@ -8,17 +8,17 @@ import UIKit -public class MarkdownQuote: MarkdownLevelElement { +open class MarkdownQuote: MarkdownLevelElement { - private static let regex = "^(\\>{1,%@})\\s*(.+)$" + fileprivate static let regex = "^(\\>{1,%@})\\s*(.+)$" - public var maxLevel: Int - public var font: UIFont? - public var color: UIColor? - public var separator: String - public var indicator: String + open var maxLevel: Int + open var font: UIFont? + open var color: UIColor? + open var separator: String + open var indicator: String - public var regex: String { + open var regex: String { let level: String = maxLevel > 0 ? "\(maxLevel)" : "" return String(format: MarkdownQuote.regex, level) } @@ -33,11 +33,11 @@ public class MarkdownQuote: MarkdownLevelElement { } - public func formatText(attributedString: NSMutableAttributedString, range: NSRange, level: Int) { + open func formatText(_ attributedString: NSMutableAttributedString, range: NSRange, level: Int) { var string = (0.. String in return "\(string)\(separator)" } string = "\(string)\(indicator) " - attributedString.replaceCharactersInRange(range, withString: string) + attributedString.replaceCharacters(in: range, with: string) } } diff --git a/MarkdownKit/Classes/Extensions/String+UTF16.swift b/MarkdownKit/Classes/Extensions/String+UTF16.swift index 041e157..9080afe 100644 --- a/MarkdownKit/Classes/Extensions/String+UTF16.swift +++ b/MarkdownKit/Classes/Extensions/String+UTF16.swift @@ -22,10 +22,10 @@ extension String { /// Converts each 4 digit characters to its String form (e.g. "0048" -> "H") func unescapeUTF16() -> String? { var utf16Array = [UInt16]() - 0.stride(to: characters.count, by: 4).forEach { - let startIndex = characters.startIndex.advancedBy($0) - let endIndex = characters.startIndex.advancedBy($0 + 4) - let hex4 = substringWithRange(startIndex.. UIFont { - let descriptor = fontDescriptor() - .fontDescriptorWithSymbolicTraits(UIFontDescriptorSymbolicTraits(traits)) - return UIFont(descriptor: descriptor, size: 0) + func withTraits(_ traits: UIFontDescriptorSymbolicTraits...) -> UIFont { + let descriptor = fontDescriptor + .withSymbolicTraits(UIFontDescriptorSymbolicTraits(traits)) + return UIFont(descriptor: descriptor!, size: 0) } func bold() -> UIFont { - return withTraits(.TraitBold) + return withTraits(.traitBold) } func italic() -> UIFont { - return withTraits(.TraitItalic) + return withTraits(.traitItalic) } } diff --git a/MarkdownKit/Classes/MarkdownParser.swift b/MarkdownKit/Classes/MarkdownParser.swift index e73b60f..32a0f5b 100644 --- a/MarkdownKit/Classes/MarkdownParser.swift +++ b/MarkdownKit/Classes/MarkdownParser.swift @@ -8,37 +8,37 @@ import UIKit -public class MarkdownParser { +open class MarkdownParser { // MARK: Element Arrays - private var escapingElements: [MarkdownElement] - private var defaultElements: [MarkdownElement] - private var unescapingElements: [MarkdownElement] + fileprivate var escapingElements: [MarkdownElement] + fileprivate var defaultElements: [MarkdownElement] + fileprivate var unescapingElements: [MarkdownElement] - public var customElements: [MarkdownElement] + open var customElements: [MarkdownElement] // MARK: Basic Elements - public let header: MarkdownHeader - public let list: MarkdownList - public let quote: MarkdownQuote - public let link: MarkdownLink - public let automaticLink: MarkdownAutomaticLink - public let bold: MarkdownBold - public let italic: MarkdownItalic - public let code: MarkdownCode + open let header: MarkdownHeader + open let list: MarkdownList + open let quote: MarkdownQuote + open let link: MarkdownLink + open let automaticLink: MarkdownAutomaticLink + open let bold: MarkdownBold + open let italic: MarkdownItalic + open let code: MarkdownCode // MARK: Escaping Elements - private var codeEscaping = MarkdownCodeEscaping() - private var escaping = MarkdownEscaping() - private var unescaping = MarkdownUnescaping() + fileprivate var codeEscaping = MarkdownCodeEscaping() + fileprivate var escaping = MarkdownEscaping() + fileprivate var unescaping = MarkdownUnescaping() // MARK: Configuration /// Enables or disables detection of URLs even without Markdown format - public var automaticLinkDetectionEnabled: Bool = true - public let font: UIFont + open var automaticLinkDetectionEnabled: Bool = true + open let font: UIFont // MARK: Initializer - public init(font: UIFont = UIFont.systemFontOfSize(UIFont.smallSystemFontSize()), + public init(font: UIFont = UIFont.systemFont(ofSize: UIFont.smallSystemFontSize), automaticLinkDetectionEnabled: Bool = true, customElements: [MarkdownElement] = []) { self.font = font @@ -60,34 +60,34 @@ public class MarkdownParser { } // MARK: Element Extensibility - public func addCustomElement(element: MarkdownElement) { + open func addCustomElement(_ element: MarkdownElement) { customElements.append(element) } - public func removeCustomElement(element: MarkdownElement) { - guard let index = customElements.indexOf({ someElement -> Bool in + open func removeCustomElement(_ element: MarkdownElement) { + guard let index = customElements.index(where: { someElement -> Bool in return element === someElement }) else { return } - customElements.removeAtIndex(index) + customElements.remove(at: index) } // MARK: Parsing - public func parse(markdown: String) -> NSAttributedString { + open func parse(_ markdown: String) -> NSAttributedString { return parse(NSAttributedString(string: markdown)) } - public func parse(markdown: NSAttributedString) -> NSAttributedString { + open func parse(_ markdown: NSAttributedString) -> NSAttributedString { let attributedString = NSMutableAttributedString(attributedString: markdown) attributedString.addAttribute(NSFontAttributeName, value: font, range: NSRange(location: 0, length: attributedString.length)) var elements: [MarkdownElement] = escapingElements - elements.appendContentsOf(defaultElements) - elements.appendContentsOf(customElements) - elements.appendContentsOf(unescapingElements) + elements.append(contentsOf: defaultElements) + elements.append(contentsOf: customElements) + elements.append(contentsOf: unescapingElements) elements.forEach { element in - if automaticLinkDetectionEnabled || element.dynamicType != MarkdownAutomaticLink.self { + if automaticLinkDetectionEnabled || type(of: element) != MarkdownAutomaticLink.self { element.parse(attributedString) } } diff --git a/MarkdownKit/Classes/Protocols/MarkdownCommonElement.swift b/MarkdownKit/Classes/Protocols/MarkdownCommonElement.swift index 5faffef..844d80c 100644 --- a/MarkdownKit/Classes/Protocols/MarkdownCommonElement.swift +++ b/MarkdownKit/Classes/Protocols/MarkdownCommonElement.swift @@ -12,7 +12,7 @@ import UIKit /// visually, (e.g. Bold or Italic) public protocol MarkdownCommonElement: MarkdownElement, MarkdownStyle { - func addAttributes(attributedString: NSMutableAttributedString, range: NSRange) + func addAttributes(_ attributedString: NSMutableAttributedString, range: NSRange) } public extension MarkdownCommonElement { @@ -21,16 +21,16 @@ public extension MarkdownCommonElement { return try NSRegularExpression(pattern: regex, options: []) } - func addAttributes(attributedString: NSMutableAttributedString, range: NSRange) { + func addAttributes(_ attributedString: NSMutableAttributedString, range: NSRange) { attributedString.addAttributes(attributes, range: range) } - func match(match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { + func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { // deleting trailing markdown - attributedString.deleteCharactersInRange(match.rangeAtIndex(4)) + attributedString.deleteCharacters(in: match.rangeAt(4)) // formatting string (may alter the length) - addAttributes(attributedString, range: match.rangeAtIndex(3)) + addAttributes(attributedString, range: match.rangeAt(3)) // deleting leading markdown - attributedString.deleteCharactersInRange(match.rangeAtIndex(2)) + attributedString.deleteCharacters(in: match.rangeAt(2)) } -} \ No newline at end of file +} diff --git a/MarkdownKit/Classes/Protocols/MarkdownElement.swift b/MarkdownKit/Classes/Protocols/MarkdownElement.swift index 7bba794..3953f0f 100644 --- a/MarkdownKit/Classes/Protocols/MarkdownElement.swift +++ b/MarkdownKit/Classes/Protocols/MarkdownElement.swift @@ -14,19 +14,19 @@ public protocol MarkdownElement: class { var regex: String { get } func regularExpression() throws -> NSRegularExpression - func parse(attributedString: NSMutableAttributedString) - func match(match: NSTextCheckingResult, attributedString: NSMutableAttributedString) + func parse(_ attributedString: NSMutableAttributedString) + func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) } public extension MarkdownElement { - func parse(attributedString: NSMutableAttributedString) { + func parse(_ attributedString: NSMutableAttributedString) { var location = 0 do { let regex = try regularExpression() while let regexMatch = - regex.firstMatchInString(attributedString.string, - options: .WithoutAnchoringBounds, + regex.firstMatch(in: attributedString.string, + options: .withoutAnchoringBounds, range: NSRange(location: location, length: attributedString.length - location)) { @@ -37,4 +37,4 @@ public extension MarkdownElement { } } catch { } } -} \ No newline at end of file +} diff --git a/MarkdownKit/Classes/Protocols/MarkdownLevelElement.swift b/MarkdownKit/Classes/Protocols/MarkdownLevelElement.swift index 577159c..11bc178 100644 --- a/MarkdownKit/Classes/Protocols/MarkdownLevelElement.swift +++ b/MarkdownKit/Classes/Protocols/MarkdownLevelElement.swift @@ -15,31 +15,31 @@ public protocol MarkdownLevelElement: MarkdownElement, MarkdownStyle { /// The maximum level of elements we should parse (e.g. limit the headers to 6 #s) var maxLevel: Int { get } - func formatText(attributedString: NSMutableAttributedString, range: NSRange, level: Int) - func addAttributes(attributedString: NSMutableAttributedString, range: NSRange, level: Int) - func attributesForLevel(level: Int) -> [String: AnyObject] + func formatText(_ attributedString: NSMutableAttributedString, range: NSRange, level: Int) + func addAttributes(_ attributedString: NSMutableAttributedString, range: NSRange, level: Int) + func attributesForLevel(_ level: Int) -> [String: AnyObject] } public extension MarkdownLevelElement { func regularExpression() throws -> NSRegularExpression { - return try NSRegularExpression(pattern: regex, options: .AnchorsMatchLines) + return try NSRegularExpression(pattern: regex, options: .anchorsMatchLines) } - func addAttributes(attributedString: NSMutableAttributedString, range: NSRange, level: Int) { + func addAttributes(_ attributedString: NSMutableAttributedString, range: NSRange, level: Int) { attributedString.addAttributes(attributesForLevel(level - 1), range: range) } - func attributesForLevel(level: Int) -> [String: AnyObject] { + func attributesForLevel(_ level: Int) -> [String: AnyObject] { return self.attributes } - func match(match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { - let level = match.rangeAtIndex(1).length - addAttributes(attributedString, range: match.rangeAtIndex(2), level: level) - let range = NSRange(location: match.rangeAtIndex(1).location, - length: match.rangeAtIndex(2).location - match.rangeAtIndex(1).location) + func match(_ match: NSTextCheckingResult, attributedString: NSMutableAttributedString) { + let level = match.rangeAt(1).length + addAttributes(attributedString, range: match.rangeAt(2), level: level) + let range = NSRange(location: match.rangeAt(1).location, + length: match.rangeAt(2).location - match.rangeAt(1).location) formatText(attributedString, range: range, level: level) } } diff --git a/MarkdownKit/Classes/Protocols/MarkdownLinkElement.swift b/MarkdownKit/Classes/Protocols/MarkdownLinkElement.swift index 5a7108a..11af267 100644 --- a/MarkdownKit/Classes/Protocols/MarkdownLinkElement.swift +++ b/MarkdownKit/Classes/Protocols/MarkdownLinkElement.swift @@ -11,6 +11,6 @@ import UIKit /// The base to all Link parsing elements. public protocol MarkdownLinkElement: MarkdownElement, MarkdownStyle { - func formatText(attributedString: NSMutableAttributedString, range: NSRange, link: String) - func addAttributes(attributedString: NSMutableAttributedString, range: NSRange, link: String) + func formatText(_ attributedString: NSMutableAttributedString, range: NSRange, link: String) + func addAttributes(_ attributedString: NSMutableAttributedString, range: NSRange, link: String) }