diff --git a/Podfile b/Podfile index 0973406..5151449 100644 --- a/Podfile +++ b/Podfile @@ -1,3 +1,9 @@ -platform :ios, '7.1' -pod 'CameraManager', :git => 'https://gist.github.com/2204678.git' \ No newline at end of file +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '8.0' + +target 'cameraTests' do + use_frameworks! +pod 'Quick', :git => 'https://github.com/Quick/Quick.git', :commit => 'f8c9ff9f499fc5ea72ff55c1c5eed32e1ff303ea' +pod 'Nimble', :git => 'https://github.com/Quick/Nimble.git', :commit => '9538a301d5320fd607f01c931dc282868b0e827a' +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..a228755 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,29 @@ +PODS: + - Nimble (0.3.0) + - Quick (0.2.2) + +DEPENDENCIES: + - Nimble (from `https://github.com/Quick/Nimble.git`, commit `9538a301d5320fd607f01c931dc282868b0e827a`) + - Quick (from `https://github.com/Quick/Quick.git`, commit `f8c9ff9f499fc5ea72ff55c1c5eed32e1ff303ea`) + +EXTERNAL SOURCES: + Nimble: + :commit: 9538a301d5320fd607f01c931dc282868b0e827a + :git: https://github.com/Quick/Nimble.git + Quick: + :commit: f8c9ff9f499fc5ea72ff55c1c5eed32e1ff303ea + :git: https://github.com/Quick/Quick.git + +CHECKOUT OPTIONS: + Nimble: + :commit: 9538a301d5320fd607f01c931dc282868b0e827a + :git: https://github.com/Quick/Nimble.git + Quick: + :commit: f8c9ff9f499fc5ea72ff55c1c5eed32e1ff303ea + :git: https://github.com/Quick/Quick.git + +SPEC CHECKSUMS: + Nimble: 55fef248ef3703024ce431db817160ad24d89ba3 + Quick: 1bda8b4c8d43f6b4dd69ca001918b1767b3c9c93 + +COCOAPODS: 0.36.0 diff --git a/Pods/Headers/Private/Nimble/DSL.h b/Pods/Headers/Private/Nimble/DSL.h new file mode 120000 index 0000000..0308fcd --- /dev/null +++ b/Pods/Headers/Private/Nimble/DSL.h @@ -0,0 +1 @@ +../../../Nimble/Nimble/objc/DSL.h \ No newline at end of file diff --git a/Pods/Headers/Private/Nimble/NMBExceptionCapture.h b/Pods/Headers/Private/Nimble/NMBExceptionCapture.h new file mode 120000 index 0000000..c86b6a1 --- /dev/null +++ b/Pods/Headers/Private/Nimble/NMBExceptionCapture.h @@ -0,0 +1 @@ +../../../Nimble/Nimble/objc/NMBExceptionCapture.h \ No newline at end of file diff --git a/Pods/Headers/Private/Nimble/Nimble.h b/Pods/Headers/Private/Nimble/Nimble.h new file mode 120000 index 0000000..06ace47 --- /dev/null +++ b/Pods/Headers/Private/Nimble/Nimble.h @@ -0,0 +1 @@ +../../../Nimble/Nimble/Nimble.h \ No newline at end of file diff --git a/Pods/Headers/Private/Quick/NSString+QCKSelectorName.h b/Pods/Headers/Private/Quick/NSString+QCKSelectorName.h new file mode 120000 index 0000000..0c5df21 --- /dev/null +++ b/Pods/Headers/Private/Quick/NSString+QCKSelectorName.h @@ -0,0 +1 @@ +../../../Quick/Quick/NSString+QCKSelectorName.h \ No newline at end of file diff --git a/Pods/Headers/Private/Quick/QCKDSL.h b/Pods/Headers/Private/Quick/QCKDSL.h new file mode 120000 index 0000000..08e04e9 --- /dev/null +++ b/Pods/Headers/Private/Quick/QCKDSL.h @@ -0,0 +1 @@ +../../../Quick/Quick/DSL/QCKDSL.h \ No newline at end of file diff --git a/Pods/Headers/Private/Quick/Quick.h b/Pods/Headers/Private/Quick/Quick.h new file mode 120000 index 0000000..16c22c2 --- /dev/null +++ b/Pods/Headers/Private/Quick/Quick.h @@ -0,0 +1 @@ +../../../Quick/Quick/Quick.h \ No newline at end of file diff --git a/Pods/Headers/Private/Quick/QuickConfiguration.h b/Pods/Headers/Private/Quick/QuickConfiguration.h new file mode 120000 index 0000000..2ae958e --- /dev/null +++ b/Pods/Headers/Private/Quick/QuickConfiguration.h @@ -0,0 +1 @@ +../../../Quick/Quick/Configuration/QuickConfiguration.h \ No newline at end of file diff --git a/Pods/Headers/Private/Quick/QuickSpec.h b/Pods/Headers/Private/Quick/QuickSpec.h new file mode 120000 index 0000000..50bd82e --- /dev/null +++ b/Pods/Headers/Private/Quick/QuickSpec.h @@ -0,0 +1 @@ +../../../Quick/Quick/QuickSpec.h \ No newline at end of file diff --git a/Pods/Headers/Public/Nimble/DSL.h b/Pods/Headers/Public/Nimble/DSL.h new file mode 120000 index 0000000..0308fcd --- /dev/null +++ b/Pods/Headers/Public/Nimble/DSL.h @@ -0,0 +1 @@ +../../../Nimble/Nimble/objc/DSL.h \ No newline at end of file diff --git a/Pods/Headers/Public/Nimble/NMBExceptionCapture.h b/Pods/Headers/Public/Nimble/NMBExceptionCapture.h new file mode 120000 index 0000000..c86b6a1 --- /dev/null +++ b/Pods/Headers/Public/Nimble/NMBExceptionCapture.h @@ -0,0 +1 @@ +../../../Nimble/Nimble/objc/NMBExceptionCapture.h \ No newline at end of file diff --git a/Pods/Headers/Public/Nimble/Nimble.h b/Pods/Headers/Public/Nimble/Nimble.h new file mode 120000 index 0000000..06ace47 --- /dev/null +++ b/Pods/Headers/Public/Nimble/Nimble.h @@ -0,0 +1 @@ +../../../Nimble/Nimble/Nimble.h \ No newline at end of file diff --git a/Pods/Headers/Public/Quick/NSString+QCKSelectorName.h b/Pods/Headers/Public/Quick/NSString+QCKSelectorName.h new file mode 120000 index 0000000..0c5df21 --- /dev/null +++ b/Pods/Headers/Public/Quick/NSString+QCKSelectorName.h @@ -0,0 +1 @@ +../../../Quick/Quick/NSString+QCKSelectorName.h \ No newline at end of file diff --git a/Pods/Headers/Public/Quick/QCKDSL.h b/Pods/Headers/Public/Quick/QCKDSL.h new file mode 120000 index 0000000..08e04e9 --- /dev/null +++ b/Pods/Headers/Public/Quick/QCKDSL.h @@ -0,0 +1 @@ +../../../Quick/Quick/DSL/QCKDSL.h \ No newline at end of file diff --git a/Pods/Headers/Public/Quick/Quick.h b/Pods/Headers/Public/Quick/Quick.h new file mode 120000 index 0000000..16c22c2 --- /dev/null +++ b/Pods/Headers/Public/Quick/Quick.h @@ -0,0 +1 @@ +../../../Quick/Quick/Quick.h \ No newline at end of file diff --git a/Pods/Headers/Public/Quick/QuickConfiguration.h b/Pods/Headers/Public/Quick/QuickConfiguration.h new file mode 120000 index 0000000..2ae958e --- /dev/null +++ b/Pods/Headers/Public/Quick/QuickConfiguration.h @@ -0,0 +1 @@ +../../../Quick/Quick/Configuration/QuickConfiguration.h \ No newline at end of file diff --git a/Pods/Headers/Public/Quick/QuickSpec.h b/Pods/Headers/Public/Quick/QuickSpec.h new file mode 120000 index 0000000..50bd82e --- /dev/null +++ b/Pods/Headers/Public/Quick/QuickSpec.h @@ -0,0 +1 @@ +../../../Quick/Quick/QuickSpec.h \ No newline at end of file diff --git a/Pods/Local Podspecs/Nimble.podspec.json b/Pods/Local Podspecs/Nimble.podspec.json new file mode 100644 index 0000000..0ab2a00 --- /dev/null +++ b/Pods/Local Podspecs/Nimble.podspec.json @@ -0,0 +1,26 @@ +{ + "name": "Nimble", + "version": "0.3.0", + "summary": "A Matcher Framework for Swift and Objective-C", + "description": " Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by Cedar.\n", + "homepage": "https://github.com/Quick/Nimble", + "license": { + "type": "Apache 2.0", + "file": "LICENSE.md" + }, + "authors": "Quick Contributors", + "platforms": { + "ios": "8.0", + "osx": "10.10" + }, + "source": { + "git": "https://github.com/Quick/Nimble.git", + "tag": "v0.3.0" + }, + "source_files": [ + "Nimble", + "Nimble/**/*.{swift,h,m}" + ], + "frameworks": "XCTest", + "requires_arc": true +} diff --git a/Pods/Local Podspecs/Quick.podspec.json b/Pods/Local Podspecs/Quick.podspec.json new file mode 100644 index 0000000..47ad889 --- /dev/null +++ b/Pods/Local Podspecs/Quick.podspec.json @@ -0,0 +1,26 @@ +{ + "name": "Quick", + "version": "0.2.2", + "summary": "The Swift (and Objective-C) testing framework.", + "description": " Quick is a behavior-driven development framework for Swift and Objective-C. Inspired by RSpec, Specta, and Ginkgo.\n", + "homepage": "https://github.com/Quick/Quick", + "license": { + "type": "Apache 2.0", + "file": "LICENSE" + }, + "authors": "Quick Contributors", + "platforms": { + "ios": "8.0", + "osx": "10.10" + }, + "source": { + "git": "https://github.com/Quick/Quick.git", + "tag": "v0.2.2" + }, + "source_files": [ + "Quick", + "Quick/**/*.{swift,h,m}" + ], + "frameworks": "XCTest", + "requires_arc": true +} diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock new file mode 100644 index 0000000..a228755 --- /dev/null +++ b/Pods/Manifest.lock @@ -0,0 +1,29 @@ +PODS: + - Nimble (0.3.0) + - Quick (0.2.2) + +DEPENDENCIES: + - Nimble (from `https://github.com/Quick/Nimble.git`, commit `9538a301d5320fd607f01c931dc282868b0e827a`) + - Quick (from `https://github.com/Quick/Quick.git`, commit `f8c9ff9f499fc5ea72ff55c1c5eed32e1ff303ea`) + +EXTERNAL SOURCES: + Nimble: + :commit: 9538a301d5320fd607f01c931dc282868b0e827a + :git: https://github.com/Quick/Nimble.git + Quick: + :commit: f8c9ff9f499fc5ea72ff55c1c5eed32e1ff303ea + :git: https://github.com/Quick/Quick.git + +CHECKOUT OPTIONS: + Nimble: + :commit: 9538a301d5320fd607f01c931dc282868b0e827a + :git: https://github.com/Quick/Nimble.git + Quick: + :commit: f8c9ff9f499fc5ea72ff55c1c5eed32e1ff303ea + :git: https://github.com/Quick/Quick.git + +SPEC CHECKSUMS: + Nimble: 55fef248ef3703024ce431db817160ad24d89ba3 + Quick: 1bda8b4c8d43f6b4dd69ca001918b1767b3c9c93 + +COCOAPODS: 0.36.0 diff --git a/Pods/Nimble/LICENSE.md b/Pods/Nimble/LICENSE.md new file mode 100644 index 0000000..0f3eb71 --- /dev/null +++ b/Pods/Nimble/LICENSE.md @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Pods/Nimble/Nimble/Adapters/AdapterProtocols.swift b/Pods/Nimble/Nimble/Adapters/AdapterProtocols.swift new file mode 100644 index 0000000..73569d8 --- /dev/null +++ b/Pods/Nimble/Nimble/Adapters/AdapterProtocols.swift @@ -0,0 +1,13 @@ +import Foundation + +/// Protocol for the assertion handler that Nimble uses for all expectations. +public protocol AssertionHandler { + func assert(assertion: Bool, message: String, location: SourceLocation) +} + +/// Global backing interface for assertions that Nimble creates. +/// Defaults to a private test handler that passes through to XCTest. +/// +/// @see AssertionHandler +var CurrentAssertionHandler: AssertionHandler = XCTestHandler() + diff --git a/Pods/Nimble/Nimble/Adapters/AssertionRecorder.swift b/Pods/Nimble/Nimble/Adapters/AssertionRecorder.swift new file mode 100644 index 0000000..1e79314 --- /dev/null +++ b/Pods/Nimble/Nimble/Adapters/AssertionRecorder.swift @@ -0,0 +1,51 @@ +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 { + /// Whether the assertion succeeded or failed + public let success: Bool + /// The failure message the assertion would display on failure. + public let message: String + /// The source location the expectation occurred on. + public let location: SourceLocation +} + +/// 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: String, 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: () -> Void) { + let oldRecorder = CurrentAssertionHandler + let capturer = NMBExceptionCapture(handler: nil, finally: ({ + CurrentAssertionHandler = oldRecorder + })) + CurrentAssertionHandler = tempAssertionHandler + capturer.tryBlock { + closure() + } +} diff --git a/Pods/Nimble/Nimble/Adapters/XCTestHandler.swift b/Pods/Nimble/Nimble/Adapters/XCTestHandler.swift new file mode 100644 index 0000000..aff2559 --- /dev/null +++ b/Pods/Nimble/Nimble/Adapters/XCTestHandler.swift @@ -0,0 +1,10 @@ +import Foundation +import XCTest + +class XCTestHandler : AssertionHandler { + func assert(assertion: Bool, message: String, location: SourceLocation) { + if !assertion { + XCTFail(message, file: location.file, line: location.line) + } + } +} diff --git a/Pods/Nimble/Nimble/DSL+Wait.swift b/Pods/Nimble/Nimble/DSL+Wait.swift new file mode 100644 index 0000000..f4298f1 --- /dev/null +++ b/Pods/Nimble/Nimble/DSL+Wait.swift @@ -0,0 +1,43 @@ +import Foundation + +/// 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. +@objc public class NMBWait { + public class func until(#timeout: NSTimeInterval, action: (() -> Void) -> Void, file: String = __FILE__, line: UInt = __LINE__) -> Void { + var completed = false + var token: dispatch_once_t = 0 + let result = pollBlock(pollInterval: 0.01, timeoutInterval: timeout) { + dispatch_once(&token) { + dispatch_async(dispatch_get_main_queue()) { + action() { completed = true } + } + } + return completed + } + if result == PollResult.Failure { + let pluralize = (timeout == 1 ? "" : "s") + fail("Waited more than \(timeout) second\(pluralize)", file: file, line: line) + } else if result == PollResult.Timeout { + fail("Stall on main thread - too much enqueued on main run loop before waitUntil executes.", file: file, line: line) + } + } + + public class func until(action: (() -> Void) -> Void, file: String = __FILE__, line: UInt = __LINE__) -> Void { + until(timeout: 1, action: action, file: file, line: line) + } +} + +/// Wait asynchronously until the done closure is called. +/// +/// This will advance the run loop. +public func waitUntil(#timeout: NSTimeInterval, action: (() -> Void) -> Void, file: String = __FILE__, line: UInt = __LINE__) -> Void { + NMBWait.until(timeout: timeout, action: action, file: file, line: line) +} + +/// Wait asynchronously until the done closure is called. +/// +/// This will advance the run loop. +public func waitUntil(action: (() -> Void) -> Void, file: String = __FILE__, line: UInt = __LINE__) -> Void { + NMBWait.until(action, file: file, line: line) +} \ No newline at end of file diff --git a/Pods/Nimble/Nimble/DSL.swift b/Pods/Nimble/Nimble/DSL.swift new file mode 100644 index 0000000..2989c0e --- /dev/null +++ b/Pods/Nimble/Nimble/DSL.swift @@ -0,0 +1,30 @@ +/// Make an expectation on a given actual value. The value given is lazily evaluated. +public func expect(expression: @autoclosure () -> T?, file: String = __FILE__, line: UInt = __LINE__) -> Expectation { + return Expectation( + expression: Expression( + expression: expression, + location: SourceLocation(file: file, line: line))) +} + +/// Make an expectation on a given actual value. The closure is lazily invoked. +public func expect(file: String = __FILE__, line: UInt = __LINE__, expression: () -> T?) -> Expectation { + return Expectation( + expression: Expression( + expression: expression, + location: SourceLocation(file: file, line: line))) +} + +/// Always fails the test with a message and a specified location. +public func fail(message: String, #location: SourceLocation) { + CurrentAssertionHandler.assert(false, message: message, location: location) +} + +/// Always fails the test with a message. +public func fail(message: String, file: String = __FILE__, line: UInt = __LINE__) { + fail(message, location: SourceLocation(file: file, line: line)) +} + +/// Always fails the test. +public func fail(file: String = __FILE__, line: UInt = __LINE__) { + fail("fail() always fails") +} \ No newline at end of file diff --git a/Pods/Nimble/Nimble/Expectation.swift b/Pods/Nimble/Nimble/Expectation.swift new file mode 100644 index 0000000..3f7919d --- /dev/null +++ b/Pods/Nimble/Nimble/Expectation.swift @@ -0,0 +1,39 @@ +import Foundation + +public struct Expectation { + let expression: Expression + + public func verify(pass: Bool, _ message: String) { + CurrentAssertionHandler.assert(pass, message: message, location: expression.location) + } + + public func to(matcher: U) { + var msg = FailureMessage() + let pass = matcher.matches(expression, failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(expression.evaluate()))>" + } + verify(pass, msg.stringValue()) + } + + public func toNot(matcher: U) { + var msg = FailureMessage() + let pass = matcher.doesNotMatch(expression, failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(expression.evaluate()))>" + } + verify(pass, msg.stringValue()) + } + + public func notTo(matcher: U) { + toNot(matcher) + } + + // see: + // - BasicMatcherWrapper for extension + // - AsyncMatcherWrapper for extension + // - NonNilMatcherWrapper for extension + // + // - NMBExpectation for Objective-C interface +} + diff --git a/Pods/Nimble/Nimble/Expression.swift b/Pods/Nimble/Nimble/Expression.swift new file mode 100644 index 0000000..7fc0b90 --- /dev/null +++ b/Pods/Nimble/Nimble/Expression.swift @@ -0,0 +1,43 @@ +import Foundation + +// Memoizes the given closure, only calling the passed +// closure once; even if repeat calls to the returned closure +internal func memoizedClosure(closure: () -> T) -> (Bool) -> T { + var cache: T? + return ({ withoutCaching in + if (withoutCaching || cache == nil) { + cache = closure() + } + return cache! + }) +} + +public struct Expression { + internal let _expression: (Bool) -> T? + internal let _withoutCaching: Bool + public let location: SourceLocation + + public init(expression: () -> T?, location: SourceLocation) { + self._expression = memoizedClosure(expression) + self.location = location + self._withoutCaching = false + } + + public init(memoizedExpression: (Bool) -> T?, location: SourceLocation, withoutCaching: Bool) { + self._expression = memoizedExpression + self.location = location + self._withoutCaching = withoutCaching + } + + public func cast(block: (T?) -> U?) -> Expression { + return Expression(expression: ({ block(self.evaluate()) }), location: self.location) + } + + public func evaluate() -> T? { + return self._expression(_withoutCaching) + } + + public func withoutCaching() -> Expression { + return Expression(memoizedExpression: self._expression, location: location, withoutCaching: true) + } +} diff --git a/Pods/Nimble/Nimble/FailureMessage.swift b/Pods/Nimble/Nimble/FailureMessage.swift new file mode 100644 index 0000000..6312122 --- /dev/null +++ b/Pods/Nimble/Nimble/FailureMessage.swift @@ -0,0 +1,24 @@ +import Foundation + +@objc +public class FailureMessage { + 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 init() { + } + + public func stringValue() -> String { + var value = "\(expected) \(to) \(postfixMessage)" + if let actualValue = actualValue { + value = "\(expected) \(to) \(postfixMessage), got \(actualValue)\(postfixActual)" + } + var lines: [String] = (value as NSString).componentsSeparatedByString("\n") as [String] + let whitespace = NSCharacterSet.whitespaceAndNewlineCharacterSet() + lines = lines.map { line in line.stringByTrimmingCharactersInSet(whitespace) } + return "".join(lines) + } +} \ No newline at end of file diff --git a/Pods/Nimble/Nimble/Matchers/BeAKindOf.swift b/Pods/Nimble/Nimble/Matchers/BeAKindOf.swift new file mode 100644 index 0000000..acf7f02 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeAKindOf.swift @@ -0,0 +1,24 @@ +import Foundation + +/// 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 = actualExpression.evaluate() + if let validInstance = instance { + failureMessage.actualValue = "<\(NSStringFromClass(validInstance.dynamicType)) instance>" + } else { + failureMessage.actualValue = "" + } + failureMessage.postfixMessage = "be a kind of \(NSStringFromClass(expectedClass))" + return instance != nil && instance!.isKindOfClass(expectedClass) + } +} + +extension NMBObjCMatcher { + public class func beAKindOfMatcher(expected: AnyClass) -> NMBMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + return beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeAnInstanceOf.swift b/Pods/Nimble/Nimble/Matchers/BeAnInstanceOf.swift new file mode 100644 index 0000000..d6024d2 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeAnInstanceOf.swift @@ -0,0 +1,24 @@ +import Foundation + +/// 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 = actualExpression.evaluate() + if let validInstance = instance { + failureMessage.actualValue = "<\(NSStringFromClass(validInstance.dynamicType)) instance>" + } else { + failureMessage.actualValue = "" + } + failureMessage.postfixMessage = "be an instance of \(NSStringFromClass(expectedClass))" + return instance != nil && instance!.isMemberOfClass(expectedClass) + } +} + +extension NMBObjCMatcher { + public class func beAnInstanceOfMatcher(expected: AnyClass) -> NMBMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + return beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeCloseTo.swift b/Pods/Nimble/Nimble/Matchers/BeCloseTo.swift new file mode 100644 index 0000000..fe41575 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeCloseTo.swift @@ -0,0 +1,118 @@ +import Foundation + +let DefaultDelta = 0.0001 + +internal func isCloseTo(actualValue: Double?, expectedValue: Double, 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! - expectedValue) < 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(actualExpression.evaluate(), expectedValue, delta, 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(actualExpression.evaluate()?.doubleValue, expectedValue.doubleValue, delta, failureMessage) + } +} + +@objc public class NMBObjCBeCloseToMatcher : 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 = NonNilMatcherWrapper(NonNilBasicMatcherWrapper(beCloseTo(self._expected, within: self._delta))) + return 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 = NonNilMatcherWrapper(NonNilBasicMatcherWrapper(beCloseTo(self._expected, within: self._delta))) + return 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) + } +} + +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 = actualExpression.evaluate() { + if actual.count != expectedValues.count { + return false + } else { + for (index, actualItem) in enumerate(actual) { + if fabs(actualItem - expectedValues[index]) > delta { + return false + } + } + return true + } + } + return false + } +} + +// MARK: - Operators + +infix operator ≈ {} + +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/Pods/Nimble/Nimble/Matchers/BeEmpty.swift b/Pods/Nimble/Nimble/Matchers/BeEmpty.swift new file mode 100644 index 0000000..71d3501 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeEmpty.swift @@ -0,0 +1,79 @@ +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 = 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 = 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 = 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 = 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 = actualExpression.evaluate() + return actual == nil || actual!.count == 0 + } +} + +extension NMBObjCMatcher { + public class func beEmptyMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + let actualValue = actualExpression.evaluate() + failureMessage.postfixMessage = "be empty" + if let value = actualValue as? NMBCollection { + let expr = Expression(expression: ({ value as NMBCollection }), location: location) + return beEmpty().matches(expr, failureMessage: failureMessage) + } else if let value = actualValue as? NSString { + let expr = Expression(expression: ({ value as String }), location: location) + return 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 = "\(NSStringFromClass(actualValue.dynamicType)) type" + } + return false + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeGreaterThan.swift b/Pods/Nimble/Nimble/Matchers/BeGreaterThan.swift new file mode 100644 index 0000000..bf5e006 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeGreaterThan.swift @@ -0,0 +1,37 @@ +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 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 = 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)) +} + +extension NMBObjCMatcher { + public class func beGreaterThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + let expr = actualExpression.cast { $0 as NMBComparable? } + return beGreaterThan(expected).matches(expr, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Pods/Nimble/Nimble/Matchers/BeGreaterThanOrEqualTo.swift new file mode 100644 index 0000000..f746e03 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeGreaterThanOrEqualTo.swift @@ -0,0 +1,39 @@ +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 = 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 = 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)) +} + +extension NMBObjCMatcher { + public class func beGreaterThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + let expr = actualExpression.cast { $0 as NMBComparable? } + return beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeIdenticalTo.swift b/Pods/Nimble/Nimble/Matchers/BeIdenticalTo.swift new file mode 100644 index 0000000..c2f7f9d --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeIdenticalTo.swift @@ -0,0 +1,28 @@ +import Foundation + + +/// A Nimble matcher that succeeds when the actual value is the same instance +/// as the expected instance. +public func beIdenticalTo(expected: T?) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + let actual = actualExpression.evaluate() + failureMessage.actualValue = "\(identityAsString(actual))" + failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" + return actual === expected && actual !== nil + } +} + +public func ===(lhs: Expectation, rhs: T?) { + lhs.to(beIdenticalTo(rhs)) +} +public func !==(lhs: Expectation, rhs: T?) { + lhs.toNot(beIdenticalTo(rhs)) +} + +extension NMBObjCMatcher { + public class func beIdenticalToMatcher(expected: NSObject?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + return beIdenticalTo(expected).matches(actualExpression, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeLessThan.swift b/Pods/Nimble/Nimble/Matchers/BeLessThan.swift new file mode 100644 index 0000000..3807ef8 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeLessThan.swift @@ -0,0 +1,36 @@ +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 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 = 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)) +} + +extension NMBObjCMatcher { + public class func beLessThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + let expr = actualExpression.cast { $0 as NMBComparable? } + return beLessThan(expected).matches(expr, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeLessThanOrEqual.swift b/Pods/Nimble/Nimble/Matchers/BeLessThanOrEqual.swift new file mode 100644 index 0000000..a932e4e --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeLessThanOrEqual.swift @@ -0,0 +1,37 @@ +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 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 = 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)) +} + +extension NMBObjCMatcher { + public class func beLessThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil:false) { actualExpression, failureMessage, location in + let expr = actualExpression.cast { $0 as? NMBComparable } + return beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeLogical.swift b/Pods/Nimble/Nimble/Matchers/BeLogical.swift new file mode 100644 index 0000000..053fc5d --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeLogical.swift @@ -0,0 +1,76 @@ +import Foundation + +internal func beBool(#expectedValue: BooleanType, #stringValue: String, #falseMatchesNil: Bool) -> MatcherFunc { + return MatcherFunc { actualExpression, failureMessage in + failureMessage.postfixMessage = "be \(stringValue)" + let actual = actualExpression.evaluate() + if expectedValue { + return actual?.boolValue == expectedValue.boolValue + } else if !falseMatchesNil { + return actual != nil && actual!.boolValue != !expectedValue.boolValue + } else { + return actual?.boolValue != !expectedValue.boolValue + } + } +} + +// 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() -> NonNilMatcherFunc { + return basicMatcherWithFailureMessage(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() -> NonNilMatcherFunc { + return basicMatcherWithFailureMessage(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 beBool(expectedValue: true, stringValue: "truthy", falseMatchesNil: true) +} + +/// A Nimble matcher that succeeds when the actual value is logically false. +/// This matcher will match against nils. +public func beFalsy() -> MatcherFunc { + return beBool(expectedValue: false, stringValue: "falsy", falseMatchesNil: true) +} + +extension NMBObjCMatcher { + public class func beTruthyMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualExpression, failureMessage, location in + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as BooleanType? } + return beTruthy().matches(expr, failureMessage: failureMessage) + } + } + + public class func beFalsyMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualExpression, failureMessage, location in + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as BooleanType? } + return beFalsy().matches(expr, failureMessage: failureMessage) + } + } + + public class func beTrueMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualExpression, failureMessage, location in + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as Bool? } + return beTrue().matches(expr, failureMessage: failureMessage) + } + } + + public class func beFalseMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as Bool? } + return beFalse().matches(expr, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeNil.swift b/Pods/Nimble/Nimble/Matchers/BeNil.swift new file mode 100644 index 0000000..b33ef1b --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeNil.swift @@ -0,0 +1,18 @@ +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 = actualExpression.evaluate() + return actualValue == nil + } +} + +extension NMBObjCMatcher { + public class func beNilMatcher() -> NMBObjCMatcher { + return NMBObjCMatcher { actualExpression, failureMessage, location in + return beNil().matches(actualExpression, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/BeginWith.swift b/Pods/Nimble/Nimble/Matchers/BeginWith.swift new file mode 100644 index 0000000..71c6058 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/BeginWith.swift @@ -0,0 +1,53 @@ +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 = 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 = 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 = actualExpression.evaluate() { + let range = actual.rangeOfString(startingSubstring) + return range != nil && range!.startIndex == actual.startIndex + } + return false + } +} + +extension NMBObjCMatcher { + public class func beginWithMatcher(expected: AnyObject) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + let actual = actualExpression.evaluate() + if let actualString = actual as? String { + let expr = actualExpression.cast { $0 as? String } + return beginWith(expected as String).matches(expr, failureMessage: failureMessage) + } else { + let expr = actualExpression.cast { $0 as? NMBOrderedCollection } + return beginWith(expected).matches(expr, failureMessage: failureMessage) + } + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/Contain.swift b/Pods/Nimble/Nimble/Matchers/Contain.swift new file mode 100644 index 0000000..aa1be43 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/Contain.swift @@ -0,0 +1,60 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual sequence contains the expected value. +public func contain(items: T...) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" + if let actual = actualExpression.evaluate() { + return all(items) { + return contains(actual, $0) + } + } + return false + } +} + +/// A Nimble matcher that succeeds when the actual string contains the expected substring. +public func contain(substrings: String...) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" + if let actual = actualExpression.evaluate() { + return all(substrings) { + let scanRange = Range(start: actual.startIndex, end: actual.endIndex) + let range = actual.rangeOfString($0, options: nil, range: scanRange, locale: nil) + return range != nil && !range!.isEmpty + } + } + return false + } +} + +/// A Nimble matcher that succeeds when the actual collection contains the expected object. +public func contain(items: AnyObject?...) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" + let actual = actualExpression.evaluate() + return all(items) { item in + return actual != nil && actual!.containsObject(item) + } + } +} + +extension NMBObjCMatcher { + public class func containMatcher(expected: NSObject?) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + let actualValue = actualExpression.evaluate() + if let value = actualValue as? NMBContainer { + let expr = Expression(expression: ({ value as NMBContainer }), location: location) + return contain(expected).matches(expr, failureMessage: failureMessage) + } else if let value = actualValue as? NSString { + let expr = Expression(expression: ({ value as String }), location: location) + return contain(expected as String).matches(expr, failureMessage: failureMessage) + } else if actualValue != nil { + failureMessage.postfixMessage = "contain <\(stringify(expected))> (only works for NSArrays, NSSets, NSHashTables, and NSStrings)" + } else { + failureMessage.postfixMessage = "contain <\(stringify(expected))>" + } + return false + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/EndWith.swift b/Pods/Nimble/Nimble/Matchers/EndWith.swift new file mode 100644 index 0000000..7797b48 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/EndWith.swift @@ -0,0 +1,63 @@ +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 = actualExpression.evaluate() { + var actualGenerator = actualValue.generate() + var lastItem: T? + var item: T? + do { + 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 = 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 = actualExpression.evaluate() { + let range = collection.rangeOfString(endingSubstring) + return range != nil && range!.endIndex == collection.endIndex + } + return false + } +} + +extension NMBObjCMatcher { + public class func endWithMatcher(expected: AnyObject) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + let actual = actualExpression.evaluate() + if let actualString = actual as? String { + let expr = Expression(expression: ({ actualString }), location: location) + return endWith(expected as String).matches(expr, failureMessage: failureMessage) + } else { + let expr = Expression(expression: ({ actual as? NMBOrderedCollection }), location: location) + return endWith(expected).matches(expr, failureMessage: failureMessage) + } + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/Equal.swift b/Pods/Nimble/Nimble/Matchers/Equal.swift new file mode 100644 index 0000000..e3a3886 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/Equal.swift @@ -0,0 +1,83 @@ +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 matches = actualExpression.evaluate() == expectedValue && expectedValue != nil + if expectedValue == nil || actualExpression.evaluate() == 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))>" + if expectedValue == nil || actualExpression.evaluate() == nil { + if expectedValue == nil { + failureMessage.postfixActual = " (use beNil() to match nils)" + } + return false + } + return expectedValue! == actualExpression.evaluate()! + } +} + +/// 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))>" + if expectedValue == nil || actualExpression.evaluate() == nil { + if expectedValue == nil { + failureMessage.postfixActual = " (use beNil() to match nils)" + } + return false + } + return expectedValue! == actualExpression.evaluate()! + } +} + +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<[T: C]>, rhs: [T: C]?) { + lhs.to(equal(rhs)) +} + +public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { + lhs.toNot(equal(rhs)) +} + +extension NMBObjCMatcher { + public class func equalMatcher(expected: NSObject) -> NMBMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage, location in + return equal(expected).matches(actualExpression, failureMessage: failureMessage) + } + } +} diff --git a/Pods/Nimble/Nimble/Matchers/Match.swift b/Pods/Nimble/Nimble/Matchers/Match.swift new file mode 100644 index 0000000..85dd98f --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/Match.swift @@ -0,0 +1,27 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual string satisfies the regular expression +/// described by the expected string. +public func match(expectedValue: String?) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" + + if let actual = 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, location in + let actual = actualExpression.cast { $0 as? String } + return match(expected).matches(actual, failureMessage: failureMessage) + } + } +} + diff --git a/Pods/Nimble/Nimble/Matchers/MatcherProtocols.swift b/Pods/Nimble/Nimble/Matchers/MatcherProtocols.swift new file mode 100644 index 0000000..035f185 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/MatcherProtocols.swift @@ -0,0 +1,92 @@ +import Foundation + + +/// Implement this protocol if you want full control over to() and toNot() behaviors +/// when matching a value. +public protocol Matcher { + typealias ValueType + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool + func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool +} + +/// Implement this protocol if you just want a simplier matcher. The negation +/// is provided for you automatically. +/// +/// If you just want a very simplified usage of BasicMatcher, +/// @see MatcherFunc. +public protocol BasicMatcher { + typealias ValueType + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool +} + + +/// Implement this protocol if you want a matcher only work for non-nil values. +/// The matcher still needs to properly handle nil values, but using this type will +/// tell Nimble to automatically postfix a nil match error (and automatically fail the match). +/// +/// Unlike a naive implementation of the matches interface, NonNilBasicMatcher will also +/// fail for the negation to a nil: +/// +/// // objc +/// expect(nil).to(matchWithMyCustomNonNilBasicMatcher()) // => fails +/// expect(nil).toNot(matchWithMyCustomNonNilBasicMatcher()) // => fails +/// +/// @see BasicMatcher +public protocol NonNilBasicMatcher { + typealias ValueType + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool +} + +/// Objective-C interface to the Swift variant of Matcher. This gives you full control over +/// to() and toNot() behaviors when matching a value. +@objc public protocol NMBMatcher { + func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool + func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool +} + +/// Protocol for types that support contain() matcher. +@objc public protocol NMBContainer { + func containsObject(object: AnyObject!) -> Bool +} +extension NSArray : NMBContainer {} +extension NSSet : NMBContainer {} +extension NSHashTable : NMBContainer {} + +/// Protocol for types that support only beEmpty() +@objc public protocol NMBCollection { + var count: Int { get } +} +extension NSSet : NMBCollection {} +extension NSDictionary : NMBCollection {} +extension NSHashTable : NMBCollection {} + +/// Protocol for types that support beginWith(), endWith(), beEmpty() matchers +@objc public protocol NMBOrderedCollection : NMBCollection { + func indexOfObject(object: AnyObject!) -> Int +} +extension NSArray : NMBOrderedCollection {} + +/// Protocol for types to support beCloseTo() matcher +@objc public protocol NMBDoubleConvertible { + var doubleValue: CDouble { get } +} +extension NSNumber : NMBDoubleConvertible { } +extension NSDecimalNumber : NMBDoubleConvertible { } // TODO: not the best to downsize + +/// Protocol for types to support beLessThan(), beLessThanOrEqualTo(), +/// beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers. +/// +/// Types that conform to Swift's Comparable protocol will work implicitly too +@objc public protocol NMBComparable { + func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult +} +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 NSString) + } +} diff --git a/Pods/Nimble/Nimble/Matchers/RaisesException.swift b/Pods/Nimble/Nimble/Matchers/RaisesException.swift new file mode 100644 index 0000000..fdb0518 --- /dev/null +++ b/Pods/Nimble/Nimble/Matchers/RaisesException.swift @@ -0,0 +1,111 @@ +import Foundation + +internal func raiseExceptionMatcher(message: String, matches: (NSException?) -> Bool) -> MatcherFunc { + return MatcherFunc { actualExpression, failureMessage in + failureMessage.actualValue = nil + failureMessage.postfixMessage = message + + // It would be better if this was part of Expression, but + // Swift compiler crashes when expect() is inside a closure. + var exception: NSException? + var result: T? + var capture = NMBExceptionCapture(handler: ({ e in + exception = e + }), finally: nil) + + capture.tryBlock { + actualExpression.evaluate() + return + } + return matches(exception) + } +} + +/// A Nimble matcher that succeeds when the actual expression raises an exception with +/// the specified name, reason, and userInfo. +public func raiseException(#named: String, #reason: String, #userInfo: NSDictionary) -> MatcherFunc { + return raiseExceptionMatcher("raise exception named <\(named)> with reason <\(reason)> and userInfo <\(userInfo)>") { + exception in + return exception?.name == named + && exception?.reason == reason + && exception?.userInfo == userInfo + } +} + +/// A Nimble matcher that succeeds when the actual expression raises an exception with +/// the specified name and reason. +public func raiseException(#named: String, #reason: String) -> MatcherFunc { + return raiseExceptionMatcher("raise exception named <\(named)> with reason <\(reason)>") { + exception in return exception?.name == named && exception?.reason == reason + } +} + + +/// A Nimble matcher that succeeds when the actual expression raises an exception with +/// the specified name. +public func raiseException(#named: String) -> MatcherFunc { + return raiseExceptionMatcher("raise exception named <\(named)>") { + exception in return exception?.name == named + } +} + +/// A Nimble matcher that succeeds when the actual expression raises any exception. +/// Please use a more specific raiseException() matcher when possible. +public func raiseException() -> MatcherFunc { + return raiseExceptionMatcher("raise any exception") { + exception in return exception != nil + } +} + +@objc public class NMBObjCRaiseExceptionMatcher : NMBMatcher { + var _name: String? + var _reason: String? + var _userInfo: NSDictionary? + init(name: String?, reason: String?, userInfo: NSDictionary?) { + _name = name + _reason = reason + _userInfo = userInfo + } + + public func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let block: () -> Any? = ({ actualBlock(); return nil }) + let expr = Expression(expression: block, location: location) + if _name != nil && _reason != nil && _userInfo != nil { + return raiseException(named: _name!, reason: _reason!, userInfo: _userInfo!).matches(expr, failureMessage: failureMessage) + } else if _name != nil && _reason != nil { + return raiseException(named: _name!, reason: _reason!).matches(expr, failureMessage: failureMessage) + } else if _name != nil { + return raiseException(named: _name!).matches(expr, failureMessage: failureMessage) + } else { + return raiseException().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) + }) + } + + public var reason: (reason: String?) -> NMBObjCRaiseExceptionMatcher { + return ({ reason in + return NMBObjCRaiseExceptionMatcher(name: self._name, reason: reason, userInfo: self._userInfo) + }) + } + + public var userInfo: (userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { + return ({ userInfo in + return NMBObjCRaiseExceptionMatcher(name: self._name, reason: self._reason, userInfo: userInfo) + }) + } +} + +extension NMBObjCMatcher { + public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionMatcher { + return NMBObjCRaiseExceptionMatcher(name: nil, reason: nil, userInfo: nil) + } +} diff --git a/Pods/Nimble/Nimble/Nimble.h b/Pods/Nimble/Nimble/Nimble.h new file mode 100644 index 0000000..4336218 --- /dev/null +++ b/Pods/Nimble/Nimble/Nimble.h @@ -0,0 +1,6 @@ +#import +#import +#import + +FOUNDATION_EXPORT double NimbleVersionNumber; +FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Pods/Nimble/Nimble/Utils/Functional.swift b/Pods/Nimble/Nimble/Utils/Functional.swift new file mode 100644 index 0000000..647123f --- /dev/null +++ b/Pods/Nimble/Nimble/Utils/Functional.swift @@ -0,0 +1,11 @@ +import Foundation + +internal func all(array: [T], fn: (T) -> Bool) -> Bool { + for item in array { + if !fn(item) { + return false + } + } + return true +} + diff --git a/Pods/Nimble/Nimble/Utils/Poll.swift b/Pods/Nimble/Nimble/Utils/Poll.swift new file mode 100644 index 0000000..0a91db6 --- /dev/null +++ b/Pods/Nimble/Nimble/Utils/Poll.swift @@ -0,0 +1,73 @@ +import Foundation + +internal enum PollResult : BooleanType { + case Success, Failure, Timeout + + var boolValue : Bool { + return self == .Success + } +} + +internal class RunPromise { + var token: dispatch_once_t = 0 + var didFinish = false + var didFail = false + + init() {} + + func succeed() { + dispatch_once(&self.token) { + self.didFinish = false + } + } + + func fail(block: () -> Void) { + dispatch_once(&self.token) { + self.didFail = true + block() + } + } +} + +internal func stopRunLoop(runLoop: NSRunLoop, delay: NSTimeInterval) -> RunPromise { + var promise = RunPromise() + var killQueue = dispatch_queue_create("nimble.waitUntil.queue", DISPATCH_QUEUE_SERIAL) + let killTimeOffset = Int64(CDouble(delay) * CDouble(NSEC_PER_SEC)) + let killTime = dispatch_time(DISPATCH_TIME_NOW, killTimeOffset) + dispatch_after(killTime, killQueue) { + promise.fail { + CFRunLoopStop(runLoop.getCFRunLoop()) + } + } + return promise +} + +internal func pollBlock(#pollInterval: NSTimeInterval, #timeoutInterval: NSTimeInterval, expression: () -> Bool) -> PollResult { + let runLoop = NSRunLoop.mainRunLoop() + + var promise = stopRunLoop(runLoop, min(timeoutInterval, 0.2)) + + let startDate = NSDate() + + // trigger run loop to make sure enqueued tasks don't block our assertion polling + // the stop run loop task above will abort us if necessary + runLoop.runUntilDate(startDate) + promise.succeed() + + if promise.didFail { + return .Timeout + } + + var pass: Bool = false + do { + pass = expression() + if pass { + break + } + + let runDate = NSDate().dateByAddingTimeInterval(pollInterval) as NSDate + runLoop.runUntilDate(runDate) + } while(NSDate().timeIntervalSinceDate(startDate) < timeoutInterval); + + return pass ? .Success : .Failure +} diff --git a/Pods/Nimble/Nimble/Utils/SourceLocation.swift b/Pods/Nimble/Nimble/Utils/SourceLocation.swift new file mode 100644 index 0000000..ca32d54 --- /dev/null +++ b/Pods/Nimble/Nimble/Utils/SourceLocation.swift @@ -0,0 +1,21 @@ +import Foundation + + +@objc public class SourceLocation : Printable { + public let file: String + public let line: UInt + + init() { + file = "Unknown File" + line = 0 + } + + init(file: String, line: UInt) { + self.file = file + self.line = line + } + + public var description: String { + return "\(file):\(line)" + } +} diff --git a/Pods/Nimble/Nimble/Utils/Stringers.swift b/Pods/Nimble/Nimble/Utils/Stringers.swift new file mode 100644 index 0000000..a383912 --- /dev/null +++ b/Pods/Nimble/Nimble/Utils/Stringers.swift @@ -0,0 +1,55 @@ +import Foundation + + +internal func identityAsString(value: AnyObject?) -> String { + if value == nil { + return "nil" + } + return NSString(format: "<%p>", unsafeBitCast(value!, Int.self)) +} + +internal func arrayAsString(items: [T], joiner: String = ", ") -> String { + return items.reduce("") { accum, item in + let prefix = (accum.isEmpty ? "" : joiner) + return accum + prefix + "\(stringify(item))" + } +} + +@objc protocol NMBStringer { + func NMB_stringify() -> String +} + +internal func stringify(value: S) -> String { + var generator = value.generate() + var strings = [String]() + var value: S.Generator.Element? + do { + value = generator.next() + if value != nil { + strings.append(stringify(value)) + } + } while value != nil + let str = ", ".join(strings) + return "[\(str)]" +} + +extension NSArray : NMBStringer { + func NMB_stringify() -> String { + let str = self.componentsJoinedByString(", ") + return "[\(str)]" + } +} + +internal func stringify(value: T) -> String { + if value is Double { + return NSString(format: "%.4f", (value as Double)) + } + return toString(value) +} + +internal func stringify(value: T?) -> String { + if let unboxed = value { + return stringify(unboxed) + } + return "nil" +} diff --git a/Pods/Nimble/Nimble/Wrappers/AsyncMatcherWrapper.swift b/Pods/Nimble/Nimble/Wrappers/AsyncMatcherWrapper.swift new file mode 100644 index 0000000..3c7b422 --- /dev/null +++ b/Pods/Nimble/Nimble/Wrappers/AsyncMatcherWrapper.swift @@ -0,0 +1,97 @@ +import Foundation + +struct AsyncMatcherWrapper: Matcher { + let fullMatcher: U + let timeoutInterval: NSTimeInterval = 1 + let pollInterval: NSTimeInterval = 0.01 + + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + let uncachedExpression = actualExpression.withoutCaching() + let result = pollBlock(pollInterval: pollInterval, timeoutInterval: timeoutInterval) { + self.fullMatcher.matches(uncachedExpression, failureMessage: failureMessage) + } + switch (result) { + case .Success: return true + case .Failure: return false + case .Timeout: + failureMessage.postfixMessage += " (Stall on main thread)." + return false + } + } + + func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + let uncachedExpression = actualExpression.withoutCaching() + let result = pollBlock(pollInterval: pollInterval, timeoutInterval: timeoutInterval) { + self.fullMatcher.doesNotMatch(uncachedExpression, failureMessage: failureMessage) + } + switch (result) { + case .Success: return true + case .Failure: return false + case .Timeout: + failureMessage.postfixMessage += " (Stall on main thread)." + return false + } + } +} + +extension Expectation { + public func toEventually(matcher: U, timeout: NSTimeInterval = 1, pollInterval: NSTimeInterval = 0.01) { + to(AsyncMatcherWrapper( + fullMatcher: FullMatcherWrapper( + matcher: matcher, + to: "to eventually", + toNot: "to eventually not"), + timeoutInterval: timeout, + pollInterval: pollInterval)) + } + + public func toEventuallyNot(matcher: U, timeout: NSTimeInterval = 1, pollInterval: NSTimeInterval = 0.01) { + toNot(AsyncMatcherWrapper( + fullMatcher: FullMatcherWrapper( + matcher: matcher, + to: "to eventually", + toNot: "to eventually not"), + timeoutInterval: timeout, + pollInterval: pollInterval)) + } + + public func toEventually(matcher: U, timeout: NSTimeInterval = 1, pollInterval: NSTimeInterval = 0.01) { + toEventually( + FullMatcherWrapper( + matcher: BasicMatcherWrapper(matcher: matcher), + to: "to eventually", + toNot: "to eventually not"), + timeout: timeout, + pollInterval: pollInterval) + } + + public func toEventuallyNot(matcher: U, timeout: NSTimeInterval = 1, pollInterval: NSTimeInterval = 0.01) { + toEventuallyNot( + FullMatcherWrapper( + matcher: BasicMatcherWrapper(matcher: matcher), + to: "to eventually", + toNot: "to eventually not"), + timeout: timeout, + pollInterval: pollInterval) + } + + public func toEventually(matcher: U, timeout: NSTimeInterval = 1, pollInterval: NSTimeInterval = 0.1) { + toEventually( + FullMatcherWrapper( + matcher: NonNilMatcherWrapper(NonNilBasicMatcherWrapper(matcher)), + to: "to eventually", + toNot: "to eventually not"), + timeout: timeout, + pollInterval: pollInterval) + } + + public func toEventuallyNot(matcher: U, timeout: NSTimeInterval = 1, pollInterval: NSTimeInterval = 0.1) { + toEventuallyNot( + FullMatcherWrapper( + matcher: NonNilMatcherWrapper(NonNilBasicMatcherWrapper(matcher)), + to: "to eventually", + toNot: "to eventually not"), + timeout: timeout, + pollInterval: pollInterval) + } +} diff --git a/Pods/Nimble/Nimble/Wrappers/BasicMatcherWrapper.swift b/Pods/Nimble/Nimble/Wrappers/BasicMatcherWrapper.swift new file mode 100644 index 0000000..e1600fe --- /dev/null +++ b/Pods/Nimble/Nimble/Wrappers/BasicMatcherWrapper.swift @@ -0,0 +1,28 @@ +import Foundation + + +struct BasicMatcherWrapper: Matcher { + let matcher: M + + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return matcher.matches(actualExpression, failureMessage: failureMessage) + } + + func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return !matcher.matches(actualExpression, failureMessage: failureMessage) + } +} + +extension Expectation { + public func to(matcher: U) { + to(FullMatcherWrapper(matcher: BasicMatcherWrapper(matcher: matcher), to: "to", toNot: "to not")) + } + + public func toNot(matcher: U) { + toNot(FullMatcherWrapper(matcher: BasicMatcherWrapper(matcher: matcher), to: "to", toNot: "to not")) + } + + public func notTo(matcher: U) { + toNot(matcher) + } +} diff --git a/Pods/Nimble/Nimble/Wrappers/FullMatcherWrapper.swift b/Pods/Nimble/Nimble/Wrappers/FullMatcherWrapper.swift new file mode 100644 index 0000000..9c358ef --- /dev/null +++ b/Pods/Nimble/Nimble/Wrappers/FullMatcherWrapper.swift @@ -0,0 +1,18 @@ +import Foundation + + +struct FullMatcherWrapper: Matcher { + let matcher: M + let to: String + let toNot: String + + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + failureMessage.to = to + return matcher.matches(actualExpression, failureMessage: failureMessage) + } + + func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + failureMessage.to = toNot + return matcher.doesNotMatch(actualExpression, failureMessage: failureMessage) + } +} diff --git a/Pods/Nimble/Nimble/Wrappers/MatcherFunc.swift b/Pods/Nimble/Nimble/Wrappers/MatcherFunc.swift new file mode 100644 index 0000000..224f8a0 --- /dev/null +++ b/Pods/Nimble/Nimble/Wrappers/MatcherFunc.swift @@ -0,0 +1,55 @@ +import Foundation + +public struct FullMatcherFunc: Matcher { + public let matcher: (Expression, FailureMessage, Bool) -> Bool + + public init(_ matcher: (Expression, FailureMessage, Bool) -> Bool) { + self.matcher = matcher + } + + public func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return matcher(actualExpression, failureMessage, false) + } + + public func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return !matcher(actualExpression, failureMessage, true) + } +} + +public struct MatcherFunc: BasicMatcher { + public let matcher: (Expression, FailureMessage) -> Bool + + public init(_ matcher: (Expression, FailureMessage) -> Bool) { + self.matcher = matcher + } + + public func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return matcher(actualExpression, failureMessage) + } +} + +public struct NonNilMatcherFunc: NonNilBasicMatcher { + public let matcher: (Expression, FailureMessage) -> Bool + + public init(_ matcher: (Expression, FailureMessage) -> Bool) { + self.matcher = matcher + } + + public func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return matcher(actualExpression, failureMessage) + } +} + +public func fullMatcherFromBasicMatcher(matcher: M) -> FullMatcherFunc { + return FullMatcherFunc { actualExpression, failureMessage, expectingToNotMatch in + return matcher.matches(actualExpression, failureMessage: failureMessage) != expectingToNotMatch + } +} + +public func basicMatcherWithFailureMessage(matcher: M, postprocessor: (FailureMessage) -> Void) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + let result = matcher.matches(actualExpression, failureMessage: failureMessage) + postprocessor(failureMessage) + return result + } +} diff --git a/Pods/Nimble/Nimble/Wrappers/NonNilMatcherWrapper.swift b/Pods/Nimble/Nimble/Wrappers/NonNilMatcherWrapper.swift new file mode 100644 index 0000000..cbd40de --- /dev/null +++ b/Pods/Nimble/Nimble/Wrappers/NonNilMatcherWrapper.swift @@ -0,0 +1,56 @@ +struct NonNilMatcherWrapper: Matcher { + let matcher: M + let nilMessage = " (use beNil() to match nils)" + + init(_ matcher: M) { + self.matcher = matcher + } + + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + let pass = matcher.matches(actualExpression, failureMessage: failureMessage) + if actualExpression.evaluate() == nil { + failureMessage.postfixActual = nilMessage + return false + } + return pass + } + + func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + let pass = matcher.doesNotMatch(actualExpression, failureMessage: failureMessage) + if actualExpression.evaluate() == nil { + failureMessage.postfixActual = nilMessage + return false + } + return pass + } +} + +struct NonNilBasicMatcherWrapper: Matcher { + let matcher: M + + init(_ matcher: M) { + self.matcher = matcher + } + + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return matcher.matches(actualExpression, failureMessage: failureMessage) + } + + func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + return !matcher.matches(actualExpression, failureMessage: failureMessage) + } +} + +extension Expectation { + public func to(matcher: U) { + to(FullMatcherWrapper(matcher: NonNilMatcherWrapper(NonNilBasicMatcherWrapper(matcher)), to: "to", toNot: "to not")) + } + + public func toNot(matcher: U) { + toNot(FullMatcherWrapper(matcher: NonNilMatcherWrapper(NonNilBasicMatcherWrapper(matcher)), to: "to", toNot: "to not")) + } + + public func notTo(matcher: U) { + toNot(matcher) + } +} diff --git a/Pods/Nimble/Nimble/Wrappers/ObjCMatcher.swift b/Pods/Nimble/Nimble/Wrappers/ObjCMatcher.swift new file mode 100644 index 0000000..6f86a14 --- /dev/null +++ b/Pods/Nimble/Nimble/Wrappers/ObjCMatcher.swift @@ -0,0 +1,146 @@ +import Foundation + +struct ObjCMatcherWrapper : Matcher { + let matcher: NMBMatcher + let to: String + let toNot: String + + func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + failureMessage.to = to + return matcher.matches(({ actualExpression.evaluate() }), failureMessage: failureMessage, location: actualExpression.location) + } + + func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + failureMessage.to = toNot + return matcher.doesNotMatch(({ actualExpression.evaluate() }), failureMessage: failureMessage, location: actualExpression.location) + } +} + +// Equivalent to Expectation, but simplified for ObjC objects only +public class NMBExpectation : NSObject { + let _actualBlock: () -> NSObject! + var _negative: Bool + let _file: String + let _line: UInt + var _timeout: NSTimeInterval = 1.0 + + public init(actualBlock: () -> NSObject!, negative: Bool, file: String, line: UInt) { + self._actualBlock = actualBlock + self._negative = negative + self._file = file + self._line = line + } + + public var withTimeout: (NSTimeInterval) -> NMBExpectation { + return ({ timeout in self._timeout = timeout + return self + }) + } + + public var to: (matcher: NMBMatcher) -> Void { + return ({ matcher in + expect(file: self._file, line: self._line){ self._actualBlock() as NSObject? }.to( + ObjCMatcherWrapper(matcher: matcher, to: "to", toNot: "to not") + ) + }) + } + + public var toNot: (matcher: NMBMatcher) -> Void { + return ({ matcher in + expect(file: self._file, line: self._line){ self._actualBlock() as NSObject? }.toNot( + ObjCMatcherWrapper(matcher: matcher, to: "to", toNot: "to not") + ) + }) + } + + public var notTo: (matcher: NMBMatcher) -> Void { return toNot } + + public var toEventually: (matcher: NMBMatcher) -> Void { + return ({ matcher in + expect(file: self._file, line: self._line){ self._actualBlock() as NSObject? }.toEventually( + ObjCMatcherWrapper(matcher: matcher, to: "to", toNot: "to not"), + timeout: self._timeout + ) + }) + } + + public var toEventuallyNot: (matcher: NMBMatcher) -> Void { + return ({ matcher in + expect(file: self._file, line: self._line){ self._actualBlock() as NSObject? }.toEventuallyNot( + ObjCMatcherWrapper(matcher: matcher, to: "to", toNot: "to not"), + timeout: self._timeout + ) + }) + } +} + +typealias MatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage, location: SourceLocation) -> Bool +typealias FullMatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage, location: SourceLocation, shouldNotMatch: Bool) -> Bool +@objc public class NMBObjCMatcher : NMBMatcher { + let _match: MatcherBlock + let _doesNotMatch: MatcherBlock + let canMatchNil: Bool + + init(canMatchNil: Bool, matcher: MatcherBlock, notMatcher: MatcherBlock) { + self.canMatchNil = canMatchNil + self._match = matcher + self._doesNotMatch = notMatcher + } + + convenience init(matcher: MatcherBlock) { + self.init(canMatchNil: true, matcher: matcher) + } + + convenience init(canMatchNil: Bool, matcher: MatcherBlock) { + self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage, location in + return !matcher(actualExpression: actualExpression, failureMessage: failureMessage, location: location) + })) + } + + convenience init(matcher: FullMatcherBlock) { + self.init(canMatchNil: true, matcher: matcher) + } + + convenience init(canMatchNil: Bool, matcher: FullMatcherBlock) { + self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage, location in + return matcher(actualExpression: actualExpression, failureMessage: failureMessage, location: location, shouldNotMatch: false) + }), notMatcher: ({ actualExpression, failureMessage, location in + return matcher(actualExpression: actualExpression, failureMessage: failureMessage, location: location, shouldNotMatch: true) + })) + } + + private func canMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + if !canMatchNil && actualExpression.evaluate() == nil { + failureMessage.postfixActual = " (use beNil() to match nils)" + return false + } + return true + } + + public func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let expr = Expression(expression: actualBlock, location: SourceLocation()) + let result = _match( + actualExpression: expr, + failureMessage: failureMessage, + location: location) + 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: SourceLocation()) + let result = _doesNotMatch( + actualExpression: expr, + failureMessage: failureMessage, + location: location) + if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { + return result + } else { + return false + } + } +} + diff --git a/Pods/Nimble/Nimble/objc/DSL.h b/Pods/Nimble/Nimble/objc/DSL.h new file mode 100644 index 0000000..9c64486 --- /dev/null +++ b/Pods/Nimble/Nimble/objc/DSL.h @@ -0,0 +1,116 @@ +#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)(), const char *file, unsigned int line); + +NIMBLE_EXPORT id NMB_equal(id expectedValue); +NIMBLE_SHORT(id equal(id expectedValue), + NMB_equal(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_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_contain(id itemOrSubstring); +NIMBLE_SHORT(id contain(id itemOrSubstring), + NMB_contain(itemOrSubstring)); + +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)); + +// 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 NMBWaitUntilTimeoutBlock nmb_wait_until_timeout_builder(NSString *file, NSUInteger line); +NIMBLE_EXPORT NMBWaitUntilBlock nmb_wait_until_builder(NSString *file, NSUInteger line); + +#define NMB_waitUntilTimeout nmb_wait_until_timeout_builder(@(__FILE__), __LINE__) +#define NMB_waitUntil nmb_wait_until_builder(@(__FILE__), __LINE__) + +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define expect(...) NMB_expect(^id{ return (__VA_ARGS__); }, __FILE__, __LINE__) +#define expectAction(...) NMB_expect(^id{ (__VA_ARGS__); return nil; }, __FILE__, __LINE__) +#define waitUntilTimeout NMB_waitUntilTimeout +#define waitUntil NMB_waitUntil +#endif diff --git a/Pods/Nimble/Nimble/objc/DSL.m b/Pods/Nimble/Nimble/objc/DSL.m new file mode 100644 index 0000000..20af61d --- /dev/null +++ b/Pods/Nimble/Nimble/objc/DSL.m @@ -0,0 +1,101 @@ +#import +#import + +NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), const char *file, unsigned int line) { + return [[NMBExpectation alloc] initWithActualBlock:actualBlock + negative:NO + file:[[NSString alloc] initWithFormat:@"%s", 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_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_contain(id itemOrSubstring) { + return [NMBObjCMatcher containMatcher:itemOrSubstring]; +} + +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_match(id expectedValue) { + return [NMBObjCMatcher matchMatcher:expectedValue]; +} + +NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException() { + return [NMBObjCMatcher raiseExceptionMatcher]; +} + +NIMBLE_EXPORT NMBWaitUntilTimeoutBlock nmb_wait_until_timeout_builder(NSString *file, NSUInteger line) { + return ^(NSTimeInterval timeout, void (^action)(void (^)(void))) { + [NMBWait untilTimeout:timeout action:action file:file line:line]; + }; +} + +NIMBLE_EXPORT NMBWaitUntilBlock nmb_wait_until_builder(NSString *file, NSUInteger line) { + return ^(void (^action)(void (^)(void))) { + [NMBWait until:action file:file line:line]; + }; +} diff --git a/Pods/Nimble/Nimble/objc/NMBExceptionCapture.h b/Pods/Nimble/Nimble/objc/NMBExceptionCapture.h new file mode 100644 index 0000000..8be4a5a --- /dev/null +++ b/Pods/Nimble/Nimble/objc/NMBExceptionCapture.h @@ -0,0 +1,8 @@ +#import + +@interface NMBExceptionCapture : NSObject + +- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; +- (void)tryBlock:(void(^)())unsafeBlock; + +@end diff --git a/Pods/Nimble/Nimble/objc/NMBExceptionCapture.m b/Pods/Nimble/Nimble/objc/NMBExceptionCapture.m new file mode 100644 index 0000000..d19d5d9 --- /dev/null +++ b/Pods/Nimble/Nimble/objc/NMBExceptionCapture.m @@ -0,0 +1,35 @@ +#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 diff --git a/Pods/Nimble/README.md b/Pods/Nimble/README.md new file mode 100644 index 0000000..83cf199 --- /dev/null +++ b/Pods/Nimble/README.md @@ -0,0 +1,1010 @@ +# Nimble + +[![Build Status](https://travis-ci.org/Quick/Nimble.svg?branch=master)](https://travis-ci.org/Quick/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 + + + + +- [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) + - [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) + - [Exceptions](#exceptions) + - [Collection Membership](#collection-membership) + - [Strings](#strings) +- [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) + + + +# 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 + +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 + +expect(seagull.squawk).toNot(equal(@"Oh, hello there!")); +expect(seagull.squawk).notTo(equal(@"Oh, hello there!")); +``` + +## 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 evalaute 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. +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"})); +``` + +In Swift, the `expect` function can also take a trailing closure: + +```swift +// Swift + +expect { + exception.raise() +}.to(raiseException(named: 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")); +``` + +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(); +}); +``` + +## 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 + + 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 + +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)); +``` + +> `beIdenticalTo` only supports Objective-C objects: subclasses + of `NSObject`, or Swift objects bridged to Objective-C with the + `@objc` prefix. + +## 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, false, or an object with a boolean value of false: +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, false, or an object with a boolean value of false: +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()); +``` + +## 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)) +``` + +```objc +// Objective-C + +// Passes if actual, when evaluated, raises an exception: +expect(actual).to(raiseException()) +``` + +Note: Swift currently doesn't have exceptions. Only Objective-C code can raise +exceptions that Nimble will catch. + +> Sorry, [Nimble doesn't support matching on exception `name`, `reason`, or `userInfo` yet](https://github.com/Quick/Nimble/issues/26). + +## 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)) +``` + +# 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. In order to determine whether that value matches, +custom matchers should call `actualExpression.evalaute()`: + +```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. + +## 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, location 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 a pre-release +version of 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 your test target +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, we'll need to +install 0.36 Beta 1 of CocoaPods. Do so using the command `[sudo] gem install cocoapods --pre`. +Then just add Nimble to your podfile. + +```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 + pod 'Nimble' +end +``` + +Finally run `bundle exec pod install`. diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..51ea354 --- /dev/null +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,913 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 063E8FF4CDFCA6AE9064115D /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0532F94D7DEF51D97275BFBE /* Match.swift */; }; + 0C1C88128A14FB102A244FB2 /* Pods-cameraTests-Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 82048FF5F5EFF9305672C391 /* Pods-cameraTests-Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0DE457D3E7DBE1ACD5C3D501 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DF2111C551AF9DB8E1EF0D4 /* Functional.swift */; }; + 148835A4D3AFD1C2E5AD45B3 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 402ACB04DB1A0D5DFD74F095 /* Expression.swift */; }; + 1DA17DDB55A971E2DCE64EC1 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EEF62B2DD8F00333107ABD5 /* Callsite.swift */; }; + 1E5F0C6E0DDCFCD7F013E317 /* Pods-cameraTests-Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2563F2959D17BA2558043577 /* Pods-cameraTests-Nimble-dummy.m */; }; + 2045ABFCB6047AAABAFD5951 /* NonNilMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA0C0BEF285D56CF99F9BAFF /* NonNilMatcherWrapper.swift */; }; + 215CFF9F5CAFD9259A55DAA8 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD33B1DB349F34B4254F41C8 /* Stringers.swift */; }; + 24EC168BC53587C5BAA31DF8 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25C7D9460041796229179A6 /* DSL.swift */; }; + 2583C08B2B578208A1F3EF74 /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 471D38845FE2712C8D24E2B2 /* BeLogical.swift */; }; + 29767E33FB320295213ED819 /* Pods-cameraTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F41DDB356DAEA5AE9D68F607 /* Pods-cameraTests-dummy.m */; }; + 2B03C1417FFA9C18A8AB1AA0 /* Pods-cameraTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 319B45E19AE5060F26A16C98 /* Pods-cameraTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2C78C1C5EE6B462D3F98C015 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F2F7037B987C74A3ED1EBFB /* BeGreaterThanOrEqualTo.swift */; }; + 2DD2E38C9E6579166798FEDF /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = B20D631CE4DCBF504E55A2AE /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 31F138AF892521818A7A24DB /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EC533250C6B34D3F73A8823 /* DSL+Wait.swift */; }; + 4285DB510E4C2975EC76AB63 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFFBC02BB9B8B3867FC27FD8 /* Foundation.framework */; }; + 44983BE29EC5942CA81CC746 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7E8C66E5FDC940E269FA8EE /* ExampleMetadata.swift */; }; + 4588F215C7B4D62EB6D25B65 /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B396785B7F6615196840BDF /* NSString+QCKSelectorName.m */; }; + 469FB027B28EA5637451BCDA /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = C198515AF8C48951047C3943 /* BeNil.swift */; }; + 47D9B38EC06F0C2D754B30E8 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2CED32A84A0D0848A31C737 /* BeEmpty.swift */; }; + 4C8ACE662BA5A7740E9837F7 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB89177296F437C09E320EBB /* AsyncMatcherWrapper.swift */; }; + 55DDF0B03E9424CFFC3AF509 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 20E1F52A34452E4FA8C09B97 /* QuickSpec.m */; }; + 566FBD2A832342493B5E1248 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB09B9D379670E585AC1A13F /* Closures.swift */; }; + 5C2D96298D8C523D2D26EB3D /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 60F89AACA3CF3565890BBE49 /* QuickConfiguration.m */; }; + 5CAF4ACE6BA1C7452395D6A9 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 162A7C8BEFEDFC011A49B88B /* XCTest.framework */; }; + 5DADA0D163D6F2AB97923636 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505291DF2F3F7BAEC5C13A9A /* BeIdenticalTo.swift */; }; + 6E0F5AECCF6F03172F05E212 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = FE29350F14BE8900985973C3 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6FBFFFC70B42C58008662472 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D05A5AECA35165DB51FF23C /* ExampleHooks.swift */; }; + 805F293C8EBCB8B9DF9A72C3 /* Poll.swift in Sources */ = {isa = PBXBuildFile; fileRef = A38C289E43ECD26E8939591E /* Poll.swift */; }; + 83B6D03B51245190D8231710 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = C282D3D28C0BEC2EBC15A8DF /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8530A93B446712333274DC5C /* Pods-cameraTests-Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D55D3DF99DE7681A2BF29E48 /* Pods-cameraTests-Quick-dummy.m */; }; + 88941222651EFD5099091A80 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8630A26F9BAB2A785161489 /* AdapterProtocols.swift */; }; + 89BA35CC59B06F790F4FB74B /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB281C3837A207CC43C4BC7D /* World.swift */; }; + 8F595832DC35B61579EE169E /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C3A8A501FDD021511871A68 /* BeLessThan.swift */; }; + 90A1E3E113A4854CDE879B7A /* ObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D659BCCBEE7E6D07689459 /* ObjCMatcher.swift */; }; + 916B0B420F40CBBE80F1D53E /* Failure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F975D83EBDA345C8FFF01E3 /* Failure.swift */; }; + 91B8BA9DB5971B966053E3C7 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CA3099BFB4185F0F9767377 /* MatcherFunc.swift */; }; + 969C23D06E4FA1F290FE3246 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2389619E50745E53C4B52528 /* SuiteHooks.swift */; }; + 97D0996C4D453390EC72FB74 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFFBC02BB9B8B3867FC27FD8 /* Foundation.framework */; }; + 9A32003B9A5212D5DB5DD242 /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = DB8A4880FEBDC35E69C45749 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A0855A9E298477B377CCED81 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C5228EE1BA2EEDDFE07798C /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A0CA0C07D5BC4D70CD1CFA7F /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 023EDA9E6B95AB5CEC4B4486 /* ExampleGroup.swift */; }; + A3A73AA2DE52892441B7C07B /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = B618EB76AF4D043BB1CB23D5 /* World+DSL.swift */; }; + A53A614EA359BE4BC5E7A76F /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 521FFDC3BB0D3ACFAFB152C5 /* SourceLocation.swift */; }; + AC5A06E42BB74303D071D511 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6B9FF0BCC8962A6C65076A /* QCKDSL.m */; }; + B140E0F3305E9B616E69FE43 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15DD6B442275C14CAE3A1B66 /* Example.swift */; }; + B3AA544E38464E781C8CC293 /* FullMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10AAD1CDC0D3F5F3811E373F /* FullMatcherWrapper.swift */; }; + B456F2687494679DCC788F13 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8EA6DCEF3F2E5E57BF215C /* BeAnInstanceOf.swift */; }; + B4B2AE2237712BD5C19B0118 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = A2E5E3720B0C95643A807292 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C4BFDF7E8990139CB496F329 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9518ECD232456850752F53A9 /* BeAKindOf.swift */; }; + C7C750539B66C4A25629C408 /* XCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CCDAA183DD8D7743EA56A62 /* XCTestHandler.swift */; }; + CEED31385D717D6650D6215B /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ED460346C47D3AFFC6090B8 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D0571DA54BC746097B7E24DD /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45B2BB9B92C8802E08894181 /* Contain.swift */; }; + D222320726C05BFAA57F4125 /* Pods-cameraTests-Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 10D035D62A299B43E1A25EC5 /* Pods-cameraTests-Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D24F4280730F62EBA770A466 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 162A7C8BEFEDFC011A49B88B /* XCTest.framework */; }; + D4F6891916948345C4F34CB3 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 101E03BF1A34E5E7AF543F36 /* BeLessThanOrEqual.swift */; }; + DAC661C91F943606AAA50D08 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 32D1A8FF83A07B9D8E0829FF /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DAE797E73B09B1BC1949905F /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAE50AB5F905197F46BD849C /* Equal.swift */; }; + DD4A57F896D7155C9288D542 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 317BE5243B6AF2E8548397AA /* Configuration.swift */; }; + DEE1E683E8D1993467BD5A04 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 950BF84666ADF1BEDBD288E4 /* BeGreaterThan.swift */; }; + DF251E97102A9CA07892ADD9 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28C1AD18150646E02B4BA2B8 /* EndWith.swift */; }; + E5405948B5668C7744B2B500 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2998B2ADD9C42625B07F3AFF /* RaisesException.swift */; }; + E6B6A48E6BECCE0DFD34E181 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17C2C0AF2677DB9CAC6E081C /* MatcherProtocols.swift */; }; + E6D1ADBA50F5D37ED62DF0D0 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC12C064DC64767DF335152E /* Filter.swift */; }; + E92D205A4BFDC48A341C5303 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = CC8571A8C022144BCE3CA10A /* NMBExceptionCapture.m */; }; + E9FB65406B698DDAA6049113 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E16B6CB02D5174AFB2978EE /* BeginWith.swift */; }; + EA787861C31E6CF172E606A1 /* BasicMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F79813906738A2BD6AA38B /* BasicMatcherWrapper.swift */; }; + ED6EE4512210821BD4A7CCE5 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927BE526BA3C7C60EC6D1167 /* Expectation.swift */; }; + EEB52C99E3DBDD83F1358174 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = D826AAF28238AA855ABA32D0 /* DSL.swift */; }; + EEB7CEB54D7A73B5D6880666 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 1873C187F1C5BFEDF74A6BA3 /* DSL.m */; }; + EF0A2ACC9641B96FF65447F6 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83946110D73E44EF4F81113 /* BeCloseTo.swift */; }; + F024FD314F49ABBFB66A44D1 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33F8FE546E76EC71E1B4C24A /* AssertionRecorder.swift */; }; + F9A9F02544CEC452A4EC300D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFFBC02BB9B8B3867FC27FD8 /* Foundation.framework */; }; + FA95CE02552C5BE7B6B28522 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7218266BAAFAEDFC4DEED9E5 /* FailureMessage.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 37D85D4EDDBAF1915445F71D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 937304FB055E8B31CCE17C33 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 03098993B86EADB31B473BE6; + remoteInfo = "Pods-cameraTests-Nimble"; + }; + 7CA981DCCC17BAE34B95333C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 937304FB055E8B31CCE17C33 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 63EE31CFA4335E182795B62C; + remoteInfo = "Pods-cameraTests-Quick"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 012CF5B0C5FAFA77ED64A0D1 /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 023EDA9E6B95AB5CEC4B4486 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Quick/ExampleGroup.swift; sourceTree = ""; }; + 04C98A932ACA82234342D315 /* Pods-cameraTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-cameraTests-acknowledgements.plist"; sourceTree = ""; }; + 0532F94D7DEF51D97275BFBE /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Nimble/Matchers/Match.swift; sourceTree = ""; }; + 069BE081A378991AC5D4C293 /* Pods-cameraTests-Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-cameraTests-Quick.modulemap"; sourceTree = ""; }; + 08D659BCCBEE7E6D07689459 /* ObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObjCMatcher.swift; path = Nimble/Wrappers/ObjCMatcher.swift; sourceTree = ""; }; + 0AE7F2DBC9CCBE4489BA75DE /* Pods-cameraTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-cameraTests-acknowledgements.markdown"; sourceTree = ""; }; + 0E16B6CB02D5174AFB2978EE /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; + 101E03BF1A34E5E7AF543F36 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; + 10AAD1CDC0D3F5F3811E373F /* FullMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FullMatcherWrapper.swift; path = Nimble/Wrappers/FullMatcherWrapper.swift; sourceTree = ""; }; + 10D035D62A299B43E1A25EC5 /* Pods-cameraTests-Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-cameraTests-Quick-umbrella.h"; sourceTree = ""; }; + 15DD6B442275C14CAE3A1B66 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Quick/Example.swift; sourceTree = ""; }; + 15F79813906738A2BD6AA38B /* BasicMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BasicMatcherWrapper.swift; path = Nimble/Wrappers/BasicMatcherWrapper.swift; sourceTree = ""; }; + 162A7C8BEFEDFC011A49B88B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 17C2C0AF2677DB9CAC6E081C /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; + 1873C187F1C5BFEDF74A6BA3 /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Nimble/objc/DSL.m; sourceTree = ""; }; + 19609E67865F88C862DF57F9 /* Pods-cameraTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-cameraTests-resources.sh"; sourceTree = ""; }; + 1C3A8A501FDD021511871A68 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; + 1CA3099BFB4185F0F9767377 /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Nimble/Wrappers/MatcherFunc.swift; sourceTree = ""; }; + 1D8EA6DCEF3F2E5E57BF215C /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; + 20E1F52A34452E4FA8C09B97 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Quick/QuickSpec.m; sourceTree = ""; }; + 2389619E50745E53C4B52528 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; + 2563F2959D17BA2558043577 /* Pods-cameraTests-Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-cameraTests-Nimble-dummy.m"; sourceTree = ""; }; + 28C1AD18150646E02B4BA2B8 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Nimble/Matchers/EndWith.swift; sourceTree = ""; }; + 295C9B81917E2E66C4CB585F /* Pods-cameraTests-environment.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-cameraTests-environment.h"; sourceTree = ""; }; + 2998B2ADD9C42625B07F3AFF /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; + 2DF2111C551AF9DB8E1EF0D4 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Nimble/Utils/Functional.swift; sourceTree = ""; }; + 2E83D4416070EF016A049329 /* Pods-cameraTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-cameraTests.release.xcconfig"; sourceTree = ""; }; + 317BE5243B6AF2E8548397AA /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Quick/Configuration/Configuration.swift; sourceTree = ""; }; + 319B45E19AE5060F26A16C98 /* Pods-cameraTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-cameraTests-umbrella.h"; sourceTree = ""; }; + 32D1A8FF83A07B9D8E0829FF /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Quick/DSL/QCKDSL.h; sourceTree = ""; }; + 33F8FE546E76EC71E1B4C24A /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; + 3793683F5C9C8923253EC1D9 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3C5228EE1BA2EEDDFE07798C /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Nimble/objc/DSL.h; sourceTree = ""; }; + 402ACB04DB1A0D5DFD74F095 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Nimble/Expression.swift; sourceTree = ""; }; + 45B2BB9B92C8802E08894181 /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Nimble/Matchers/Contain.swift; sourceTree = ""; }; + 471D38845FE2712C8D24E2B2 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; + 4BA526DB9E85C442548416FF /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4ED460346C47D3AFFC6090B8 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Quick/Configuration/QuickConfiguration.h; sourceTree = ""; }; + 505291DF2F3F7BAEC5C13A9A /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; + 521FFDC3BB0D3ACFAFB152C5 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; + 5B396785B7F6615196840BDF /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Quick/NSString+QCKSelectorName.m"; sourceTree = ""; }; + 60F89AACA3CF3565890BBE49 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Quick/Configuration/QuickConfiguration.m; sourceTree = ""; }; + 6759F6DB7C918DCA172362CB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6E6B9FF0BCC8962A6C65076A /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Quick/DSL/QCKDSL.m; sourceTree = ""; }; + 7218266BAAFAEDFC4DEED9E5 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Nimble/FailureMessage.swift; sourceTree = ""; }; + 7B748F87FF3D770DF9007604 /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7DE5D16EBDF47FE756EFDD5F /* Pods-cameraTests-Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-cameraTests-Nimble.xcconfig"; sourceTree = ""; }; + 7EEF62B2DD8F00333107ABD5 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Quick/Callsite.swift; sourceTree = ""; }; + 7FD9B1694D7D39B422068BF9 /* Pods-cameraTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-cameraTests.debug.xcconfig"; sourceTree = ""; }; + 82048FF5F5EFF9305672C391 /* Pods-cameraTests-Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-cameraTests-Nimble-umbrella.h"; sourceTree = ""; }; + 87EC112C5F1B702FC4B3F370 /* Pods-cameraTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-cameraTests.modulemap"; sourceTree = ""; }; + 8D91B6199A9DEBE41D2FDA21 /* Pods_cameraTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_cameraTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8DDAB2D1C38A94C6D032404C /* Pods-cameraTests-Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-cameraTests-Quick-prefix.pch"; sourceTree = ""; }; + 8EC533250C6B34D3F73A8823 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Nimble/DSL+Wait.swift"; sourceTree = ""; }; + 8F2F7037B987C74A3ED1EBFB /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; + 927BE526BA3C7C60EC6D1167 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Nimble/Expectation.swift; sourceTree = ""; }; + 950BF84666ADF1BEDBD288E4 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + 9518ECD232456850752F53A9 /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; + 9CCDAA183DD8D7743EA56A62 /* XCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = XCTestHandler.swift; path = Nimble/Adapters/XCTestHandler.swift; sourceTree = ""; }; + 9D05A5AECA35165DB51FF23C /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + 9F975D83EBDA345C8FFF01E3 /* Failure.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Failure.swift; path = Quick/Failure.swift; sourceTree = ""; }; + A2E5E3720B0C95643A807292 /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Quick/Quick.h; sourceTree = ""; }; + A38C289E43ECD26E8939591E /* Poll.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Poll.swift; path = Nimble/Utils/Poll.swift; sourceTree = ""; }; + A8630A26F9BAB2A785161489 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; + AE55690197160BABCF839CF6 /* Pods-cameraTests-Nimble-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-cameraTests-Nimble-Private.xcconfig"; sourceTree = ""; }; + AFFBC02BB9B8B3867FC27FD8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + B08C633FA95B2863036438B9 /* Pods-cameraTests-Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-cameraTests-Quick.xcconfig"; sourceTree = ""; }; + B20D631CE4DCBF504E55A2AE /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Nimble/Nimble.h; sourceTree = ""; }; + B618EB76AF4D043BB1CB23D5 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Quick/DSL/World+DSL.swift"; sourceTree = ""; }; + B7E8C66E5FDC940E269FA8EE /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Quick/ExampleMetadata.swift; sourceTree = ""; }; + BB09B9D379670E585AC1A13F /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Quick/Hooks/Closures.swift; sourceTree = ""; }; + BB281C3837A207CC43C4BC7D /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Quick/World.swift; sourceTree = ""; }; + BD33B1DB349F34B4254F41C8 /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Nimble/Utils/Stringers.swift; sourceTree = ""; }; + BFEE86CD156B011635A2DCFD /* Pods-cameraTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-cameraTests-frameworks.sh"; sourceTree = ""; }; + C198515AF8C48951047C3943 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Nimble/Matchers/BeNil.swift; sourceTree = ""; }; + C282D3D28C0BEC2EBC15A8DF /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Quick/QuickSpec.h; sourceTree = ""; }; + C83946110D73E44EF4F81113 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; + CC8571A8C022144BCE3CA10A /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Nimble/objc/NMBExceptionCapture.m; sourceTree = ""; }; + D25C7D9460041796229179A6 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Nimble/DSL.swift; sourceTree = ""; }; + D2CED32A84A0D0848A31C737 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; + D55D3DF99DE7681A2BF29E48 /* Pods-cameraTests-Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-cameraTests-Quick-dummy.m"; sourceTree = ""; }; + D826AAF28238AA855ABA32D0 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Quick/DSL/DSL.swift; sourceTree = ""; }; + DA0C0BEF285D56CF99F9BAFF /* NonNilMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NonNilMatcherWrapper.swift; path = Nimble/Wrappers/NonNilMatcherWrapper.swift; sourceTree = ""; }; + DB89177296F437C09E320EBB /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Nimble/Wrappers/AsyncMatcherWrapper.swift; sourceTree = ""; }; + DB8A4880FEBDC35E69C45749 /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Quick/NSString+QCKSelectorName.h"; sourceTree = ""; }; + DFE1A82827C4DC004907D038 /* Pods-cameraTests-Quick-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-cameraTests-Quick-Private.xcconfig"; sourceTree = ""; }; + EB54E115C989CF89C6F59FDF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F41DDB356DAEA5AE9D68F607 /* Pods-cameraTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-cameraTests-dummy.m"; sourceTree = ""; }; + F5A2611FED51DF823BD66EFD /* Pods-cameraTests-Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-cameraTests-Nimble.modulemap"; sourceTree = ""; }; + F65674506659FCBD087F62FE /* Pods-cameraTests-Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-cameraTests-Nimble-prefix.pch"; sourceTree = ""; }; + FAE50AB5F905197F46BD849C /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Nimble/Matchers/Equal.swift; sourceTree = ""; }; + FC12C064DC64767DF335152E /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Quick/Filter.swift; sourceTree = ""; }; + FE29350F14BE8900985973C3 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Nimble/objc/NMBExceptionCapture.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 58094DDE21DBB51BC835A4A4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F9A9F02544CEC452A4EC300D /* Foundation.framework in Frameworks */, + 5CAF4ACE6BA1C7452395D6A9 /* XCTest.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6B1C7242D21308F1279EA301 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 97D0996C4D453390EC72FB74 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 71C74F61879210D969B8CFF5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4285DB510E4C2975EC76AB63 /* Foundation.framework in Frameworks */, + D24F4280730F62EBA770A466 /* XCTest.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08F881C603574785D738721C = { + isa = PBXGroup; + children = ( + 012CF5B0C5FAFA77ED64A0D1 /* Podfile */, + B15D4557820AE99A4D342CB4 /* Frameworks */, + 957D697A04C144323B10B143 /* Pods */, + B1E20CDBA0845824CB7F7AD0 /* Products */, + EB6DD5BB32A1AE1C45DA962C /* Targets Support Files */, + ); + sourceTree = ""; + }; + 3AD18E3BF6AE65FDD211F642 /* Nimble */ = { + isa = PBXGroup; + children = ( + A8630A26F9BAB2A785161489 /* AdapterProtocols.swift */, + 33F8FE546E76EC71E1B4C24A /* AssertionRecorder.swift */, + DB89177296F437C09E320EBB /* AsyncMatcherWrapper.swift */, + 15F79813906738A2BD6AA38B /* BasicMatcherWrapper.swift */, + 9518ECD232456850752F53A9 /* BeAKindOf.swift */, + 1D8EA6DCEF3F2E5E57BF215C /* BeAnInstanceOf.swift */, + C83946110D73E44EF4F81113 /* BeCloseTo.swift */, + D2CED32A84A0D0848A31C737 /* BeEmpty.swift */, + 950BF84666ADF1BEDBD288E4 /* BeGreaterThan.swift */, + 8F2F7037B987C74A3ED1EBFB /* BeGreaterThanOrEqualTo.swift */, + 505291DF2F3F7BAEC5C13A9A /* BeIdenticalTo.swift */, + 1C3A8A501FDD021511871A68 /* BeLessThan.swift */, + 101E03BF1A34E5E7AF543F36 /* BeLessThanOrEqual.swift */, + 471D38845FE2712C8D24E2B2 /* BeLogical.swift */, + C198515AF8C48951047C3943 /* BeNil.swift */, + 0E16B6CB02D5174AFB2978EE /* BeginWith.swift */, + 45B2BB9B92C8802E08894181 /* Contain.swift */, + 3C5228EE1BA2EEDDFE07798C /* DSL.h */, + 1873C187F1C5BFEDF74A6BA3 /* DSL.m */, + D25C7D9460041796229179A6 /* DSL.swift */, + 8EC533250C6B34D3F73A8823 /* DSL+Wait.swift */, + 28C1AD18150646E02B4BA2B8 /* EndWith.swift */, + FAE50AB5F905197F46BD849C /* Equal.swift */, + 927BE526BA3C7C60EC6D1167 /* Expectation.swift */, + 402ACB04DB1A0D5DFD74F095 /* Expression.swift */, + 7218266BAAFAEDFC4DEED9E5 /* FailureMessage.swift */, + 10AAD1CDC0D3F5F3811E373F /* FullMatcherWrapper.swift */, + 2DF2111C551AF9DB8E1EF0D4 /* Functional.swift */, + 0532F94D7DEF51D97275BFBE /* Match.swift */, + 1CA3099BFB4185F0F9767377 /* MatcherFunc.swift */, + 17C2C0AF2677DB9CAC6E081C /* MatcherProtocols.swift */, + FE29350F14BE8900985973C3 /* NMBExceptionCapture.h */, + CC8571A8C022144BCE3CA10A /* NMBExceptionCapture.m */, + B20D631CE4DCBF504E55A2AE /* Nimble.h */, + DA0C0BEF285D56CF99F9BAFF /* NonNilMatcherWrapper.swift */, + 08D659BCCBEE7E6D07689459 /* ObjCMatcher.swift */, + A38C289E43ECD26E8939591E /* Poll.swift */, + 2998B2ADD9C42625B07F3AFF /* RaisesException.swift */, + 521FFDC3BB0D3ACFAFB152C5 /* SourceLocation.swift */, + BD33B1DB349F34B4254F41C8 /* Stringers.swift */, + 9CCDAA183DD8D7743EA56A62 /* XCTestHandler.swift */, + C579C6A6E4BEE85A4FB9E7E3 /* Support Files */, + ); + path = Nimble; + sourceTree = ""; + }; + 53F4DB2DDDF3FC1008E4F3FC /* Quick */ = { + isa = PBXGroup; + children = ( + 7EEF62B2DD8F00333107ABD5 /* Callsite.swift */, + BB09B9D379670E585AC1A13F /* Closures.swift */, + 317BE5243B6AF2E8548397AA /* Configuration.swift */, + D826AAF28238AA855ABA32D0 /* DSL.swift */, + 15DD6B442275C14CAE3A1B66 /* Example.swift */, + 023EDA9E6B95AB5CEC4B4486 /* ExampleGroup.swift */, + 9D05A5AECA35165DB51FF23C /* ExampleHooks.swift */, + B7E8C66E5FDC940E269FA8EE /* ExampleMetadata.swift */, + 9F975D83EBDA345C8FFF01E3 /* Failure.swift */, + FC12C064DC64767DF335152E /* Filter.swift */, + DB8A4880FEBDC35E69C45749 /* NSString+QCKSelectorName.h */, + 5B396785B7F6615196840BDF /* NSString+QCKSelectorName.m */, + 32D1A8FF83A07B9D8E0829FF /* QCKDSL.h */, + 6E6B9FF0BCC8962A6C65076A /* QCKDSL.m */, + A2E5E3720B0C95643A807292 /* Quick.h */, + 4ED460346C47D3AFFC6090B8 /* QuickConfiguration.h */, + 60F89AACA3CF3565890BBE49 /* QuickConfiguration.m */, + C282D3D28C0BEC2EBC15A8DF /* QuickSpec.h */, + 20E1F52A34452E4FA8C09B97 /* QuickSpec.m */, + 2389619E50745E53C4B52528 /* SuiteHooks.swift */, + BB281C3837A207CC43C4BC7D /* World.swift */, + B618EB76AF4D043BB1CB23D5 /* World+DSL.swift */, + EED5FEA1196A4D1AF951C4CE /* Support Files */, + ); + path = Quick; + sourceTree = ""; + }; + 957D697A04C144323B10B143 /* Pods */ = { + isa = PBXGroup; + children = ( + 3AD18E3BF6AE65FDD211F642 /* Nimble */, + 53F4DB2DDDF3FC1008E4F3FC /* Quick */, + ); + name = Pods; + sourceTree = ""; + }; + A9B4B57B53606BB9CE6EB5BC /* Pods-cameraTests */ = { + isa = PBXGroup; + children = ( + 6759F6DB7C918DCA172362CB /* Info.plist */, + 87EC112C5F1B702FC4B3F370 /* Pods-cameraTests.modulemap */, + 0AE7F2DBC9CCBE4489BA75DE /* Pods-cameraTests-acknowledgements.markdown */, + 04C98A932ACA82234342D315 /* Pods-cameraTests-acknowledgements.plist */, + F41DDB356DAEA5AE9D68F607 /* Pods-cameraTests-dummy.m */, + 295C9B81917E2E66C4CB585F /* Pods-cameraTests-environment.h */, + BFEE86CD156B011635A2DCFD /* Pods-cameraTests-frameworks.sh */, + 19609E67865F88C862DF57F9 /* Pods-cameraTests-resources.sh */, + 319B45E19AE5060F26A16C98 /* Pods-cameraTests-umbrella.h */, + 7FD9B1694D7D39B422068BF9 /* Pods-cameraTests.debug.xcconfig */, + 2E83D4416070EF016A049329 /* Pods-cameraTests.release.xcconfig */, + ); + name = "Pods-cameraTests"; + path = "Target Support Files/Pods-cameraTests"; + sourceTree = ""; + }; + B15D4557820AE99A4D342CB4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + E12DDD9F4BE1C635F8E8936D /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + B1E20CDBA0845824CB7F7AD0 /* Products */ = { + isa = PBXGroup; + children = ( + 4BA526DB9E85C442548416FF /* Nimble.framework */, + 8D91B6199A9DEBE41D2FDA21 /* Pods_cameraTests.framework */, + 7B748F87FF3D770DF9007604 /* Quick.framework */, + ); + name = Products; + sourceTree = ""; + }; + C579C6A6E4BEE85A4FB9E7E3 /* Support Files */ = { + isa = PBXGroup; + children = ( + 3793683F5C9C8923253EC1D9 /* Info.plist */, + F5A2611FED51DF823BD66EFD /* Pods-cameraTests-Nimble.modulemap */, + 7DE5D16EBDF47FE756EFDD5F /* Pods-cameraTests-Nimble.xcconfig */, + AE55690197160BABCF839CF6 /* Pods-cameraTests-Nimble-Private.xcconfig */, + 2563F2959D17BA2558043577 /* Pods-cameraTests-Nimble-dummy.m */, + F65674506659FCBD087F62FE /* Pods-cameraTests-Nimble-prefix.pch */, + 82048FF5F5EFF9305672C391 /* Pods-cameraTests-Nimble-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/Pods-cameraTests-Nimble"; + sourceTree = ""; + }; + E12DDD9F4BE1C635F8E8936D /* iOS */ = { + isa = PBXGroup; + children = ( + AFFBC02BB9B8B3867FC27FD8 /* Foundation.framework */, + 162A7C8BEFEDFC011A49B88B /* XCTest.framework */, + ); + name = iOS; + sourceTree = ""; + }; + EB6DD5BB32A1AE1C45DA962C /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + A9B4B57B53606BB9CE6EB5BC /* Pods-cameraTests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + EED5FEA1196A4D1AF951C4CE /* Support Files */ = { + isa = PBXGroup; + children = ( + EB54E115C989CF89C6F59FDF /* Info.plist */, + 069BE081A378991AC5D4C293 /* Pods-cameraTests-Quick.modulemap */, + B08C633FA95B2863036438B9 /* Pods-cameraTests-Quick.xcconfig */, + DFE1A82827C4DC004907D038 /* Pods-cameraTests-Quick-Private.xcconfig */, + D55D3DF99DE7681A2BF29E48 /* Pods-cameraTests-Quick-dummy.m */, + 8DDAB2D1C38A94C6D032404C /* Pods-cameraTests-Quick-prefix.pch */, + 10D035D62A299B43E1A25EC5 /* Pods-cameraTests-Quick-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/Pods-cameraTests-Quick"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + A5BB95D35970C3C680F429C2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A0855A9E298477B377CCED81 /* DSL.h in Headers */, + 6E0F5AECCF6F03172F05E212 /* NMBExceptionCapture.h in Headers */, + 2DD2E38C9E6579166798FEDF /* Nimble.h in Headers */, + 0C1C88128A14FB102A244FB2 /* Pods-cameraTests-Nimble-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A9AF48F077E44AB8816A6B3A /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2B03C1417FFA9C18A8AB1AA0 /* Pods-cameraTests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B667064B3F9530CEE1FE0A09 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 9A32003B9A5212D5DB5DD242 /* NSString+QCKSelectorName.h in Headers */, + D222320726C05BFAA57F4125 /* Pods-cameraTests-Quick-umbrella.h in Headers */, + DAC661C91F943606AAA50D08 /* QCKDSL.h in Headers */, + B4B2AE2237712BD5C19B0118 /* Quick.h in Headers */, + CEED31385D717D6650D6215B /* QuickConfiguration.h in Headers */, + 83B6D03B51245190D8231710 /* QuickSpec.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 03098993B86EADB31B473BE6 /* Pods-cameraTests-Nimble */ = { + isa = PBXNativeTarget; + buildConfigurationList = BB79BEC5BA1769570BD1E7DD /* Build configuration list for PBXNativeTarget "Pods-cameraTests-Nimble" */; + buildPhases = ( + 763398E741FB1E12C12D84F2 /* Sources */, + 71C74F61879210D969B8CFF5 /* Frameworks */, + A5BB95D35970C3C680F429C2 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pods-cameraTests-Nimble"; + productName = "Pods-cameraTests-Nimble"; + productReference = 4BA526DB9E85C442548416FF /* Nimble.framework */; + productType = "com.apple.product-type.framework"; + }; + 13DE2AA1E6F090FB14C78F4F /* Pods-cameraTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5E163F4741EBD5093FF979A0 /* Build configuration list for PBXNativeTarget "Pods-cameraTests" */; + buildPhases = ( + A44FD4D3C268FE6ABFB86370 /* Sources */, + 6B1C7242D21308F1279EA301 /* Frameworks */, + A9AF48F077E44AB8816A6B3A /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 5A3678F527D62842A8BE1355 /* PBXTargetDependency */, + CB41BD7C70E50072C531B672 /* PBXTargetDependency */, + ); + name = "Pods-cameraTests"; + productName = "Pods-cameraTests"; + productReference = 8D91B6199A9DEBE41D2FDA21 /* Pods_cameraTests.framework */; + productType = "com.apple.product-type.framework"; + }; + 63EE31CFA4335E182795B62C /* Pods-cameraTests-Quick */ = { + isa = PBXNativeTarget; + buildConfigurationList = 80E8FCBE643252A34AECC2C1 /* Build configuration list for PBXNativeTarget "Pods-cameraTests-Quick" */; + buildPhases = ( + 1295A3CC72F95948B0E41FFA /* Sources */, + 58094DDE21DBB51BC835A4A4 /* Frameworks */, + B667064B3F9530CEE1FE0A09 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pods-cameraTests-Quick"; + productName = "Pods-cameraTests-Quick"; + productReference = 7B748F87FF3D770DF9007604 /* Quick.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 937304FB055E8B31CCE17C33 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0510; + }; + buildConfigurationList = 5769F664A8E3A93FFCE45473 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 08F881C603574785D738721C; + productRefGroup = B1E20CDBA0845824CB7F7AD0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13DE2AA1E6F090FB14C78F4F /* Pods-cameraTests */, + 03098993B86EADB31B473BE6 /* Pods-cameraTests-Nimble */, + 63EE31CFA4335E182795B62C /* Pods-cameraTests-Quick */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 1295A3CC72F95948B0E41FFA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1DA17DDB55A971E2DCE64EC1 /* Callsite.swift in Sources */, + 566FBD2A832342493B5E1248 /* Closures.swift in Sources */, + DD4A57F896D7155C9288D542 /* Configuration.swift in Sources */, + EEB52C99E3DBDD83F1358174 /* DSL.swift in Sources */, + B140E0F3305E9B616E69FE43 /* Example.swift in Sources */, + A0CA0C07D5BC4D70CD1CFA7F /* ExampleGroup.swift in Sources */, + 6FBFFFC70B42C58008662472 /* ExampleHooks.swift in Sources */, + 44983BE29EC5942CA81CC746 /* ExampleMetadata.swift in Sources */, + 916B0B420F40CBBE80F1D53E /* Failure.swift in Sources */, + E6D1ADBA50F5D37ED62DF0D0 /* Filter.swift in Sources */, + 4588F215C7B4D62EB6D25B65 /* NSString+QCKSelectorName.m in Sources */, + 8530A93B446712333274DC5C /* Pods-cameraTests-Quick-dummy.m in Sources */, + AC5A06E42BB74303D071D511 /* QCKDSL.m in Sources */, + 5C2D96298D8C523D2D26EB3D /* QuickConfiguration.m in Sources */, + 55DDF0B03E9424CFFC3AF509 /* QuickSpec.m in Sources */, + 969C23D06E4FA1F290FE3246 /* SuiteHooks.swift in Sources */, + A3A73AA2DE52892441B7C07B /* World+DSL.swift in Sources */, + 89BA35CC59B06F790F4FB74B /* World.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 763398E741FB1E12C12D84F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 88941222651EFD5099091A80 /* AdapterProtocols.swift in Sources */, + F024FD314F49ABBFB66A44D1 /* AssertionRecorder.swift in Sources */, + 4C8ACE662BA5A7740E9837F7 /* AsyncMatcherWrapper.swift in Sources */, + EA787861C31E6CF172E606A1 /* BasicMatcherWrapper.swift in Sources */, + C4BFDF7E8990139CB496F329 /* BeAKindOf.swift in Sources */, + B456F2687494679DCC788F13 /* BeAnInstanceOf.swift in Sources */, + EF0A2ACC9641B96FF65447F6 /* BeCloseTo.swift in Sources */, + 47D9B38EC06F0C2D754B30E8 /* BeEmpty.swift in Sources */, + DEE1E683E8D1993467BD5A04 /* BeGreaterThan.swift in Sources */, + 2C78C1C5EE6B462D3F98C015 /* BeGreaterThanOrEqualTo.swift in Sources */, + 5DADA0D163D6F2AB97923636 /* BeIdenticalTo.swift in Sources */, + 8F595832DC35B61579EE169E /* BeLessThan.swift in Sources */, + D4F6891916948345C4F34CB3 /* BeLessThanOrEqual.swift in Sources */, + 2583C08B2B578208A1F3EF74 /* BeLogical.swift in Sources */, + 469FB027B28EA5637451BCDA /* BeNil.swift in Sources */, + E9FB65406B698DDAA6049113 /* BeginWith.swift in Sources */, + D0571DA54BC746097B7E24DD /* Contain.swift in Sources */, + 31F138AF892521818A7A24DB /* DSL+Wait.swift in Sources */, + EEB7CEB54D7A73B5D6880666 /* DSL.m in Sources */, + 24EC168BC53587C5BAA31DF8 /* DSL.swift in Sources */, + DF251E97102A9CA07892ADD9 /* EndWith.swift in Sources */, + DAE797E73B09B1BC1949905F /* Equal.swift in Sources */, + ED6EE4512210821BD4A7CCE5 /* Expectation.swift in Sources */, + 148835A4D3AFD1C2E5AD45B3 /* Expression.swift in Sources */, + FA95CE02552C5BE7B6B28522 /* FailureMessage.swift in Sources */, + B3AA544E38464E781C8CC293 /* FullMatcherWrapper.swift in Sources */, + 0DE457D3E7DBE1ACD5C3D501 /* Functional.swift in Sources */, + 063E8FF4CDFCA6AE9064115D /* Match.swift in Sources */, + 91B8BA9DB5971B966053E3C7 /* MatcherFunc.swift in Sources */, + E6B6A48E6BECCE0DFD34E181 /* MatcherProtocols.swift in Sources */, + E92D205A4BFDC48A341C5303 /* NMBExceptionCapture.m in Sources */, + 2045ABFCB6047AAABAFD5951 /* NonNilMatcherWrapper.swift in Sources */, + 90A1E3E113A4854CDE879B7A /* ObjCMatcher.swift in Sources */, + 1E5F0C6E0DDCFCD7F013E317 /* Pods-cameraTests-Nimble-dummy.m in Sources */, + 805F293C8EBCB8B9DF9A72C3 /* Poll.swift in Sources */, + E5405948B5668C7744B2B500 /* RaisesException.swift in Sources */, + A53A614EA359BE4BC5E7A76F /* SourceLocation.swift in Sources */, + 215CFF9F5CAFD9259A55DAA8 /* Stringers.swift in Sources */, + C7C750539B66C4A25629C408 /* XCTestHandler.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A44FD4D3C268FE6ABFB86370 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29767E33FB320295213ED819 /* Pods-cameraTests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 5A3678F527D62842A8BE1355 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Pods-cameraTests-Nimble"; + target = 03098993B86EADB31B473BE6 /* Pods-cameraTests-Nimble */; + targetProxy = 37D85D4EDDBAF1915445F71D /* PBXContainerItemProxy */; + }; + CB41BD7C70E50072C531B672 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Pods-cameraTests-Quick"; + target = 63EE31CFA4335E182795B62C /* Pods-cameraTests-Quick */; + targetProxy = 7CA981DCCC17BAE34B95333C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 00239A09BAF338DE4756F37E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7FD9B1694D7D39B422068BF9 /* Pods-cameraTests.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-cameraTests/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/Pods-cameraTests/Pods-cameraTests.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_cameraTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 1B091D115A0C1092280F7931 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DFE1A82827C4DC004907D038 /* Pods-cameraTests-Quick-Private.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Pods-cameraTests-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/Pods-cameraTests-Quick/Pods-cameraTests-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; + }; + 20B00DF98765E75714720D04 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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 = "RELEASE=1"; + 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.0; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3C81ABF0EA0FFD687A137559 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE55690197160BABCF839CF6 /* Pods-cameraTests-Nimble-Private.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Pods-cameraTests-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/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Nimble; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 9E796F71A1E7451766EAB9AE /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE55690197160BABCF839CF6 /* Pods-cameraTests-Nimble-Private.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Pods-cameraTests-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/Pods-cameraTests-Nimble/Pods-cameraTests-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 = ""; + }; + name = Release; + }; + C6871B2830DDCE0A1BA3E7E4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2E83D4416070EF016A049329 /* Pods-cameraTests.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-cameraTests/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/Pods-cameraTests/Pods-cameraTests.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_cameraTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + DA520EE373392C6DFDFD3B98 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DFE1A82827C4DC004907D038 /* Pods-cameraTests-Quick-Private.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Pods-cameraTests-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/Pods-cameraTests-Quick/Pods-cameraTests-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; + }; + FFC7600F9623F21509735F5F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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 = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + 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.0; + ONLY_ACTIVE_ARCH = YES; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5769F664A8E3A93FFCE45473 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FFC7600F9623F21509735F5F /* Debug */, + 20B00DF98765E75714720D04 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5E163F4741EBD5093FF979A0 /* Build configuration list for PBXNativeTarget "Pods-cameraTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00239A09BAF338DE4756F37E /* Debug */, + C6871B2830DDCE0A1BA3E7E4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 80E8FCBE643252A34AECC2C1 /* Build configuration list for PBXNativeTarget "Pods-cameraTests-Quick" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DA520EE373392C6DFDFD3B98 /* Debug */, + 1B091D115A0C1092280F7931 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BB79BEC5BA1769570BD1E7DD /* Build configuration list for PBXNativeTarget "Pods-cameraTests-Nimble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3C81ABF0EA0FFD687A137559 /* Debug */, + 9E796F71A1E7451766EAB9AE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 937304FB055E8B31CCE17C33 /* Project object */; +} diff --git a/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests-Nimble.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests-Nimble.xcscheme new file mode 100644 index 0000000..ac6607b --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests-Nimble.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests-Quick.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests-Quick.xcscheme new file mode 100644 index 0000000..9b866fd --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests-Quick.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests.xcscheme new file mode 100644 index 0000000..ca5445c --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/Pods-cameraTests.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..a5b3adb --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,42 @@ + + + + + SchemeUserState + + Pods-cameraTests-Nimble.xcscheme + + isShown + + + Pods-cameraTests-Quick.xcscheme + + isShown + + + Pods-cameraTests.xcscheme + + isShown + + + + SuppressBuildableAutocreation + + 03098993B86EADB31B473BE6 + + primary + + + 13DE2AA1E6F090FB14C78F4F + + primary + + + 63EE31CFA4335E182795B62C + + primary + + + + + diff --git a/Pods/Quick/LICENSE b/Pods/Quick/LICENSE new file mode 100644 index 0000000..e900165 --- /dev/null +++ b/Pods/Quick/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014, Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Pods/Quick/Quick/Callsite.swift b/Pods/Quick/Quick/Callsite.swift new file mode 100644 index 0000000..c212a1a --- /dev/null +++ b/Pods/Quick/Quick/Callsite.swift @@ -0,0 +1,28 @@ +/** + An object encapsulating the file and line number at which + a particular example is defined. +*/ +@objc final public class Callsite: Equatable { + /** + 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: Int + + internal init(file: String, line: Int) { + 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/Pods/Quick/Quick/Configuration/Configuration.swift b/Pods/Quick/Quick/Configuration/Configuration.swift new file mode 100644 index 0000000..c31ee76 --- /dev/null +++ b/Pods/Quick/Quick/Configuration/Configuration.swift @@ -0,0 +1,147 @@ +/** + 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. +*/ +@objc final public class Configuration { + 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. + + :param: 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. + + :param: 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. + */ + @objc(beforeEachWithMetadata:) + public func beforeEach(closure: BeforeExampleWithMetadataClosure) { + exampleHooks.appendBefore(closure) + } + + /** + 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. + + :param: 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. + */ + @objc(afterEachWithMetadata:) + public func afterEach(closure: AfterExampleWithMetadataClosure) { + exampleHooks.appendAfter(closure) + } + + /** + 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. + + :param: 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/Pods/Quick/Quick/Configuration/QuickConfiguration.h b/Pods/Quick/Quick/Configuration/QuickConfiguration.h new file mode 100644 index 0000000..5646199 --- /dev/null +++ b/Pods/Quick/Quick/Configuration/QuickConfiguration.h @@ -0,0 +1,30 @@ +#import + +@class Configuration; + +/** + Subclass QuickConfiguration and override the +[QuickConfiguration configure:] + method in order to configure how Quick behaves when running specs, or to define + shared examples that are used across spec files. + */ +@interface QuickConfiguration : NSObject + +/** + This method is executed on each subclass of this class before Quick runs + any examples. You may override this method on as many subclasses as you like, but + there is no guarantee as to the order in which these methods are executed. + + You can override this method in order to: + + 1. Configure how Quick behaves, by modifying properties on the Configuration object. + Setting the same properties in several methods has undefined behavior. + + 2. Define shared examples using `sharedExamples`. + + @param configuration A mutable object that is used to configure how Quick behaves on + a framework level. For details on all the options, see the + documentation in Configuration.swift. + */ ++ (void)configure:(Configuration *)configuration; + +@end diff --git a/Pods/Quick/Quick/Configuration/QuickConfiguration.m b/Pods/Quick/Quick/Configuration/QuickConfiguration.m new file mode 100644 index 0000000..6479226 --- /dev/null +++ b/Pods/Quick/Quick/Configuration/QuickConfiguration.m @@ -0,0 +1,83 @@ +#import "QuickConfiguration.h" +#import +#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/Pods/Quick/Quick/DSL/DSL.swift b/Pods/Quick/Quick/DSL/DSL.swift new file mode 100644 index 0000000..dc2f31e --- /dev/null +++ b/Pods/Quick/Quick/DSL/DSL.swift @@ -0,0 +1,227 @@ +/** + 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. +*/ +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. + + :param: 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. + + :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`). +*/ +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. + + :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`). + + 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. + + :param: description An arbitrary string describing the example group. + :param: closure A closure that can contain other examples. + :param: flags A mapping of string keys to booleans that can be used to filter examples or example groups. +*/ +public func describe(description: String, closure: () -> (), flags: FilterFlags = [:]) { + World.sharedWorld().describe(description, closure: closure, flags: flags) +} + +/** + Defines an example group. Equivalent to `describe`. +*/ +public func context(description: String, closure: () -> (), flags: FilterFlags = [:]) { + describe(description, closure, flags: flags) +} + +/** + 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. +*/ +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. + + :param: 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. + + :param: description An arbitrary string describing what the example is meant to specify. + :param: closure A closure that can contain assertions. + :param: flags A mapping of string keys to booleans that can be used to filter examples or example groups. + Empty by default. + :param: file The absolute path to the file containing the example. A sensible default is provided. + :param: line The line containing the example. A sensible default is provided. +*/ +public func it(description: String, closure: () -> (), flags: FilterFlags = [:], file: String = __FILE__, line: Int = __LINE__) { + 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. + + :param: 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. + :param: flags A mapping of string keys to booleans that can be used to filter examples or example groups. + Empty by default. + :param: file The absolute path to the file containing the current example group. A sensible default is provided. + :param: line The line containing the current example group. A sensible default is provided. +*/ +public func itBehavesLike(name: String, flags: FilterFlags = [:], file: String = __FILE__, line: Int = __LINE__) { + itBehavesLike(name, { return [:] }, flags: flags, file: file, line: line) +} + +/** + 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. + + :param: 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. + :param: sharedExampleContext A closure that, when evaluated, returns key-value pairs that provide the + shared examples with extra information on the subject of the example. + :param: flags A mapping of string keys to booleans that can be used to filter examples or example groups. + Empty by default. + :param: file The absolute path to the file containing the current example group. A sensible default is provided. + :param: line The line containing the current example group. A sensible default is provided. +*/ +public func itBehavesLike(name: String, sharedExampleContext: SharedExampleContext, flags: FilterFlags = [:], file: String = __FILE__, line: Int = __LINE__) { + 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. + + :param: description An arbitrary string describing the example or example group. + :param: 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, closure: () -> (), flags: FilterFlags) { + World.sharedWorld().xdescribe(description, closure: closure, flags: flags) +} + +/** + Use this to quickly mark a `context` closure as pending. + This disables all examples within the closure. +*/ +public func xcontext(description: String, closure: () -> (), flags: FilterFlags) { + xdescribe(description, closure, flags) +} + +/** + 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, closure: () -> (), flags: FilterFlags = [:], file: String = __FILE__, line: Int = __LINE__) { + 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, closure: () -> (), flags: FilterFlags = [:]) { + World.sharedWorld().fdescribe(description, closure: closure, flags: flags) +} + +/** + Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. +*/ +public func fcontext(description: String, closure: () -> (), flags: FilterFlags = [:]) { + fdescribe(description, closure, flags: flags) +} + +/** + 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, closure: () -> (), flags: FilterFlags = [:], file: String = __FILE__, line: Int = __LINE__) { + World.sharedWorld().fit(description, flags: flags, file: file, line: line, closure: closure) +} diff --git a/Pods/Quick/Quick/DSL/QCKDSL.h b/Pods/Quick/Quick/DSL/QCKDSL.h new file mode 100644 index 0000000..7e63cbd --- /dev/null +++ b/Pods/Quick/Quick/DSL/QCKDSL.h @@ -0,0 +1,211 @@ +#import + +/** + 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); + +extern void qck_beforeSuite(QCKDSLEmptyBlock closure); +extern void qck_afterSuite(QCKDSLEmptyBlock closure); +extern void qck_sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure); +extern void qck_describe(NSString *description, QCKDSLEmptyBlock closure); +extern void qck_context(NSString *description, QCKDSLEmptyBlock closure); +extern void qck_beforeEach(QCKDSLEmptyBlock closure); +extern void qck_afterEach(QCKDSLEmptyBlock closure); +extern void qck_pending(NSString *description, QCKDSLEmptyBlock closure); +extern void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure); +extern void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure); +extern void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure); +extern 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); +} + +/** + 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); +} + +/** + 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); + +extern QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line); +extern QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line); diff --git a/Pods/Quick/Quick/DSL/QCKDSL.m b/Pods/Quick/Quick/DSL/QCKDSL.m new file mode 100644 index 0000000..6b7d1f3 --- /dev/null +++ b/Pods/Quick/Quick/DSL/QCKDSL.m @@ -0,0 +1,70 @@ +#import "QCKDSL.h" +#import + +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 closure:closure flags:@{}]; +} + +void qck_context(NSString *description, QCKDSLEmptyBlock closure) { + qck_describe(description, closure); +} + +void qck_beforeEach(QCKDSLEmptyBlock closure) { + [[World sharedWorld] beforeEach:closure]; +} + +void qck_afterEach(QCKDSLEmptyBlock closure) { + [[World sharedWorld] afterEach: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 closure:closure flags:@{}]; +} + +void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure) { + qck_xdescribe(description, closure); +} + +void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] fdescribe:description closure:closure flags:@{}]; +} + +void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure) { + qck_fdescribe(description, closure); +} diff --git a/Pods/Quick/Quick/DSL/World+DSL.swift b/Pods/Quick/Quick/DSL/World+DSL.swift new file mode 100644 index 0000000..842963b --- /dev/null +++ b/Pods/Quick/Quick/DSL/World+DSL.swift @@ -0,0 +1,100 @@ +/** + 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 { + public func beforeSuite(closure: BeforeSuiteClosure) { + suiteHooks.appendBefore(closure) + } + + public func afterSuite(closure: AfterSuiteClosure) { + suiteHooks.appendAfter(closure) + } + + public func sharedExamples(name: String, closure: SharedExampleClosure) { + registerSharedExample(name, closure: closure) + } + + public func describe(description: String, closure: () -> (), flags: FilterFlags) { + var group = ExampleGroup(description: description, flags: flags) + currentExampleGroup!.appendExampleGroup(group) + currentExampleGroup = group + closure() + currentExampleGroup = group.parent + } + + public func context(description: String, closure: () -> (), flags: FilterFlags) { + self.describe(description, closure: closure, flags: flags) + } + + public func fdescribe(description: String, closure: () -> (), flags: FilterFlags) { + var focusedFlags = flags + focusedFlags[Filter.focused] = true + self.describe(description, closure: closure, flags: focusedFlags) + } + + public func xdescribe(description: String, closure: () -> (), flags: FilterFlags) { + var pendingFlags = flags + pendingFlags[Filter.pending] = true + self.describe(description, closure: closure, flags: pendingFlags) + } + + public func beforeEach(closure: BeforeExampleClosure) { + currentExampleGroup!.hooks.appendBefore(closure) + } + + public func beforeEach(#closure: BeforeExampleWithMetadataClosure) { + currentExampleGroup!.hooks.appendBefore(closure) + } + + public func afterEach(closure: AfterExampleClosure) { + currentExampleGroup!.hooks.appendAfter(closure) + } + + public func afterEach(#closure: AfterExampleWithMetadataClosure) { + currentExampleGroup!.hooks.appendAfter(closure) + } + + @objc(itWithDescription:flags:file:line:closure:) + public func it(description: String, flags: FilterFlags, file: String, line: Int, closure: () -> ()) { + let callsite = Callsite(file: file, line: line) + let example = Example(description: description, callsite: callsite, flags: flags, closure) + currentExampleGroup!.appendExample(example) + } + + @objc(fitWithDescription:flags:file:line:closure:) + public func fit(description: String, flags: FilterFlags, file: String, line: Int, closure: () -> ()) { + var focusedFlags = flags + focusedFlags[Filter.focused] = true + self.it(description, flags: focusedFlags, file: file, line: line, closure: closure) + } + + @objc(xitWithDescription:flags:file:line:closure:) + public func xit(description: String, flags: FilterFlags, file: String, line: Int, closure: () -> ()) { + var pendingFlags = flags + pendingFlags[Filter.pending] = true + self.it(description, flags: pendingFlags, file: file, line: line, closure: closure) + } + + @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:flags:file:line:) + public func itBehavesLike(name: String, sharedExampleContext: SharedExampleContext, flags: FilterFlags, file: String, line: Int) { + let callsite = Callsite(file: file, line: line) + let closure = World.sharedWorld().sharedExample(name) + + var group = ExampleGroup(description: name, flags: flags) + currentExampleGroup!.appendExampleGroup(group) + currentExampleGroup = group + closure(sharedExampleContext) + currentExampleGroup!.walkDownExamples { (example: Example) in + example.isSharedExample = true + example.callsite = callsite + } + + currentExampleGroup = group.parent + } + + public func pending(description: String, closure: () -> ()) { + println("Pending: \(description)") + } +} diff --git a/Pods/Quick/Quick/Example.swift b/Pods/Quick/Quick/Example.swift new file mode 100644 index 0000000..78d935f --- /dev/null +++ b/Pods/Quick/Quick/Example.swift @@ -0,0 +1,103 @@ +private var numberOfExamplesRun = 0 + +/** + Examples, defined with the `it` function, use assertions to + demonstrate how code should behave. These are like "tests" in XCTest. +*/ +@objc final public class Example: Equatable { + /** + 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 description: String + private let closure: () -> () + private let flags: FilterFlags + + internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: () -> ()) { + self.description = description + self.closure = closure + self.callsite = callsite + self.flags = flags + } + + /** + 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) + for before in group!.befores { + before(exampleMetadata: exampleMetadata) + } + + closure() + + for after in group!.afters { + after(exampleMetadata: exampleMetadata) + } + world.exampleHooks.executeAfters(exampleMetadata) + + ++numberOfExamplesRun + + if !world.isRunningAdditionalSuites && numberOfExamplesRun >= world.exampleCount { + 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/Pods/Quick/Quick/ExampleGroup.swift b/Pods/Quick/Quick/ExampleGroup.swift new file mode 100644 index 0000000..ecd6738 --- /dev/null +++ b/Pods/Quick/Quick/ExampleGroup.swift @@ -0,0 +1,97 @@ +/** + Example groups are logical groupings of examples, defined with + the `describe` and `context` functions. Example groups can share + setup and teardown code. +*/ +@objc final public class ExampleGroup { + weak internal var parent: ExampleGroup? + internal let hooks = ExampleHooks() + + private let description: 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.description = description + self.flags = flags + self.isInternalRootExampleGroup = isInternalRootExampleGroup + } + + /** + 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.extend(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 = hooks.befores.reverse() + walkUp() { (group: ExampleGroup) -> () in + closures.extend(group.hooks.befores.reverse()) + } + return closures.reverse() + } + + internal var afters: [AfterExampleWithMetadataClosure] { + var closures = hooks.afters + walkUp() { (group: ExampleGroup) -> () in + closures.extend(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/Pods/Quick/Quick/ExampleMetadata.swift b/Pods/Quick/Quick/ExampleMetadata.swift new file mode 100644 index 0000000..d46605e --- /dev/null +++ b/Pods/Quick/Quick/ExampleMetadata.swift @@ -0,0 +1,22 @@ +/** + A class that encapsulates information about an example, + including the index at which the example was executed, as + well as the example itself. +*/ +@objc final public class ExampleMetadata { + /** + 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/Pods/Quick/Quick/Failure.swift b/Pods/Quick/Quick/Failure.swift new file mode 100644 index 0000000..ff7e4ca --- /dev/null +++ b/Pods/Quick/Quick/Failure.swift @@ -0,0 +1,16 @@ +import Foundation + +@objc final class Failure { + let callsite: Callsite + let exception: NSException + + init(exception: NSException, callsite: Callsite) { + self.exception = exception + self.callsite = callsite + } + + @objc(failureWithException:callsite:) + class func failure(exception: NSException, callsite: Callsite) -> Failure { + return Failure(exception: exception, callsite: callsite) + } +} diff --git a/Pods/Quick/Quick/Filter.swift b/Pods/Quick/Quick/Filter.swift new file mode 100644 index 0000000..3bdb0fe --- /dev/null +++ b/Pods/Quick/Quick/Filter.swift @@ -0,0 +1,29 @@ +/** + 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. +*/ +@objc(QCKFilter) final public class Filter { + /** + 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/Pods/Quick/Quick/Hooks/Closures.swift b/Pods/Quick/Quick/Hooks/Closures.swift new file mode 100644 index 0000000..3252bbf --- /dev/null +++ b/Pods/Quick/Quick/Hooks/Closures.swift @@ -0,0 +1,35 @@ +// 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/Pods/Quick/Quick/Hooks/ExampleHooks.swift b/Pods/Quick/Quick/Hooks/ExampleHooks.swift new file mode 100644 index 0000000..75c9123 --- /dev/null +++ b/Pods/Quick/Quick/Hooks/ExampleHooks.swift @@ -0,0 +1,36 @@ +/** + 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 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) { + for before in befores { + before(exampleMetadata: exampleMetadata) + } + } + + internal func executeAfters(exampleMetadata: ExampleMetadata) { + for after in afters { + after(exampleMetadata: exampleMetadata) + } + } +} diff --git a/Pods/Quick/Quick/Hooks/SuiteHooks.swift b/Pods/Quick/Quick/Hooks/SuiteHooks.swift new file mode 100644 index 0000000..5e09702 --- /dev/null +++ b/Pods/Quick/Quick/Hooks/SuiteHooks.swift @@ -0,0 +1,34 @@ +/** + A container for closures to be executed before and after all examples. +*/ +final internal class SuiteHooks { + internal var befores: [BeforeSuiteClosure] = [] + internal var beforesAlreadyExecuted = false + + internal var afters: [AfterSuiteClosure] = [] + internal var aftersAlreadyExecuted = false + + internal func appendBefore(closure: BeforeSuiteClosure) { + befores.append(closure) + } + + internal func appendAfter(closure: AfterSuiteClosure) { + afters.append(closure) + } + + internal func executeBefores() { + assert(!beforesAlreadyExecuted) + for before in befores { + before() + } + beforesAlreadyExecuted = true + } + + internal func executeAfters() { + assert(!aftersAlreadyExecuted) + for after in afters { + after() + } + aftersAlreadyExecuted = true + } +} diff --git a/Pods/Quick/Quick/NSString+QCKSelectorName.h b/Pods/Quick/Quick/NSString+QCKSelectorName.h new file mode 100644 index 0000000..2da524e --- /dev/null +++ b/Pods/Quick/Quick/NSString+QCKSelectorName.h @@ -0,0 +1,17 @@ +#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/Pods/Quick/Quick/NSString+QCKSelectorName.m b/Pods/Quick/Quick/NSString+QCKSelectorName.m new file mode 100644 index 0000000..8cf187d --- /dev/null +++ b/Pods/Quick/Quick/NSString+QCKSelectorName.m @@ -0,0 +1,33 @@ +#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]; + + return [validComponents componentsJoinedByString:@"_"]; +} + +@end diff --git a/Pods/Quick/Quick/Quick.h b/Pods/Quick/Quick/Quick.h new file mode 100644 index 0000000..0c1b72d --- /dev/null +++ b/Pods/Quick/Quick/Quick.h @@ -0,0 +1,13 @@ +#import + +//! Project version number for Quick. +FOUNDATION_EXPORT double QuickVersionNumber; + +//! Project version string for Quick. +FOUNDATION_EXPORT const unsigned char QuickVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import diff --git a/Pods/Quick/Quick/QuickSpec.h b/Pods/Quick/Quick/QuickSpec.h new file mode 100644 index 0000000..08d0079 --- /dev/null +++ b/Pods/Quick/Quick/QuickSpec.h @@ -0,0 +1,48 @@ +#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. + + override class func spec() { + describe("winter") { + it("is coming") { + // ... + } + } + } + + See DSL.swift for more information on what syntax is available. + */ +- (void)spec; + +@end diff --git a/Pods/Quick/Quick/QuickSpec.m b/Pods/Quick/Quick/QuickSpec.m new file mode 100644 index 0000000..3b2ef10 --- /dev/null +++ b/Pods/Quick/Quick/QuickSpec.m @@ -0,0 +1,142 @@ +#import "QuickSpec.h" +#import "QuickConfiguration.h" +#import "NSString+QCKSelectorName.h" +#import +#import + +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.currentExampleGroup = [world rootExampleGroupForSpecClass:[self class]]; + 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]; + } +} + +/** + 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]]; + for (Example *example in examples) { + SEL selector = [self addInstanceMethodForExample:example]; + 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 { + IMP implementation = imp_implementationWithBlock(^(id self){ + [example run]; + }); + const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(id), @encode(id), @encode(SEL)] UTF8String]; + SEL selector = NSSelectorFromString(example.name.qck_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; + } + [super recordFailureWithDescription:description + inFile:filePath + atLine:lineNumber + expected:expected]; +} + +@end diff --git a/Pods/Quick/Quick/World.swift b/Pods/Quick/Quick/World.swift new file mode 100644 index 0000000..68110b4 --- /dev/null +++ b/Pods/Quick/Quick/World.swift @@ -0,0 +1,197 @@ +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. +*/ +@objc final public class World { + /** + 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. + */ + public 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. + */ + + public 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. + */ + public 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 init() {} + private struct Shared { + static let instance = World() + } + public class func sharedWorld() -> World { + return Shared.instance + } + + // 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. + + :param: closure A closure that takes a Configuration object that can + be mutated to change Quick's behavior. + */ + public 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. + */ + public 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") {} + } + + :param: cls The QuickSpec class for which to retrieve the root example group. + :returns: The root example group for the class. + */ + public func rootExampleGroupForSpecClass(cls: AnyClass) -> ExampleGroup { + let name = NSStringFromClass(cls) + if let group = specs[name] { + return group + } else { + let group = ExampleGroup( + description: "root example group", + flags: [:], + isInternalRootExampleGroup: true + ) + specs[name] = group + return group + } + } + + /** + Returns all examples that should be run for a given spec class. + There are two filtering passes that occur when determining which examples should be run. + That is, these examples are the ones that are included by inclusion filters, and are + not excluded by exclusion filters. + + :param: specClass The QuickSpec subclass for which examples are to be returned. + :returns: A list of examples to be run as test invocations. + */ + @objc(examplesForSpecClass:) + public 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 { contains(included, $0) } + // 3. Remove all excluded examples. + return spec.filter { example in + !self.configuration.exclusionFilters.reduce(false) { $0 || $1(example: example) } + } + } + + // 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 exampleCount: Int { + return allExamples.count + } + + 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 { + NSException(name: NSInternalInconsistencyException, + reason: "A shared example named '\(name)' has already been registered.", + userInfo: nil).raise() + } + } + + private func raiseIfSharedExampleNotRegistered(name: String) { + if sharedExamples[name] == nil { + NSException(name: NSInternalInconsistencyException, + reason: "No shared example named '\(name)' has been registered. Registered shared examples: '\(Array(sharedExamples.keys))'", + userInfo: nil).raise() + } + } +} diff --git a/Pods/Quick/README.md b/Pods/Quick/README.md new file mode 100644 index 0000000..1c1066f --- /dev/null +++ b/Pods/Quick/README.md @@ -0,0 +1,1165 @@ +![](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). + +[![Build Status](https://travis-ci.org/Quick/Quick.svg)](https://travis-ci.org/Quick/Quick) + +![](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 table of contents below") { + it("has everything you need to get started") { + let sections = TableOfContents().sections + expect(sections).to(contain("Quick: Examples and Example Groups")) + expect(sections).to(contain("Nimble: Assertions using expect(...).to")) + expect(sections).to(contain("How to Install 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()) + } + } + } + } +} +``` + +# How to Use Quick + + + + +- [Quick: Examples and Example Groups](#quick-examples-and-example-groups) + - [Examples Using `it`](#examples-using-it) + - [Example Groups Using `describe` and `context`](#example-groups-using-describe-and-context) + - [Describing Classes and Methods Using `describe`](#describing-classes-and-methods-using-describe) + - [Sharing Setup/Teardown Code Using `beforeEach` and `afterEach`](#sharing-setupteardown-code-using-beforeeach-and-aftereach) + - [Specifying Conditional Behavior Using `context`](#specifying-conditional-behavior-using-context) + - [Temporarily Disabling Examples or Groups Using `pending`](#temporarily-disabling-examples-or-groups-using-pending) + - [Shorthand syntax](#shorthand-syntax) + - [Temporarily Running a Subset of Focused Examples](#temporarily-running-a-subset-of-focused-examples) + - [Global Setup/Teardown Using `beforeSuite` and `afterSuite`](#global-setupteardown-using-beforesuite-and-aftersuite) + - [Sharing Examples](#sharing-examples) +- [Using Quick in Objective-C: The Optional Shorthand Syntax](#using-quick-in-objective-c-the-optional-shorthand-syntax) + - [Caveat: Your Test Target Must Include At Least One Swift File](#caveat-your-test-target-must-include-at-least-one-swift-file) +- [Nimble: Assertions Using `expect(...).to`](#nimble-assertions-using-expectto) +- [Testing Swift Code](#testing-swift-code) +- [Testing UIKit with Quick](#testing-uikit-with-quick) +- [How to Install Quick](#how-to-install-quick) + - [1. Clone the Quick and Nimble repositories](#1-clone-the-quick-and-nimble-repositories) + - [2. Add `Quick.xcodeproj` and `Nimble.xcodeproj` to your test target](#2-add-quickxcodeproj-and-nimblexcodeproj-to-your-test-target) + - [3. Link `Quick.framework` and `Nimble.framework`](#3-link-quickframework-and-nimbleframework) + - [4. Start writing specs!](#4-start-writing-specs) +- [Including Quick in a Git Repository Using Submodules](#including-quick-in-a-git-repository-using-submodules) + - [Adding Quick as a Git Submodule](#adding-quick-as-a-git-submodule) + - [Updating the Quick Submodule](#updating-the-quick-submodule) + - [Cloning a Repository that Includes a Quick Submodule](#cloning-a-repository-that-includes-a-quick-submodule) +- [How to Install Quick using CocoaPods](#how-to-install-quick-using-cocoapods) +- [How to Install Quick File Templates](#how-to-install-quick-file-templates) + - [Using Alcatraz](#using-alcatraz) + - [Manually via the Rakefile](#manually-via-the-rakefile) +- [Configuring Quick](#configuring-quick) + - [Adding Global Before and After Filters](#adding-global-before-and-after-filters) +- [Who Uses Quick](#who-uses-quick) +- [License](#license) + + + +## Quick: Examples and Example Groups + +Quick uses a special syntax to define **examples** and **example groups**. + +### Examples Using `it` + +Examples, defined with the `it` function, use assertions to demonstrate +how code should behave. These are like "tests" in XCTest. + +`it` takes two parameters: the name of the example, and a closure. +The examples below specify how the `Dolphin` class should behave. +A new dolphin should be smart and friendly: + +```swift +// Swift + +import Quick +import Nimble + +class DolphinSpec: QuickSpec { + override func spec() { + it("is friendly") { + expect(Dolphin().isFriendly).to(beTruthy()) + } + + it("is smart") { + expect(Dolphin().isSmart).to(beTruthy()) + } + } +} +``` + +```objc +// Objective-C + +#import +#import + +QuickSpecBegin(DolphinSpec) + +it(@"is friendly", ^{ + expect(@([[Dolphin new] isFriendly])).to(beTruthy()); +}); + +it(@"is smart", ^{ + expect(@([[Dolphin new] isSmart])).to(beTruthy()); +}); + +QuickSpecEnd +``` + +> Descriptions can use any character, including characters from languages + besides English, or even emoji! :v: :sunglasses: + +### Example Groups Using `describe` and `context` + +Example groups are logical groupings of examples. Example groups can share +setup and teardown code. + +#### Describing Classes and Methods Using `describe` + +To specify the behavior of the `Dolphin` class's `click` method--in +other words, to test the method works--several `it` examples can be +grouped together using the `describe` function. Grouping similar +examples together makes the spec easier to read: + +```swift +// Swift + +import Quick +import Nimble + +class DolphinSpec: QuickSpec { + override func spec() { + describe("a dolphin") { + describe("its click") { + it("is loud") { + let click = Dolphin().click() + expect(click.isLoud).to(beTruthy()) + } + + it("has a high frequency") { + let click = Dolphin().click() + expect(click.hasHighFrequency).to(beTruthy()) + } + } + } + } +} +``` + +```objc +// Objective-C + +#import +#import + +QuickSpecBegin(DolphinSpec) + +describe(@"a dolphin", ^{ + describe(@"its click", ^{ + it(@"is loud", ^{ + Click *click = [[Dolphin new] click]; + expect(@(click.isLoud)).to(beTruthy()); + }); + + it(@"has a high frequency", ^{ + Click *click = [[Dolphin new] click]; + expect(@(click.hasHighFrequency)).to(beTruthy()); + }); + }); +}); + +QuickSpecEnd +``` + +#### Sharing Setup/Teardown Code Using `beforeEach` and `afterEach` + +Example groups don't just make the examples clearer, they're also useful +for sharing setup and teardown code among examples in a group. + +In the example below, the `beforeEach` function is used to create a brand +new instance of a dolphin and its click before each example in the group. +This ensures that both are in a "fresh" state for every example: + +```swift +// Swift + +import Quick +import Nimble + +class DolphinSpec: QuickSpec { + override func spec() { + describe("a dolphin") { + var dolphin: Dolphin? + beforeEach { + dolphin = Dolphin() + } + + describe("its click") { + var click: Click? + beforeEach { + click = dolphin!.click() + } + + it("is loud") { + expect(click!.isLoud).to(beTruthy()) + } + + it("has a high frequency") { + expect(click!.hasHighFrequency).to(beTruthy()) + } + } + } + } +} +``` + +```objc +// Objective-C + +#import +#import + +QuickSpecBegin(DolphinSpec) + +describe(@"a dolphin", ^{ + __block Dolphin *dolphin = nil; + beforeEach(^{ + dolphin = [Dolphin new]; + }); + + describe(@"its click", ^{ + __block Click *click = nil; + beforeEach(^{ + click = [dolphin click]; + }); + + it(@"is loud", ^{ + expect(@(click.isLoud)).to(beTruthy()); + }); + + it(@"has a high frequency", ^{ + expect(@(click.hasHighFrequency)).to(beTruthy()); + }); + }); +}); + +QuickSpecEnd +``` + +Sharing setup like this might not seem like a big deal with the +dolphin example, but for more complicated objects, it saves a lot +of typing! + +To execute code *after* each example, use `afterEach`. + +#### Specifying Conditional Behavior Using `context` + +Dolphins use clicks for echolocation. When they approach something +particularly interesting to them, they release a series of clicks in +order to get a better idea of what it is. + +The tests need to show that the `click` method behaves differently in +different circumstances. Normally, the dolphin just clicks once. But when +the dolphin is close to something interesting, it clicks several times. + +This can be expressed using `context` functions: one `context` for the +normal case, and one `context` for when the dolphin is close to +something interesting: + +```swift +// Swift + +import Quick +import Nimble + +class DolphinSpec: QuickSpec { + override func spec() { + describe("a dolphin") { + var dolphin: Dolphin? + beforeEach { dolphin = Dolphin() } + + describe("its click") { + context("when the dolphin is not near anything interesting") { + it("is only emitted once") { + expect(dolphin!.click().count).to(equal(1)) + } + } + + context("when the dolphin is near something interesting") { + beforeEach { + let ship = SunkenShip() + Jamaica.dolphinCove.add(ship) + Jamaica.dolphinCove.add(dolphin) + } + + it("is emitted three times") { + expect(dolphin!.click().count).to(equal(3)) + } + } + } + } + } +} +``` + +```objc +// Objective-C + +#import +#import + +QuickSpecBegin(DolphinSpec) + +describe(@"a dolphin", ^{ + __block Dolphin *dolphin = nil; + beforeEach(^{ dolphin = [Dolphin new]; }); + + describe(@"its click", ^{ + context(@"when the dolphin is not near anything interesting", ^{ + it(@"is only emitted once", ^{ + expect(@([[dolphin click] count])).to(equal(@1)); + }); + }); + + context(@"when the dolphin is near something interesting", ^{ + beforeEach(^{ + [[Jamaica dolphinCove] add:[SunkenShip new]]; + [[Jamaica dolphinCove] add:dolphin]; + }); + + it(@"is emitted three times", ^{ + expect(@([[dolphin click] count])).to(equal(@3)); + }); + }); + }); +}); + +QuickSpecEnd +``` + +### Temporarily Disabling Examples or Groups Using `pending` + +For examples that don't pass yet, use `pending`. Pending examples +are not run, but are printed out along with the test results. + +The example below marks the cases in which the dolphin is close to +something interesting as "pending"--perhaps that functionality hasn't +been implemented yet, but these tests have been written as reminders +that it should be soon: + +```swift +// Swift + +pending("when the dolphin is near something interesting") { + // ...none of the code in this closure will be run. +} +``` + +```objc +// Objective-C + +pending(@"when the dolphin is near something interesting", ^{ + // ...none of the code in this closure will be run. +}); +``` + +#### Shorthand syntax + +Examples and groups can also be marked as pending by using +`xdescribe`, `xcontext`, and `xit`: + +```swift +// Swift + +xdescribe("its click") { + // ...none of the code in this closure will be run. +} + +xcontext("when the dolphin is not near anything interesting") { + // ...none of the code in this closure will be run. +} + +xit("is only emitted once") { + // ...none of the code in this closure will be run. +} +``` + +```objc +// Objective-C + +xdescribe(@"its click", ^{ + // ...none of the code in this closure will be run. +}); + +xcontext(@"when the dolphin is not near anything interesting", ^{ + // ...none of the code in this closure will be run. +}); + +xit(@"is only emitted once", ^{ + // ...none of the code in this closure will be run. +}); +``` + +### Temporarily Running a Subset of Focused Examples + +Sometimes it helps to focus on only one or a few examples. Running one +or two exmaples is faster than the entire suite, after all. You can +run only one or two by using the `fit` function. You can also focus a +group of examples using `fdescribe` or `fcontext`: + +```swift +fit("its click") { + // ...only this focused example will be run. +} + +it("is only emitted once") { + // ...this example is not focused, and will not be run. +} + +fdescribe("when the dolphin is near something interesting") { + // ...examples in this group are also focused, so they'll be run. +} +``` + +```objc +fit(@"its click", { + // ...only this focused example will be run. +}); + +it(@"is only emitted once", ^{ + // ...this example is not focused, and will not be run. +}); + +fdescribe(@"when the dolphin is near something interesting", ^{ + // ...examples in this group are also focused, so they'll be run. +}); +``` + +### Global Setup/Teardown Using `beforeSuite` and `afterSuite` + +Some test setup needs to be performed before *any* examples are +run. For these cases, use `beforeSuite` and `afterSuite`. + +In the example below, a database of all the creatures in the ocean is +created before any examples are run. That database is torn down once all +the examples have finished: + +```swift +// Swift + +import Quick + +class DolphinSpec: QuickSpec { + override func spec() { + beforeSuite { + OceanDatabase.createDatabase(name: "test.db") + OceanDatabase.connectToDatabase(name: "test.db") + } + + afterSuite { + OceanDatabase.teardownDatabase(name: "test.db") + } + + describe("a dolphin") { + // ... + } + } +} +``` + +```objc +// Objective-C + +#import + +QuickSpecBegin(DolphinSpec) + +beforeSuite(^{ + [OceanDatabase createDatabase:@"test.db"]; + [OceanDatabase connectToDatabase:@"test.db"]; +}); + +afterSuite(^{ + [OceanDatabase teardownDatabase:@"test.db"]; +}); + +describe(@"a dolphin", ^{ + // ... +}); + +QuickSpecEnd +``` + +> You can specify as many `beforeSuite` and `afterSuite` as you like. All + `beforeSuite` closures will be executed before any tests run, and all + `afterSuite` closures will be executed after all the tests are finished. + There is no guarantee as to what order these closures will be executed in. + +### Sharing Examples + +In some cases, the same set of specifications apply to multiple objects. + +For example, consider a protocol called `Edible`. When a dolphin +eats something `Edible`, the dolphin becomes happy. `Mackerel` and +`Cod` are both edible. Quick allows you to easily test that a dolphin is +happy to eat either one. + +The example below defines a set of "shared examples" for "something edible", +and specifies that both mackerel and cod behave like "something edible": + +```swift +// Swift + +import Quick +import Nimble + +class EdibleSharedExamplesConfiguration: QuickConfiguration { + override class func configure(configuration: Configuration) { + sharedExamples("something edible") { (sharedExampleContext: SharedExampleContext) in + it("makes dolphins happy") { + let dolphin = Dolphin(happy: false) + let edible = sharedExampleContext()["edible"] + dolphin.eat(edible) + expect(dolphin.isHappy).to(beTruthy()) + } + } + } +} + +class MackerelSpec: QuickSpec { + override func spec() { + var mackerel: Mackerel! = nil + beforeEach { + mackerel = Mackerel() + } + + itBehavesLike("something edible") { ["edible": mackerel] } + } +} + +class CodSpec: QuickSpec { + override func spec() { + var cod: Cod! = nil + beforeEach { + cod = Cod() + } + + itBehavesLike("something edible") { ["edible": cod] } + } +} +``` + +```objc +// Objective-C + +#import +#import + +QuickConfigurationBegin(EdibleSharedExamplesConfiguration) + ++ (void)configure:(Configuration *configuration) { + sharedExamples(@"something edible", ^(QCKDSLSharedExampleContext exampleContext) { + it(@"makes dolphins happy") { + Dolphin *dolphin = [[Dolphin alloc] init]; + dolphin.happy = NO; + id edible = exampleContext()[@"edible"]; + [dolphin eat:edible]; + expect(dolphin.isHappy).to(beTruthy()) + } + }); +} + +QuickConfigurationEnd + +QuickSpecBegin(MackerelSpec) + +__block Mackerel *mackerel = nil; +beforeEach(^{ + mackerel = [[Mackerel alloc] init]; +}); + +itBehavesLike(@"someting edible", ^{ return @{ @"edible": mackerel }; }); + +QuickSpecEnd + +QuickSpecBegin(CodSpec) + +__block Mackerel *cod = nil; +beforeEach(^{ + cod = [[Cod alloc] init]; +}); + +itBehavesLike(@"someting edible", ^{ return @{ @"edible": cod }; }); + +QuickSpecEnd +``` + +Shared examples can include any number of `it`, `context`, and +`describe` blocks. They save a *lot* of typing when running +the same tests against several different kinds of objects. + +In some cases, you won't need any additional context. In Swift, you can +simply use `sharedExampleFor` closures that take no parameters. This +might be useful when testing some sort of global state: + +```swift +// Swift + +import Quick + +sharedExamplesFor("everything under the sea") { + // ... +} + +itBehavesLike("everything under the sea") +``` + +> In Objective-C, you'll have to pass a block that takes a + `QCKDSLSharedExampleContext`, even if you don't plan on using that + argument. Sorry, but that's the way the cookie crumbles! + :cookie: :bomb: + +You can also focus shared examples using the `fitBehavesLike` function. + +## Using Quick in Objective-C: The Optional Shorthand Syntax + +Quick works equally well in both Swift and Objective-C. + +Importing Quick in an Objective-C file defines macros named `it` and +`itShouldBehaveLike`, as well as functions like `context()`, `describe()`, etc. +If the project you are testing also defines symbols with these names, you may +encounter confusing build failures. In that case, you can avoid namespace +collision by turning off Quick's optional "shorthand" syntax: + +```objc +#define QUICK_DISABLE_SHORT_SYNTAX 1 + +#import + +QuickSpecBegin(DolphinSpec) +// ... +QuickSpecEnd +``` + +You must define the `QUICK_DISABLE_SHORT_SYNTAX` macro *before* +importing the Quick header. + +### Caveat: Your Test Target Must Include At Least One Swift File + +The Swift stdlib will not be linked into your test target, and thus +Quick will fail to execute properly, if you test target does not contain +*at least one* Swift file. If it does not, your tests will exit +prematurely with the following error: + +``` +*** Test session exited(82) without checking in. Executable cannot be +loaded for some other reason, such as a problem with a library it +depends on or a code signature/entitlements mismatch. +``` + +To fix the problem, add a blank file called `SwiftSpec.swift` to your test target: + +```swift +// SwiftSpec.swift + +import Quick +``` + +> For more details on this issue, see https://github.com/Quick/Quick/issues/164. + +## Nimble: Assertions Using `expect(...).to` + +Quick provides an easy language to define examples and example groups. Within those +examples, [Nimble](https://github.com/Quick/Nimble) provides a simple +language to define expectations--that is, to assert that code behaves a +certain way, and to display a test failure if it doesn't. + +Nimble expectations use the `expect(...).to` syntax: + +```swift +// Swift + +import Nimble + +expect(person.greeting).to(equal("Oh, hi.")) +expect(person.greeting).notTo(equal("Hello!")) +expect(person.isHappy).toEventually(beTruthy()) +``` + +```objc +// Objective-C + +#import + +expect(person.greeting).to(equal(@"Oh, hi.")); +expect(person.greeting).notTo(equal(@"Hello!")); +expect(@(person.isHappy)).toEventually(beTruthy()); +``` + +You can find much more detailed documentation on +[Nimble](https://github.com/Quick/Nimble), including a +full set of available matchers and details on how to perform asynchronous tests, +in [the project's README](https://github.com/Quick/Nimble). + +## Testing Swift Code + +In order to test code written in Swift, you'll need to do three things: + +1. Set "defines module" in your `.xcodeproj` to `YES`. +2. Mark any class/method/function you want to test `public`, since only + `public` symbols are exported. +3. `import YourAppModuleName` in your unit tests. + +Some developers advocate adding Swift source files to your test target. +However, this leads to [subtle, hard-to-diagnose +errors](https://github.com/Quick/Quick/issues/91), and is not +recommended. + +## Testing UIKit with Quick + +Quick can be used for testing UIKit interaction as well. Say, for example, we have a `DolphinTableViewController` that displays one cell with label `Bottlenose`. We want to test that the cell gets displayed when the view is loaded. Additionally, we would like to delete the row upon selecting it. An approach might be: + +```swift +// Swift + +import UIKit +import Quick +import Nimble + +class DolphinTableViewControllerSpecs: QuickSpec { + override func spec() { + var viewController: DolphinTableViewController! + + beforeEach { + viewController = DolphinTableViewController() + } + + describe("viewDidLoad") { + beforeEach { + // Accessing the view property causes the UIKit framework to trigger the necessary methods to render the view. + viewController.view + } + + + it("loads the table view with one cell") { + let tableView = viewController.tableView + + var indexPath = NSIndexPath(forRow: 0, inSection: 0) + var cell = viewController.tableView(tableView, cellForRowAtIndexPath: indexPath) + + expect(cell.textLabel?.text).to(equal("Bottlenose")) + } + } + + describe("didSelectRowAtIndexPath") { + beforeEach { + // Causes the UIKit framework to trigger the necessary methods to render the view and perform viewWillAppear: and viewDidAppear: callbacks + viewController.beginAppearanceTransition(true, animated: false) + viewController.endAppearanceTransition() + } + + it("deletes the selected row and reloads the tableView's data") { + let tableView = viewController.tableView + let indexPath = NSIndexPath(forRow: 0, inSection: 0) + + viewController.tableView(tableView, didSelectRowAtIndexPath: indexPath) + + var cell = viewController.tableView(tableView, cellForRowAtIndexPath: indexPath) + expect(cell.textLabel?.text).to(beNil()) + } + } + } +} +``` + +```objc +// Objective-C + +#import +#import +#import + +QuickSpecBegin(DolphinTableViewControllerSpec) + +describe(@"viewDidLoad", ^{ + __block DolphinTableViewController *viewController = nil; + + beforeEach(^{ + viewController = [[DolphinTableViewController alloc] init]; + }); + + it(@"loads the table view with three types of dolphin", ^{ + beforeEach(^{ + // Accessing the view property causes the UIKit framework to trigger the necessary methods to render the view. + [viewController view]; + }); + + UITableView *tableView = [viewController tableView]; + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; + UITableViewCell *cell = [viewController tableView:tableView cellForRowAtIndexPath:indexPath]; + + expect(@([[cell textLabel] text])).to(equal(@"Bottlenose")); + }); +} + +describe(@"didSelectRowAtIndexPath", ^{ + __block DolphinTableViewController *viewController = nil; + + beforeEach(^{ + // Causes the UIKit framework to trigger the necessary methods to render the view and perform viewWillAppear: and + viewController = [[DolphinTableViewController alloc] init]; + [viewController beginAppearanceTransition:YES animated:NO]; + [viewController endAppearanceTransition]; + }); + + it(@"deletes the selected row and reloads the tableView's data", ^{ + UITableView *tableView = [viewController tableView]; + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; + + [viewController tableView:tableView didSelectRowAtIndexPath:indexPath]; + + UITableViewCell *cell = [viewController tableView:tableView cellForRowAtIndexPath:indexPath]; + + expect(@([[cell textLabel] text])).to(beNil()); + }); +} + +QuickSpecEnd +``` + +## How to Install Quick + +Quick provides the syntax to define examples and example groups. Nimble +provides the `expect(...).to` assertion syntax. You may use either one, +or both, in your tests. + +To use Quick and Nimble to test your iOS or OS X applications, follow these 4 easy steps: + +1. [Clone the Quick and Nimble repositories](#1-clone-the-quick-and-nimble-repositories) +2. [Add `Quick.xcodeproj` and `Nimble.xcodeproj` to your test target](#2-add-quickxcodeproj-and-nimblexcodeproj-to-your-test-target) +3. [Link `Quick.framework` and `Nimble.framework`](#3-link-quickframework-and-nimbleframework) +4. Start writing specs! + +Example projects with this complete setup is available in the +[`Examples`](https://github.com/modocache/Quick/tree/master/Examples) directory. + +### 1. Clone the Quick and Nimble repositories + +```sh +git clone git@github.com:Quick/Quick.git Vendor/Quick +git clone git@github.com:Quick/Nimble.git Vendor/Nimble +``` + +### 2. Add `Quick.xcodeproj` and `Nimble.xcodeproj` to your test target + +Right-click on the group containing your application's tests and +select `Add Files To YourApp...`. + +![](http://cl.ly/image/3m110l2s0a18/Screen%20Shot%202014-06-08%20at%204.25.59%20AM.png) + +Next, select `Quick.xcodeproj`, which you downloaded in step 1. + +![](http://cl.ly/image/431F041z3g1P/Screen%20Shot%202014-06-08%20at%204.26.49%20AM.png) + +Once you've added the Quick project, you should see it in Xcode's project +navigator, grouped with your tests. + +![](http://cl.ly/image/0p0k2F2u2O3I/Screen%20Shot%202014-06-08%20at%204.27.29%20AM%20copy.png) + +Follow the same steps for `Nimble.xcodeproj`. + +### 3. Link `Quick.framework` and `Nimble.framework` + + Link the `Quick.framework` during your test target's +`Link Binary with Libraries` build phase. You should see two +`Quick.frameworks`; one is for OS X, and the other is for iOS. + +![](http://cl.ly/image/2L0G0H1a173C/Screen%20Shot%202014-06-08%20at%204.27.48%20AM.png) + +Do the same for the `Nimble.framework`. + +### 4. Start writing specs! + +If you run into any problems, please file an issue. + +## Including Quick in a Git Repository Using Submodules + +The best way to include Quick in a Git repository is by using Git +submodules. Git submodules are great because: + +1. They track exactly which version of Quick is being used +2. It's easy to update Quick to the latest--or any other--version + +### Adding Quick as a Git Submodule + +To use Git submodules, follow the same steps as above, except instead of +cloning the Quick and Nimble repositories, add them to your project as +submodules: + +```sh +mkdir Vendor # you can keep your submodules in their own directory +git submodule add git@github.com:Quick/Quick.git Vendor/Quick +git submodule add git@github.com:Quick/Nimble.git Vendor/Nimble +git submodule update --init --recursive +``` + +### Updating the Quick Submodule + +If you ever want to update the Quick submodule to latest version, enter +the Quick directory and pull from the master repository: + +```sh +cd Vendor/Quick +git pull --rebase origin master +``` + +Your Git repository will track changes to submodules. You'll want to +commit the fact that you've updated the Quick submodule: + +```sh +git commit -m "Updated Quick submodule" +``` + +### Cloning a Repository that Includes a Quick Submodule + +After other people clone your repository, they'll have to pull down the +submodules as well. They can do so by running the `git submodule update` +command: + +```sh +git submodule update --init --recursive +``` + +You can read more about Git submodules +[here](http://git-scm.com/book/en/Git-Tools-Submodules). To see examples +of Git submodules in action, check out any of the repositories linked to +in the ["Who Uses Quick"](#who-uses-quick) section of this guide. + +## How to Install Quick using CocoaPods + +If you would like to use Quick with CocoaPods today, you need to install the +beta build of CocoaPods via `[sudo] gem install cocoapods --pre` then add Quick +to your Podfile. + +```rb +pod 'Quick' +``` + +If you need the latest cutting-edge code, use the following: + +```rb +pod 'Quick', :head +``` + +## How to Install Quick using [Carthage](https://github.com/Carthage/Carthage) +As Test targets do not have the "Embedded Binaries" section, the frameworks must be added to the target's "Link Binary With Libraries" as well as a "Copy Files" build phase to copy them to the target's Frameworks destination. + > As Carthage builds dynamic frameworks, you will need a valid code signing identity set up. + +1. Add Quick to your **[Cartfile.private](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfileprivate)** + + ``` + github "Quick/Quick" + github "Quick/Nimble" + ``` + +2. Run `carthage update` +3. From your `Carthage/Build/[platform]/` directory, add both Quick and Nimble to your test target's **Link Binary With Libraries** build phase + ![](http://i.imgur.com/pBkDDk5.png) + +4. For your test target, create a new build phase of type **Copy Files** + ![](http://i.imgur.com/jZATIjQ.png) + +5. Set the **Destination** to **Frameworks**, then add both frameworks + ![](http://i.imgur.com/rpnyWGH.png) + +This is not 'the one and only way' to use Carthage to manage dependencies, for further reference check out the [Carthage documentation](https://github.com/Carthage/Carthage/blob/master/README.md) + +## How to Install Quick File Templates + +The Quick repository includes file templates for both Swift and +Objective-C specs. + +### Using Alcatraz + +Quick templates can be installed via [Alcatraz](https://github.com/supermarin/Alcatraz), +a package manager for Xcode. Just search for the templates from the +Package Manager window. + +![](http://f.cl.ly/items/3T3q0G1j0b2t1V0M0T04/Screen%20Shot%202014-06-27%20at%202.01.10%20PM.png) + +### Manually via the Rakefile + +To manually install the templates, just clone the repository and +run the `templates:install` rake task: + +```sh +$ git clone git@github.com:Quick/Quick.git +$ rake templates:install +``` + +Uninstalling is easy, too: + +```sh +$ rake templates:uninstall +``` + +## Configuring Quick + +The Quick configuration object exposes custom options to alter the behavior of +the framework. The intention of this hook is to provide a global configuration +to meet the needs of your project. *QuickConfiguration* is never meant to be +instantiated. If you do so, an exception will be raised. Instead, subclass it +and override the `configure()` class function, like so: + +```swift +// Swift + +import Quick +import Nimble + +class ProjectDataTestConfiguration: QuickConfiguration { + override class func configure(configuration : Configuration) { + // set options on the configuration object + } +} +``` + +```objc +// Objective-C + +#import +#import + +QuickConfigurationBegin(ProjectDataTestConfiguration) + ++ (void)configure:(Configuration *configuration) { + // set options of the configuration object +} + +QuickConfigurationEnd +``` + +Projects may include several configurations. However, Quick does not make any +guarantee about the order in which they are executed. + +### Adding Global Before and After Filters + +Similar to `beforeEach()` and `afterEach()` functions in QuickSpec(s), global +filters can be applied to all tests. For example, a computed value may need to +be reset before each test case. In the following case, it is assumed that the +tests rely on the `height` property of the `Dorsal` singleton to be 0 in order +to do some sort of mathematical computation. + +```swift +// Swift + +import Quick +import Nimble + +class FinConfiguration: QuickConfiguration { + override class func configure(configuration: Configuration) { + configuration.beforeEach() { + fin = Dorsal.sharedFin() + fin.height = 0 + } + } +} +``` + +```objc +// Objective-C + +#import +#import "Dorsal.h" + +QuickConfigurationBegin(FinConfiguration) + ++ (void)configure:(Configuration *)configuration { + [configuration beforeEach:^{ + Dorsal *fin = [Dorsal sharedFin]; + fin.height = 0; + }]; +} + +QuickConfigurationEnd +``` + +Every test resets the `height` property to 0. Therefore, our tests with various +computations remain entirely independent. + +In addition, Quick allows you to access metadata regarding the tests. The +framework provides `beforeSuite()` and `afterSuite()` closures with +metadata. Metadata is passed into the closure like so: + +```swift +// Swift + +import Quick +import Nimble + +class Fin2Configuration: QuickConfiguration { + override class func configure(configuration: Configuration) { + configuration.beforeEach({ (exampleMetadata : ExampleMetadata) -> () in + // work with metadata + }) + } +} +``` + +```objc +// Objective-C + +#import +#import "Dorsal.h" + +QuickConfigurationBegin(Fin2Configuration) + ++ (void)configure:(Configuration *)configuration { + [configuration beforeEachWithMetadata:^(ExampleMetadata *data) { + // work with metadata + }]; +} + +QuickConfigurationEnd +``` + +## Who Uses Quick + +Quick is used by many companies, open-source projects, and individuals, +including [GitHub](https://github.com/github) and +[ReactiveCocoa](https://github.com/ReactiveCocoa). See examples below: + +- https://github.com/ReactiveCocoa/ReactiveCocoa +- https://github.com/github/Archimedes +- https://github.com/libgit2/objective-git +- https://github.com/jspahrsummers/RXSwift +- https://github.com/artsy/eidolon +- https://github.com/AshFurrow/Moya +- https://github.com/nerdyc/Squeal +- https://github.com/pepibumur/SugarRecord + +> Add an issue or [tweet](https://twitter.com/modocache) if you'd like to be added to this list. + +## License + +Apache 2.0 license. See the `LICENSE` file for details. diff --git a/Pods/Target Support Files/Pods-cameraTests-Nimble/Info.plist b/Pods/Target Support Files/Pods-cameraTests-Nimble/Info.plist new file mode 100644 index 0000000..0837642 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Nimble/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.3.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-Private.xcconfig b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-Private.xcconfig new file mode 100644 index 0000000..2e6d90c --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-Private.xcconfig @@ -0,0 +1,10 @@ +#include "Pods-cameraTests-Nimble.xcconfig" +CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH +FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" ${PODS_CAMERATESTS_NIMBLE_FRAMEWORK_SEARCH_PATHS} +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Nimble" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Nimble" "${PODS_ROOT}/Headers/Public/Quick" +OTHER_LDFLAGS = ${PODS_CAMERATESTS_NIMBLE_OTHER_LDFLAGS} -ObjC +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-cameraTests +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-dummy.m b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-dummy.m new file mode 100644 index 0000000..3f9e28f --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_cameraTests_Nimble : NSObject +@end +@implementation PodsDummy_Pods_cameraTests_Nimble +@end diff --git a/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-prefix.pch b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-prefix.pch new file mode 100644 index 0000000..1fc3b81 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-prefix.pch @@ -0,0 +1,5 @@ +#ifdef __OBJC__ +#import +#endif + +#import "Pods-cameraTests-environment.h" diff --git a/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-umbrella.h b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-umbrella.h new file mode 100644 index 0000000..5e5b5c8 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble-umbrella.h @@ -0,0 +1,9 @@ +#import + +#import "Nimble.h" +#import "DSL.h" +#import "NMBExceptionCapture.h" + +FOUNDATION_EXPORT double NimbleVersionNumber; +FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; + diff --git a/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble.modulemap b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble.modulemap new file mode 100644 index 0000000..896b28c --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble.modulemap @@ -0,0 +1,6 @@ +framework module Nimble { + umbrella header "Pods-cameraTests-Nimble-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble.xcconfig b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble.xcconfig new file mode 100644 index 0000000..8426a2e --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Nimble/Pods-cameraTests-Nimble.xcconfig @@ -0,0 +1,2 @@ +PODS_CAMERATESTS_NIMBLE_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(PLATFORM_DIR)/Developer/Library/Frameworks" +PODS_CAMERATESTS_NIMBLE_OTHER_LDFLAGS = -framework "XCTest" \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-cameraTests-Quick/Info.plist b/Pods/Target Support Files/Pods-cameraTests-Quick/Info.plist new file mode 100644 index 0000000..595bc9a --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Quick/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.2.2 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-Private.xcconfig b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-Private.xcconfig new file mode 100644 index 0000000..8d85f99 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-Private.xcconfig @@ -0,0 +1,10 @@ +#include "Pods-cameraTests-Quick.xcconfig" +CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH +FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" ${PODS_CAMERATESTS_QUICK_FRAMEWORK_SEARCH_PATHS} +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Quick" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Nimble" "${PODS_ROOT}/Headers/Public/Quick" +OTHER_LDFLAGS = ${PODS_CAMERATESTS_QUICK_OTHER_LDFLAGS} -ObjC +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-cameraTests +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-dummy.m b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-dummy.m new file mode 100644 index 0000000..3ba2244 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_cameraTests_Quick : NSObject +@end +@implementation PodsDummy_Pods_cameraTests_Quick +@end diff --git a/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-prefix.pch b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-prefix.pch new file mode 100644 index 0000000..1fc3b81 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-prefix.pch @@ -0,0 +1,5 @@ +#ifdef __OBJC__ +#import +#endif + +#import "Pods-cameraTests-environment.h" diff --git a/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-umbrella.h b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-umbrella.h new file mode 100644 index 0000000..61d5fcf --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick-umbrella.h @@ -0,0 +1,11 @@ +#import + +#import "NSString+QCKSelectorName.h" +#import "Quick.h" +#import "QuickSpec.h" +#import "QuickConfiguration.h" +#import "QCKDSL.h" + +FOUNDATION_EXPORT double QuickVersionNumber; +FOUNDATION_EXPORT const unsigned char QuickVersionString[]; + diff --git a/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick.modulemap b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick.modulemap new file mode 100644 index 0000000..f644728 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick.modulemap @@ -0,0 +1,6 @@ +framework module Quick { + umbrella header "Pods-cameraTests-Quick-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick.xcconfig b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick.xcconfig new file mode 100644 index 0000000..f8b0452 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests-Quick/Pods-cameraTests-Quick.xcconfig @@ -0,0 +1,2 @@ +PODS_CAMERATESTS_QUICK_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(PLATFORM_DIR)/Developer/Library/Frameworks" +PODS_CAMERATESTS_QUICK_OTHER_LDFLAGS = -framework "XCTest" \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-cameraTests/Info.plist b/Pods/Target Support Files/Pods-cameraTests/Info.plist new file mode 100644 index 0000000..6974542 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-acknowledgements.markdown b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-acknowledgements.markdown new file mode 100644 index 0000000..52e3990 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-acknowledgements.markdown @@ -0,0 +1,413 @@ +# 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 - http://cocoapods.org diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-acknowledgements.plist b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-acknowledgements.plist new file mode 100644 index 0000000..81da4bd --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-acknowledgements.plist @@ -0,0 +1,447 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + 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 - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-dummy.m b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-dummy.m new file mode 100644 index 0000000..e7e318c --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_cameraTests : NSObject +@end +@implementation PodsDummy_Pods_cameraTests +@end diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-environment.h b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-environment.h new file mode 100644 index 0000000..2ebf692 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-environment.h @@ -0,0 +1,20 @@ + +// To check if a library is compiled with CocoaPods you +// can use the `COCOAPODS` macro definition which is +// defined in the xcconfigs so it is available in +// headers also when they are imported in the client +// project. + + +// Nimble +#define COCOAPODS_POD_AVAILABLE_Nimble +#define COCOAPODS_VERSION_MAJOR_Nimble 0 +#define COCOAPODS_VERSION_MINOR_Nimble 3 +#define COCOAPODS_VERSION_PATCH_Nimble 0 + +// Quick +#define COCOAPODS_POD_AVAILABLE_Quick +#define COCOAPODS_VERSION_MAJOR_Quick 0 +#define COCOAPODS_VERSION_MINOR_Quick 2 +#define COCOAPODS_VERSION_PATCH_Quick 2 + diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-frameworks.sh b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-frameworks.sh new file mode 100755 index 0000000..2993f68 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-frameworks.sh @@ -0,0 +1,57 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + local source="${BUILT_PRODUCTS_DIR}/Pods-cameraTests/$1" + local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source=$(readlink "${source}") + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" ${source} ${destination}" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" "${source}" "${destination}" + # Resign the code if required by the build settings to avoid unstable apps + if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then + code_sign "${destination}/$1" + fi + + # Embed linked Swift runtime libraries + local basename + basename=$(echo $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]}) + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then + code_sign "${destination}/${lib}" + fi + done +} + +# Signs a framework with the provided identity +code_sign() { + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework 'Nimble.framework' + install_framework 'Quick.framework' +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework 'Nimble.framework' + install_framework 'Quick.framework' +fi diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-resources.sh b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-resources.sh new file mode 100755 index 0000000..64c6f7a --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-resources.sh @@ -0,0 +1,77 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES="" + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + XCASSET_FILES="$XCASSET_FILES '$1'" + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]]; then + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n $XCASSET_FILES ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + echo $XCASSET_FILES | xargs actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-umbrella.h b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-umbrella.h new file mode 100644 index 0000000..9a9deb0 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double Pods_cameraTestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_cameraTestsVersionString[]; + diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.debug.xcconfig b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.debug.xcconfig new file mode 100644 index 0000000..119e005 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.debug.xcconfig @@ -0,0 +1,9 @@ +FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/Nimble.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/Quick.framework/Headers" +OTHER_LDFLAGS = $(inherited) -ObjC -framework "Nimble" -framework "Quick" +OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-cameraTests +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.modulemap b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.modulemap new file mode 100644 index 0000000..ee1ef6b --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_cameraTests { + umbrella header "Pods-cameraTests-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.release.xcconfig b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.release.xcconfig new file mode 100644 index 0000000..119e005 --- /dev/null +++ b/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.release.xcconfig @@ -0,0 +1,9 @@ +FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/Nimble.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/Quick.framework/Headers" +OTHER_LDFLAGS = $(inherited) -ObjC -framework "Nimble" -framework "Quick" +OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-cameraTests +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Rakefile.rb b/Rakefile.rb new file mode 100644 index 0000000..e9c3c8c --- /dev/null +++ b/Rakefile.rb @@ -0,0 +1,132 @@ +#!/usr/bin/env ruby + +#change those according to your project settings + +$workspaceName = 'camera.xcworkspace' +$schemeName = 'camera' +$releaseProvisioningProfileName = 'XC Ad Hoc: com.imaginarycloud.*' +$nameOfTheSimulatorToTest = 'iPad Retina' + + +#you can create API key here: https://rink.hockeyapp.net/manage/auth_tokens + +$hockeyAppApiKey = '7d8cbb78027a4263b6bb7644a33a9491' + + + + + +# The rest will just do the magic for you :-) + +def build() + putStatusInBlue('BUILDING') + + removeOldFiles + if buildFromIpaBuild then + putStatusInGreen('SUCESS') + else + putStatusInRed('FAILED, TRYING XCODEBUILD') + + if buildFromXcodeBuild then + putStatusInGreen('SUCESS') + + putStatusInBlue('UPLOADING TO HOCKEYAPP') + + system('ipa distribute:hockeyapp -a ' + $hockeyAppApiKey + ' -d ' + $dsymZippedName) + else + putStatusInRed('EVERYTHING FAILED') + end + end +end + +def buildFromIpaBuild() + putStatusInBlue('BUILDING WITH IPA BUILD') + + if system('ipa build -m "' + $releaseProvisioningProfileName + '" --workspace ' + $workspaceName + '" --scheme ' + $schemeName) then + system('ipa distribute:hockeyapp -a ' + $hockeyAppApiKey) + return true + else + return false + end +end + +def buildFromXcodeBuild() + + putStatusInBlue('BUILDING WITH XCODEBUILD') + + if system('xcodebuild clean archive -workspace ' + $workspaceName + ' -scheme ' + $schemeName + ' -archivePath ' + $archivePath) then + putStatusInBlue('EXPORTING IPA') + + if system('xcodebuild -exportArchive -archivePath ' + $archivePath + ' -exportPath ' + $schemeName + ' -exportFormat ipa -exportProvisioningProfile "' + $releaseProvisioningProfileName + '"') then + + system('zip -r ' + $dsymZippedName + ' ' + $dsymPath) + return true + else + return false + end + else + return false + end +end + +def removeOldFiles() + if system('test -d ' + $archivePath) then + putStatusInBlue('REMOVING OLD ARCHIVE FILE') + system('rm -R' + $archivePath) + end + if system('test -f ' + $schemeName + '.ipa') then + putStatusInBlue('REMOVING OLD IPA FILE') + system('rm ' + $schemeName + '.ipa') + end + if system('test -f ' + $dsymZippedName) then + putStatusInBlue('REMOVING OLD DSYM FILE') + system('rm ' + $dsymZippedName) + end +end + +def putStatusInRed(status) + puts " " + puts ">>>>>>>> ".red + status.red + " <<<<<<<<".red + puts " " +end + +def putStatusInBlue(status) + puts " " + puts ">>>>>>>> ".blue + status.blue + " <<<<<<<<".blue + puts " " +end + +def putStatusInGreen(status) + puts " " + puts ">>>>>>>> ".green + status.green + " <<<<<<<<".green + puts " " +end + +class String + def red; "\033[31m#{self}\033[0m" end + def green; "\033[32m#{self}\033[0m" end + def blue; "\033[34m#{self}\033[0m" end +end + + +$archivePath = $schemeName + '.xcarchive' +$dsymZippedName = $schemeName + '.app.dSYM.zip' +$dsymPath = $archivePath + '/dSYMs/' + $schemeName + '.app.dSYM' + +putStatusInBlue('TESTING') + +if system('xctool -workspace ' + $workspaceName + ' -scheme ' + $schemeName + ' -sdk iphonesimulator test') then + build +else + putStatusInRed('XCTOOL FAILED - TRYING XCODEBUILD') + + if system('xcodebuild clean test -scheme ' + $schemeName + ' -workspace ' + $workspaceName + ' -destination \'platform=iOS Simulator,name=' + $nameOfTheSimulatorToTest + '\'') then + build + else + putStatusInRed('XCODEBUILD TEST FAILED') + end +end + + + + diff --git a/camera.app.dSYM.zip b/camera.app.dSYM.zip new file mode 100644 index 0000000..be2a930 Binary files /dev/null and b/camera.app.dSYM.zip differ diff --git a/camera.ipa b/camera.ipa new file mode 100644 index 0000000..504753f Binary files /dev/null and b/camera.ipa differ diff --git a/camera.xcarchive/Info.plist b/camera.xcarchive/Info.plist new file mode 100644 index 0000000..f66720e --- /dev/null +++ b/camera.xcarchive/Info.plist @@ -0,0 +1,27 @@ + + + + + ApplicationProperties + + ApplicationPath + Applications/camera.app + CFBundleIdentifier + com.imaginarycloud.camera + CFBundleShortVersionString + 1.0.12 + CFBundleVersion + 1 + SigningIdentity + iPhone Distribution: IndexSquare LDA (QM7HJTY23M) + + ArchiveVersion + 2 + CreationDate + 2015-03-30T11:27:09Z + Name + camera + SchemeName + camera + + diff --git a/camera.xcarchive/Products/Applications/camera.app/Base.lproj/LaunchScreen.nib b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/LaunchScreen.nib new file mode 100644 index 0000000..a4c9658 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/LaunchScreen.nib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib new file mode 100644 index 0000000..2270fca Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/ImageVC.nib b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/ImageVC.nib new file mode 100644 index 0000000..a5eec9b Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/ImageVC.nib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/Info.plist b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/Info.plist new file mode 100644 index 0000000..784adc0 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/Info.plist differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/UIViewController-bhK-VL-qY4.nib b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/UIViewController-bhK-VL-qY4.nib new file mode 100644 index 0000000..34e342a Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/UIViewController-bhK-VL-qY4.nib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/xF2-bQ-3ri-view-Qhk-xW-6b1.nib b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/xF2-bQ-3ri-view-Qhk-xW-6b1.nib new file mode 100644 index 0000000..8a4eaeb Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Base.lproj/Main.storyboardc/xF2-bQ-3ri-view-Qhk-xW-6b1.nib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftAssetsLibrary.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftAssetsLibrary.dylib new file mode 100755 index 0000000..1fcb36d Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftAssetsLibrary.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCore.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCore.dylib new file mode 100755 index 0000000..191ea2d Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCore.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCoreGraphics.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCoreGraphics.dylib new file mode 100755 index 0000000..46b1893 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCoreGraphics.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCoreImage.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCoreImage.dylib new file mode 100755 index 0000000..b6a05d9 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftCoreImage.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftDarwin.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftDarwin.dylib new file mode 100755 index 0000000..e26cb06 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftDarwin.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftDispatch.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftDispatch.dylib new file mode 100755 index 0000000..d5c3962 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftDispatch.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftFoundation.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftFoundation.dylib new file mode 100755 index 0000000..404cb38 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftFoundation.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftObjectiveC.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftObjectiveC.dylib new file mode 100755 index 0000000..06fb2c9 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftObjectiveC.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftSecurity.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftSecurity.dylib new file mode 100755 index 0000000..e5db905 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftSecurity.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftUIKit.dylib b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftUIKit.dylib new file mode 100755 index 0000000..d899d72 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Frameworks/libswiftUIKit.dylib differ diff --git a/camera.xcarchive/Products/Applications/camera.app/Info.plist b/camera.xcarchive/Products/Applications/camera.app/Info.plist new file mode 100644 index 0000000..ff3b56d Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/Info.plist differ diff --git a/camera.xcarchive/Products/Applications/camera.app/PkgInfo b/camera.xcarchive/Products/Applications/camera.app/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/camera.xcarchive/Products/Applications/camera.app/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/camera.xcarchive/Products/Applications/camera.app/_CodeSignature/CodeResources b/camera.xcarchive/Products/Applications/camera.app/_CodeSignature/CodeResources new file mode 100644 index 0000000..054592e --- /dev/null +++ b/camera.xcarchive/Products/Applications/camera.app/_CodeSignature/CodeResources @@ -0,0 +1,319 @@ + + + + + files + + Base.lproj/LaunchScreen.nib + + hash + + Y/q4h5JcAXvov9QBRuFJpUBik30= + + optional + + + Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib + + hash + + uP3cbXlyTB4vkqfbA/9FxEO5WmI= + + optional + + + Base.lproj/Main.storyboardc/ImageVC.nib + + hash + + tc4x/d2o6VW5Dx87agRxXgoweTg= + + optional + + + Base.lproj/Main.storyboardc/Info.plist + + hash + + y8O+HwjY1DTalhyb6GujDmK6OLE= + + optional + + + Base.lproj/Main.storyboardc/UIViewController-bhK-VL-qY4.nib + + hash + + JSHmw29zWeiF2Hms6qjlPjJmxFI= + + optional + + + Base.lproj/Main.storyboardc/xF2-bQ-3ri-view-Qhk-xW-6b1.nib + + hash + + mYoQN5lYFEUJPSr9HPDpcTRGFQg= + + optional + + + Frameworks/libswiftAssetsLibrary.dylib + + DkStNHO+W2qbqLR7vxciwL67Ii8= + + Frameworks/libswiftCore.dylib + + Sd5OXTTtsvr8cb8LxWHPWqYKd6g= + + Frameworks/libswiftCoreGraphics.dylib + + StLLenbypxXkzkA0HhuhYY927/o= + + Frameworks/libswiftCoreImage.dylib + + 3YEFc6Q8X8ShhYl5i7LGWfUR6Gg= + + Frameworks/libswiftDarwin.dylib + + Bb6evAWmMDVvQ/NKNSv03Wwsp64= + + Frameworks/libswiftDispatch.dylib + + k1K1TN7r+dOHE31/bb4qf+Sg3RA= + + Frameworks/libswiftFoundation.dylib + + VqkZh7ELoold3hI2YiBEg6gmOZU= + + Frameworks/libswiftObjectiveC.dylib + + wkuKB1ZO+oae9uyqPCx3OVyCqSE= + + Frameworks/libswiftSecurity.dylib + + l5h+VAw6UCDEALlcFFkMpNZo48o= + + Frameworks/libswiftUIKit.dylib + + NofzXse2rT85h+jr+HKK5TnF0q8= + + Info.plist + + wq7IXedFPbniO49RhIrMbK3AYN4= + + PkgInfo + + n57qDP4tZfLD1rCS43W0B4LQjzE= + + archived-expanded-entitlements.xcent + + yCRLSxXp44+4vCuOsy/h9LsBuCM= + + embedded.mobileprovision + + o9TRPl+K0mDaLn2MVd4EHtoywaE= + + + files2 + + Base.lproj/LaunchScreen.nib + + hash + + Y/q4h5JcAXvov9QBRuFJpUBik30= + + optional + + + Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib + + hash + + uP3cbXlyTB4vkqfbA/9FxEO5WmI= + + optional + + + Base.lproj/Main.storyboardc/ImageVC.nib + + hash + + tc4x/d2o6VW5Dx87agRxXgoweTg= + + optional + + + Base.lproj/Main.storyboardc/Info.plist + + hash + + y8O+HwjY1DTalhyb6GujDmK6OLE= + + optional + + + Base.lproj/Main.storyboardc/UIViewController-bhK-VL-qY4.nib + + hash + + JSHmw29zWeiF2Hms6qjlPjJmxFI= + + optional + + + Base.lproj/Main.storyboardc/xF2-bQ-3ri-view-Qhk-xW-6b1.nib + + hash + + mYoQN5lYFEUJPSr9HPDpcTRGFQg= + + optional + + + Frameworks/libswiftAssetsLibrary.dylib + + DkStNHO+W2qbqLR7vxciwL67Ii8= + + Frameworks/libswiftCore.dylib + + Sd5OXTTtsvr8cb8LxWHPWqYKd6g= + + Frameworks/libswiftCoreGraphics.dylib + + StLLenbypxXkzkA0HhuhYY927/o= + + Frameworks/libswiftCoreImage.dylib + + 3YEFc6Q8X8ShhYl5i7LGWfUR6Gg= + + Frameworks/libswiftDarwin.dylib + + Bb6evAWmMDVvQ/NKNSv03Wwsp64= + + Frameworks/libswiftDispatch.dylib + + k1K1TN7r+dOHE31/bb4qf+Sg3RA= + + Frameworks/libswiftFoundation.dylib + + VqkZh7ELoold3hI2YiBEg6gmOZU= + + Frameworks/libswiftObjectiveC.dylib + + wkuKB1ZO+oae9uyqPCx3OVyCqSE= + + Frameworks/libswiftSecurity.dylib + + l5h+VAw6UCDEALlcFFkMpNZo48o= + + Frameworks/libswiftUIKit.dylib + + NofzXse2rT85h+jr+HKK5TnF0q8= + + archived-expanded-entitlements.xcent + + yCRLSxXp44+4vCuOsy/h9LsBuCM= + + embedded.mobileprovision + + o9TRPl+K0mDaLn2MVd4EHtoywaE= + + + rules + + ^ + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^ + + weight + 20 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/camera.xcarchive/Products/Applications/camera.app/archived-expanded-entitlements.xcent b/camera.xcarchive/Products/Applications/camera.app/archived-expanded-entitlements.xcent new file mode 100644 index 0000000..b807a4b --- /dev/null +++ b/camera.xcarchive/Products/Applications/camera.app/archived-expanded-entitlements.xcent @@ -0,0 +1,12 @@ + + + + + application-identifier + QM7HJTY23M.com.imaginarycloud.camera + keychain-access-groups + + QM7HJTY23M.com.imaginarycloud.camera + + + diff --git a/camera.xcarchive/Products/Applications/camera.app/camera b/camera.xcarchive/Products/Applications/camera.app/camera new file mode 100755 index 0000000..5db3692 Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/camera differ diff --git a/camera.xcarchive/Products/Applications/camera.app/embedded.mobileprovision b/camera.xcarchive/Products/Applications/camera.app/embedded.mobileprovision new file mode 100644 index 0000000..f9ebedd Binary files /dev/null and b/camera.xcarchive/Products/Applications/camera.app/embedded.mobileprovision differ diff --git a/camera.xcarchive/SwiftSupport/libswiftAssetsLibrary.dylib b/camera.xcarchive/SwiftSupport/libswiftAssetsLibrary.dylib new file mode 100755 index 0000000..99cd04a Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftAssetsLibrary.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftCore.dylib b/camera.xcarchive/SwiftSupport/libswiftCore.dylib new file mode 100755 index 0000000..1b1d480 Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftCore.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftCoreGraphics.dylib b/camera.xcarchive/SwiftSupport/libswiftCoreGraphics.dylib new file mode 100755 index 0000000..e0dfbe8 Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftCoreGraphics.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftCoreImage.dylib b/camera.xcarchive/SwiftSupport/libswiftCoreImage.dylib new file mode 100755 index 0000000..3f7710c Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftCoreImage.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftDarwin.dylib b/camera.xcarchive/SwiftSupport/libswiftDarwin.dylib new file mode 100755 index 0000000..e0e36b7 Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftDarwin.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftDispatch.dylib b/camera.xcarchive/SwiftSupport/libswiftDispatch.dylib new file mode 100755 index 0000000..611ca0e Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftDispatch.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftFoundation.dylib b/camera.xcarchive/SwiftSupport/libswiftFoundation.dylib new file mode 100755 index 0000000..1e45128 Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftFoundation.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftObjectiveC.dylib b/camera.xcarchive/SwiftSupport/libswiftObjectiveC.dylib new file mode 100755 index 0000000..83becaa Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftObjectiveC.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftSecurity.dylib b/camera.xcarchive/SwiftSupport/libswiftSecurity.dylib new file mode 100755 index 0000000..5479f7c Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftSecurity.dylib differ diff --git a/camera.xcarchive/SwiftSupport/libswiftUIKit.dylib b/camera.xcarchive/SwiftSupport/libswiftUIKit.dylib new file mode 100755 index 0000000..1f50ad4 Binary files /dev/null and b/camera.xcarchive/SwiftSupport/libswiftUIKit.dylib differ diff --git a/camera.xcarchive/dSYMs/camera.app.dSYM/Contents/Info.plist b/camera.xcarchive/dSYMs/camera.app.dSYM/Contents/Info.plist new file mode 100644 index 0000000..ff880d2 --- /dev/null +++ b/camera.xcarchive/dSYMs/camera.app.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.com.imaginarycloud.camera + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0.12 + CFBundleVersion + 1 + + diff --git a/camera.xcarchive/dSYMs/camera.app.dSYM/Contents/Resources/DWARF/camera b/camera.xcarchive/dSYMs/camera.app.dSYM/Contents/Resources/DWARF/camera new file mode 100644 index 0000000..1dcdf58 Binary files /dev/null and b/camera.xcarchive/dSYMs/camera.app.dSYM/Contents/Resources/DWARF/camera differ diff --git a/camera.xcodeproj/project.pbxproj b/camera.xcodeproj/project.pbxproj index 415fc61..46fd430 100644 --- a/camera.xcodeproj/project.pbxproj +++ b/camera.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 453228F81AC2AD9A00A7EE76 /* cameraTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 453228F71AC2AD9A00A7EE76 /* cameraTests.swift */; }; 454C1F4719E82E2500C81915 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454C1F4619E82E2500C81915 /* AppDelegate.swift */; }; 454C1F4919E82E2500C81915 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454C1F4819E82E2500C81915 /* ViewController.swift */; }; 454C1F4C19E82E2500C81915 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 454C1F4A19E82E2500C81915 /* Main.storyboard */; }; @@ -14,9 +15,24 @@ 454C1F5119E82E2500C81915 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 454C1F4F19E82E2500C81915 /* LaunchScreen.xib */; }; 454C1F6719E8316A00C81915 /* CameraManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454C1F6619E8316A00C81915 /* CameraManager.swift */; }; 45A23C181A656BDC00FB48F3 /* ImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A23C171A656BDC00FB48F3 /* ImageViewController.swift */; }; + 6ECB10078678DAFF23CE9882 /* Pods_cameraTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 567B01E9DBA65A1828DFB549 /* Pods_cameraTests.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 453228F91AC2AD9A00A7EE76 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 454C1F3919E82E2500C81915 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 454C1F4019E82E2500C81915; + remoteInfo = camera; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ + 00EB71FFBFC984F6002139C5 /* Pods-cameraTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-cameraTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.release.xcconfig"; sourceTree = ""; }; + 453228F31AC2AD9A00A7EE76 /* cameraTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = cameraTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 453228F61AC2AD9A00A7EE76 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 453228F71AC2AD9A00A7EE76 /* cameraTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = cameraTests.swift; sourceTree = ""; }; 454C1F4119E82E2500C81915 /* camera.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = camera.app; sourceTree = BUILT_PRODUCTS_DIR; }; 454C1F4519E82E2500C81915 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 454C1F4619E82E2500C81915 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -26,9 +42,19 @@ 454C1F5019E82E2500C81915 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 454C1F6619E8316A00C81915 /* CameraManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraManager.swift; sourceTree = ""; }; 45A23C171A656BDC00FB48F3 /* ImageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageViewController.swift; sourceTree = ""; }; + 567B01E9DBA65A1828DFB549 /* Pods_cameraTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_cameraTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 98EEB93F92AD5EBAD7397952 /* Pods-cameraTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-cameraTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 453228F01AC2AD9A00A7EE76 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6ECB10078678DAFF23CE9882 /* Pods_cameraTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 454C1F3E19E82E2500C81915 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -39,11 +65,39 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 029DB5AC105A36F5E8CCF250 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 567B01E9DBA65A1828DFB549 /* Pods_cameraTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 453228F41AC2AD9A00A7EE76 /* cameraTests */ = { + isa = PBXGroup; + children = ( + 453228F71AC2AD9A00A7EE76 /* cameraTests.swift */, + 453228F51AC2AD9A00A7EE76 /* Supporting Files */, + ); + path = cameraTests; + sourceTree = ""; + }; + 453228F51AC2AD9A00A7EE76 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 453228F61AC2AD9A00A7EE76 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; 454C1F3819E82E2500C81915 = { isa = PBXGroup; children = ( 454C1F4319E82E2500C81915 /* camera */, + 453228F41AC2AD9A00A7EE76 /* cameraTests */, 454C1F4219E82E2500C81915 /* Products */, + 5E1F459AEBEF8047447D9A0B /* Pods */, + 029DB5AC105A36F5E8CCF250 /* Frameworks */, ); sourceTree = ""; }; @@ -51,6 +105,7 @@ isa = PBXGroup; children = ( 454C1F4119E82E2500C81915 /* camera.app */, + 453228F31AC2AD9A00A7EE76 /* cameraTests.xctest */, ); name = Products; sourceTree = ""; @@ -86,9 +141,39 @@ name = "Example app view controllers"; sourceTree = ""; }; + 5E1F459AEBEF8047447D9A0B /* Pods */ = { + isa = PBXGroup; + children = ( + 98EEB93F92AD5EBAD7397952 /* Pods-cameraTests.debug.xcconfig */, + 00EB71FFBFC984F6002139C5 /* Pods-cameraTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 453228F21AC2AD9A00A7EE76 /* cameraTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 453228FB1AC2AD9A00A7EE76 /* Build configuration list for PBXNativeTarget "cameraTests" */; + buildPhases = ( + ABCF975EEE35FA00EBD1E571 /* Check Pods Manifest.lock */, + 453228EF1AC2AD9A00A7EE76 /* Sources */, + 453228F01AC2AD9A00A7EE76 /* Frameworks */, + 453228F11AC2AD9A00A7EE76 /* Resources */, + 71784D80FA07AB38044C5279 /* Embed Pods Frameworks */, + 673474D5F20A1206A1EF8E0D /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 453228FA1AC2AD9A00A7EE76 /* PBXTargetDependency */, + ); + name = cameraTests; + productName = cameraTests; + productReference = 453228F31AC2AD9A00A7EE76 /* cameraTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 454C1F4019E82E2500C81915 /* camera */ = { isa = PBXNativeTarget; buildConfigurationList = 454C1F6019E82E2500C81915 /* Build configuration list for PBXNativeTarget "camera" */; @@ -115,6 +200,10 @@ LastUpgradeCheck = 0600; ORGANIZATIONNAME = imaginaryCloud; TargetAttributes = { + 453228F21AC2AD9A00A7EE76 = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 454C1F4019E82E2500C81915; + }; 454C1F4019E82E2500C81915 = { CreatedOnToolsVersion = 6.0.1; }; @@ -134,11 +223,19 @@ projectRoot = ""; targets = ( 454C1F4019E82E2500C81915 /* camera */, + 453228F21AC2AD9A00A7EE76 /* cameraTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 453228F11AC2AD9A00A7EE76 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 454C1F3F19E82E2500C81915 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -151,7 +248,63 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 673474D5F20A1206A1EF8E0D /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 71784D80FA07AB38044C5279 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-cameraTests/Pods-cameraTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + ABCF975EEE35FA00EBD1E571 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + 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"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ + 453228EF1AC2AD9A00A7EE76 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 453228F81AC2AD9A00A7EE76 /* cameraTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 454C1F3D19E82E2500C81915 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -165,6 +318,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 453228FA1AC2AD9A00A7EE76 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 454C1F4019E82E2500C81915 /* camera */; + targetProxy = 453228F91AC2AD9A00A7EE76 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 454C1F4A19E82E2500C81915 /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -185,6 +346,45 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 453228FC1AC2AD9A00A7EE76 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 98EEB93F92AD5EBAD7397952 /* Pods-cameraTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = cameraTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/camera.app/camera"; + }; + name = Debug; + }; + 453228FD1AC2AD9A00A7EE76 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 00EB71FFBFC984F6002139C5 /* Pods-cameraTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = cameraTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/camera.app/camera"; + }; + name = Release; + }; 454C1F5E19E82E2500C81915 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -275,6 +475,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer: Natalia Terlecki (8B96NL57N3)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Natalia Terlecki (8B96NL57N3)"; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; INFOPLIST_FILE = camera/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -289,6 +490,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Distribution: IndexSquare LDA (QM7HJTY23M)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: IndexSquare LDA (QM7HJTY23M)"; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; INFOPLIST_FILE = camera/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -300,6 +502,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 453228FB1AC2AD9A00A7EE76 /* Build configuration list for PBXNativeTarget "cameraTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 453228FC1AC2AD9A00A7EE76 /* Debug */, + 453228FD1AC2AD9A00A7EE76 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 454C1F3C19E82E2500C81915 /* Build configuration list for PBXProject "camera" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/camera.xcodeproj/project.xcworkspace/xcuserdata/nataliaterlecka.xcuserdatad/UserInterfaceState.xcuserstate b/camera.xcodeproj/project.xcworkspace/xcuserdata/nataliaterlecka.xcuserdatad/UserInterfaceState.xcuserstate index 3bd0528..dc4ebaf 100644 Binary files a/camera.xcodeproj/project.xcworkspace/xcuserdata/nataliaterlecka.xcuserdatad/UserInterfaceState.xcuserstate and b/camera.xcodeproj/project.xcworkspace/xcuserdata/nataliaterlecka.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index fe2b454..cfcc5c8 100644 --- a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -2,4 +2,22 @@ + + + + + + diff --git a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist b/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist index c12d058..c408a67 100644 --- a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,6 +12,16 @@ SuppressBuildableAutocreation + 453228E31AC2AAFA00A7EE76 + + primary + + + 453228F21AC2AD9A00A7EE76 + + primary + + 454C1F4019E82E2500C81915 primary diff --git a/camera.xcworkspace/contents.xcworkspacedata b/camera.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..27ccc4d --- /dev/null +++ b/camera.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/camera/Info.plist b/camera/Info.plist index 8e81d0f..7589b4e 100644 --- a/camera/Info.plist +++ b/camera/Info.plist @@ -2,12 +2,12 @@ - CFBundleDevelopmentRegion - en CFBundleExecutable $(EXECUTABLE_NAME) + CFBundleDevelopmentRegion + en CFBundleIdentifier - + com.imaginarycloud.camera CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/cameraTests/Info.plist b/cameraTests/Info.plist new file mode 100644 index 0000000..5782876 --- /dev/null +++ b/cameraTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.imaginarycloud.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/cameraTests/cameraTests.swift b/cameraTests/cameraTests.swift new file mode 100644 index 0000000..433b8f7 --- /dev/null +++ b/cameraTests/cameraTests.swift @@ -0,0 +1,38 @@ +// +// cameraTests.swift +// cameraTests +// +// Created by Natalia Terlecka on 25/03/15. +// Copyright (c) 2015 imaginaryCloud. All rights reserved. +// + +import UIKit +import XCTest + +import Quick + +class cameraTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + XCTAssert(true, "Pass") + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock() { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/publish.rb b/publish.rb new file mode 100755 index 0000000..e9c3c8c --- /dev/null +++ b/publish.rb @@ -0,0 +1,132 @@ +#!/usr/bin/env ruby + +#change those according to your project settings + +$workspaceName = 'camera.xcworkspace' +$schemeName = 'camera' +$releaseProvisioningProfileName = 'XC Ad Hoc: com.imaginarycloud.*' +$nameOfTheSimulatorToTest = 'iPad Retina' + + +#you can create API key here: https://rink.hockeyapp.net/manage/auth_tokens + +$hockeyAppApiKey = '7d8cbb78027a4263b6bb7644a33a9491' + + + + + +# The rest will just do the magic for you :-) + +def build() + putStatusInBlue('BUILDING') + + removeOldFiles + if buildFromIpaBuild then + putStatusInGreen('SUCESS') + else + putStatusInRed('FAILED, TRYING XCODEBUILD') + + if buildFromXcodeBuild then + putStatusInGreen('SUCESS') + + putStatusInBlue('UPLOADING TO HOCKEYAPP') + + system('ipa distribute:hockeyapp -a ' + $hockeyAppApiKey + ' -d ' + $dsymZippedName) + else + putStatusInRed('EVERYTHING FAILED') + end + end +end + +def buildFromIpaBuild() + putStatusInBlue('BUILDING WITH IPA BUILD') + + if system('ipa build -m "' + $releaseProvisioningProfileName + '" --workspace ' + $workspaceName + '" --scheme ' + $schemeName) then + system('ipa distribute:hockeyapp -a ' + $hockeyAppApiKey) + return true + else + return false + end +end + +def buildFromXcodeBuild() + + putStatusInBlue('BUILDING WITH XCODEBUILD') + + if system('xcodebuild clean archive -workspace ' + $workspaceName + ' -scheme ' + $schemeName + ' -archivePath ' + $archivePath) then + putStatusInBlue('EXPORTING IPA') + + if system('xcodebuild -exportArchive -archivePath ' + $archivePath + ' -exportPath ' + $schemeName + ' -exportFormat ipa -exportProvisioningProfile "' + $releaseProvisioningProfileName + '"') then + + system('zip -r ' + $dsymZippedName + ' ' + $dsymPath) + return true + else + return false + end + else + return false + end +end + +def removeOldFiles() + if system('test -d ' + $archivePath) then + putStatusInBlue('REMOVING OLD ARCHIVE FILE') + system('rm -R' + $archivePath) + end + if system('test -f ' + $schemeName + '.ipa') then + putStatusInBlue('REMOVING OLD IPA FILE') + system('rm ' + $schemeName + '.ipa') + end + if system('test -f ' + $dsymZippedName) then + putStatusInBlue('REMOVING OLD DSYM FILE') + system('rm ' + $dsymZippedName) + end +end + +def putStatusInRed(status) + puts " " + puts ">>>>>>>> ".red + status.red + " <<<<<<<<".red + puts " " +end + +def putStatusInBlue(status) + puts " " + puts ">>>>>>>> ".blue + status.blue + " <<<<<<<<".blue + puts " " +end + +def putStatusInGreen(status) + puts " " + puts ">>>>>>>> ".green + status.green + " <<<<<<<<".green + puts " " +end + +class String + def red; "\033[31m#{self}\033[0m" end + def green; "\033[32m#{self}\033[0m" end + def blue; "\033[34m#{self}\033[0m" end +end + + +$archivePath = $schemeName + '.xcarchive' +$dsymZippedName = $schemeName + '.app.dSYM.zip' +$dsymPath = $archivePath + '/dSYMs/' + $schemeName + '.app.dSYM' + +putStatusInBlue('TESTING') + +if system('xctool -workspace ' + $workspaceName + ' -scheme ' + $schemeName + ' -sdk iphonesimulator test') then + build +else + putStatusInRed('XCTOOL FAILED - TRYING XCODEBUILD') + + if system('xcodebuild clean test -scheme ' + $schemeName + ' -workspace ' + $workspaceName + ' -destination \'platform=iOS Simulator,name=' + $nameOfTheSimulatorToTest + '\'') then + build + else + putStatusInRed('XCODEBUILD TEST FAILED') + end +end + + + +