diff --git a/Nimble.podspec b/Nimble.podspec index c798f452a..eade52267 100644 --- a/Nimble.podspec +++ b/Nimble.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Nimble" - s.version = "9.2.0" + s.version = "10.0.0" s.summary = "A Matcher Framework for Swift and Objective-C" s.description = <<-DESC Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by Cedar. diff --git a/Package.swift b/Package.swift index 187f5c95f..87dfc5f46 100644 --- a/Package.swift +++ b/Package.swift @@ -14,7 +14,7 @@ let package = Package( ], targets: [ .target( - name: "Nimble", + name: "Nimble", dependencies: [ .product(name: "CwlPreconditionTesting", package: "CwlPreconditionTesting", condition: .when(platforms: [.macOS, .iOS])), @@ -24,8 +24,8 @@ let package = Package( exclude: ["Info.plist"] ), .testTarget( - name: "NimbleTests", - dependencies: ["Nimble"], + name: "NimbleTests", + dependencies: ["Nimble"], exclude: ["objc", "Info.plist"] ), ], diff --git a/docs/Classes.html b/docs/Classes.html new file mode 100644 index 000000000..c03d9ade0 --- /dev/null +++ b/docs/Classes.html @@ -0,0 +1,1241 @@ + + + + Classes Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Classes

+

The following classes are available globally.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    A simple NSException subclass. It’s not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(BadInstructionException)
    +public class BadInstructionException : NSException
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AssertionDispatcher + +
    +
    +
    +
    +
    +
    +

    AssertionDispatcher allows multiple AssertionHandlers to receive +assertion messages.

    + +

    @warning Does not fully dispatch if one of the handlers raises an exception. + This is possible with XCTest-based assertion handlers.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class AssertionDispatcher : AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AssertionRecorder + +
    +
    +
    +
    +
    +
    +

    An AssertionHandler that silently records assertions that Nimble makes. +This is useful for testing failure messages for matchers.

    + +

    @see AssertionHandler

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class AssertionRecorder : AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBExpectation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBExpectation : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NimbleXCTestHandler + +
    +
    +
    +
    +
    +
    +

    Default handler for Nimble. This assertion handler passes failures along to +XCTest.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NimbleXCTestHandler : AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Alternative handler for Nimble. This assertion handler passes failures along +to XCTest by attempting to reduce the failure message size.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NimbleShortXCTestHandler : AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBExpectationMessage + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBExpectationMessage : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + FailureMessage + +
    +
    +
    +
    +
    +
    +

    Encapsulates the failure message that matchers can report to the end user.

    + +

    This is shared state between Nimble and matchers that mutate this value.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class FailureMessage : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBPredicate + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBPredicate : NSObject
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBObjCBeCloseToPredicate : NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBPredicateResult + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    final public class NMBPredicateResult : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBPredicateStatus + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    final public class NMBPredicateStatus : NSObject
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBObjCRaiseExceptionPredicate : NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Without Mach exceptions or the Objective-C runtime, there’s nothing to put in the exception object. It’s really just a boolean – either a SIGILL was caught or not.

    + +
    +
    +
    +
  • +
  • +
    + + + + SourceLocation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public final class SourceLocation : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBStringer + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class NMBStringer : NSObject
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/AssertionDispatcher.html b/docs/Classes/AssertionDispatcher.html new file mode 100644 index 000000000..caf01ff22 --- /dev/null +++ b/docs/Classes/AssertionDispatcher.html @@ -0,0 +1,854 @@ + + + + AssertionDispatcher Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AssertionDispatcher

+
+
+ +
public class AssertionDispatcher : AssertionHandler
+ +
+
+

AssertionDispatcher allows multiple AssertionHandlers to receive +assertion messages.

+ +

@warning Does not fully dispatch if one of the handlers raises an exception. + This is possible with XCTest-based assertion handlers.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/Classes/AssertionRecorder.html b/docs/Classes/AssertionRecorder.html new file mode 100644 index 000000000..94e6f3fb8 --- /dev/null +++ b/docs/Classes/AssertionRecorder.html @@ -0,0 +1,880 @@ + + + + AssertionRecorder Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AssertionRecorder

+
+
+ +
public class AssertionRecorder : AssertionHandler
+ +
+
+

An AssertionHandler that silently records assertions that Nimble makes. +This is useful for testing failure messages for matchers.

+ +

@see AssertionHandler

+ +
+
+
+
    +
  • +
    + + + + assertions + +
    +
    +
    +
    +
    +
    +

    All the assertions that were captured by this recorder

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var assertions: [AssertionRecord]
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init()
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/BadInstructionException.html b/docs/Classes/BadInstructionException.html new file mode 100644 index 000000000..ee64592aa --- /dev/null +++ b/docs/Classes/BadInstructionException.html @@ -0,0 +1,852 @@ + + + + BadInstructionException Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

BadInstructionException

+
+
+ +
@objc(BadInstructionException)
+public class BadInstructionException : NSException
+ +
+
+

A simple NSException subclass. It’s not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type.

+ +
+
+
+
    +
  • +
    + + + + init(coder:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    required public init?(coder aDecoder: NSCoder)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + receiveReply(_:) + +
    +
    +
    +
    +
    +
    +

    An Objective-C callable function, invoked from the mach_exc_server callback function catch_mach_exception_raise_state to push the raiseBadInstructionException function onto the stack.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(receiveReply:)
    +public class func receiveReply(_ reply: bad_instruction_exception_reply_t) -> CInt
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/FailureMessage.html b/docs/Classes/FailureMessage.html new file mode 100644 index 000000000..58d888fac --- /dev/null +++ b/docs/Classes/FailureMessage.html @@ -0,0 +1,1070 @@ + + + + FailureMessage Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

FailureMessage

+
+
+ +
public class FailureMessage : NSObject
+ +
+
+

Encapsulates the failure message that matchers can report to the end user.

+ +

This is shared state between Nimble and matchers that mutate this value.

+ +
+
+
+
    +
  • +
    + + + + expected + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var expected: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + actualValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var actualValue: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + to + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var to: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + postfixMessage + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var postfixMessage: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + postfixActual + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var postfixActual: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + extendedMessage + +
    +
    +
    +
    +
    +
    +

    An optional message that will be appended as a new line and provides additional details +about the failure. This message will only be visible in the issue navigator / in logs but +not directly in the source editor since only a single line is presented there.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var extendedMessage: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + userDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var userDescription: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + stringValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var stringValue: String { get set }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public override init()
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(stringValue:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringValue: String)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/NMBExpectation.html b/docs/Classes/NMBExpectation.html new file mode 100644 index 000000000..ac5fee61c --- /dev/null +++ b/docs/Classes/NMBExpectation.html @@ -0,0 +1,1440 @@ + + + + NMBExpectation Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBExpectation

+
+
+ +
public class NMBExpectation : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public init(actualBlock: @escaping () -> NSObject?, negative: Bool, file: FileString, line: UInt)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + withTimeout + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var withTimeout: (TimeInterval) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + to + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var to: (NMBPredicate) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toWithDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toWithDescription: (NMBPredicate, String) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNot + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNot: (NMBPredicate) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNotWithDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNotWithDescription: (NMBPredicate, String) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + notTo + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var notTo: (NMBPredicate) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + notToWithDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var notToWithDescription: (NMBPredicate, String) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toEventually + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toEventually: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toEventuallyWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toEventuallyNot + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toEventuallyNot: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toEventuallyNotWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNotEventually + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNotEventually: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNotEventuallyWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNever + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNever: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNeverWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + neverTo + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var neverTo: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var neverToWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toAlways + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toAlways: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toAlwaysWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + alwaysTo + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var alwaysTo: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var alwaysToWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func failWithMessage(_ message: String, file: FileString, line: UInt)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/NMBExpectationMessage.html b/docs/Classes/NMBExpectationMessage.html new file mode 100644 index 000000000..f82eab3f4 --- /dev/null +++ b/docs/Classes/NMBExpectationMessage.html @@ -0,0 +1,1066 @@ + + + + NMBExpectationMessage Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBExpectationMessage

+
+
+ +
public class NMBExpectationMessage : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + init(expectedTo:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expectedTo message: String)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expectedActualValueTo message: String)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expectedActualValueTo message: String, customActualValue actual: String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(fail:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(fail message: String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(prepend:child:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(prepend message: String, child: NMBExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(appendedMessage message: String, child: NMBExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(prependedMessage message: String, child: NMBExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(details:child:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(details message: String, child: NMBExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appendedBeNilHint() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func appendedBeNilHint() -> NMBExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toSwift() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toSwift() -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/NMBObjCBeCloseToPredicate.html b/docs/Classes/NMBObjCBeCloseToPredicate.html new file mode 100644 index 000000000..f0fe62b47 --- /dev/null +++ b/docs/Classes/NMBObjCBeCloseToPredicate.html @@ -0,0 +1,824 @@ + + + + NMBObjCBeCloseToPredicate Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBObjCBeCloseToPredicate

+
+
+ +
public class NMBObjCBeCloseToPredicate : NMBPredicate
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + within + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var within: (CDouble) -> NMBObjCBeCloseToPredicate { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/NMBObjCRaiseExceptionPredicate.html b/docs/Classes/NMBObjCRaiseExceptionPredicate.html new file mode 100644 index 000000000..324708b51 --- /dev/null +++ b/docs/Classes/NMBObjCRaiseExceptionPredicate.html @@ -0,0 +1,908 @@ + + + + NMBObjCRaiseExceptionPredicate Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBObjCRaiseExceptionPredicate

+
+
+ +
public class NMBObjCRaiseExceptionPredicate : NMBPredicate
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + named + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var named: (_ name: String) -> NMBObjCRaiseExceptionPredicate { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + reason + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionPredicate { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + userInfo + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionPredicate { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyingBlock + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionPredicate { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/NMBPredicate.html b/docs/Classes/NMBPredicate.html new file mode 100644 index 000000000..54ef19157 --- /dev/null +++ b/docs/Classes/NMBPredicate.html @@ -0,0 +1,1536 @@ + + + + NMBPredicate Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBPredicate

+
+
+ +
public class NMBPredicate : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + init(predicate:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(predicate: @escaping PredicateBlock)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allPassMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func allPassMatcher(_ predicate: NMBPredicate) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAKindOfMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmptyMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beEmptyMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beLessThanMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

beTruthy() / beFalsy() +

+
+
+
    +
  • +
    + + + + beTruthyMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beTruthyMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFalsyMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beFalsyMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beTrueMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beTrueMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFalseMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beFalseMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beNilMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beNilMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWithMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beginWithMatcher(_ expected: Any) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + containMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func containMatcher(_ expected: [NSObject]) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func containElementSatisfyingMatcher(_ predicate: @escaping ((NSObject) -> Bool)) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + endWithMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func endWithMatcher(_ expected: Any) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equalMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func equalMatcher(_ expected: NSObject) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + haveCountMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func haveCountMatcher(_ expected: NSNumber) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + matchMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func matchMatcher(_ expected: NSString) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func satisfyAllOfMatcher(_ predicates: [NMBPredicate]) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func satisfyAnyOfMatcher(_ predicates: [NMBPredicate]) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/NMBPredicateResult.html b/docs/Classes/NMBPredicateResult.html new file mode 100644 index 000000000..a29df4289 --- /dev/null +++ b/docs/Classes/NMBPredicateResult.html @@ -0,0 +1,931 @@ + + + + NMBPredicateResult Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBPredicateResult

+
+
+ +
final public class NMBPredicateResult : NSObject
+ +
+
+

Undocumented

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/Classes/NMBPredicateStatus.html b/docs/Classes/NMBPredicateStatus.html new file mode 100644 index 000000000..131179e15 --- /dev/null +++ b/docs/Classes/NMBPredicateStatus.html @@ -0,0 +1,1012 @@ + + + + NMBPredicateStatus Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBPredicateStatus

+
+
+ +
final public class NMBPredicateStatus : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + matches + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let matches: NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + doesNotMatch + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let doesNotMatch: NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let fail: NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + hash + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public override var hash: Int { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isEqual(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public override func isEqual(_ object: Any?) -> Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + from(status:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func from(status: PredicateStatus) -> NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + from(bool:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func from(bool success: Bool) -> NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toSwift() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toSwift() -> PredicateStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/NMBStringer.html b/docs/Classes/NMBStringer.html new file mode 100644 index 000000000..e8f8b54c9 --- /dev/null +++ b/docs/Classes/NMBStringer.html @@ -0,0 +1,825 @@ + + + + NMBStringer Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBStringer

+
+
+ +
@objc
+public class NMBStringer : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + stringify(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func stringify(_ obj: Any?) -> String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Classes/NimbleShortXCTestHandler.html b/docs/Classes/NimbleShortXCTestHandler.html new file mode 100644 index 000000000..434d51f30 --- /dev/null +++ b/docs/Classes/NimbleShortXCTestHandler.html @@ -0,0 +1,824 @@ + + + + NimbleShortXCTestHandler Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NimbleShortXCTestHandler

+
+
+ +
public class NimbleShortXCTestHandler : AssertionHandler
+ +
+
+

Alternative handler for Nimble. This assertion handler passes failures along +to XCTest by attempting to reduce the failure message size.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/Classes/NimbleXCTestHandler.html b/docs/Classes/NimbleXCTestHandler.html new file mode 100644 index 000000000..3b1fc8581 --- /dev/null +++ b/docs/Classes/NimbleXCTestHandler.html @@ -0,0 +1,824 @@ + + + + NimbleXCTestHandler Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NimbleXCTestHandler

+
+
+ +
public class NimbleXCTestHandler : AssertionHandler
+ +
+
+

Default handler for Nimble. This assertion handler passes failures along to +XCTest.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/Classes/SourceLocation.html b/docs/Classes/SourceLocation.html new file mode 100644 index 000000000..2ba6bc901 --- /dev/null +++ b/docs/Classes/SourceLocation.html @@ -0,0 +1,877 @@ + + + + SourceLocation Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

SourceLocation

+
+
+ +
public final class SourceLocation : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + file + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let file: FileString
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + line + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let line: UInt
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var description: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Enums.html b/docs/Enums.html new file mode 100644 index 000000000..3cba5283a --- /dev/null +++ b/docs/Enums.html @@ -0,0 +1,903 @@ + + + + Enumerations Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Enumerations

+

The following enumerations are available globally.

+ +
+
+
+
    +
  • +
    + + + + ExpectationMessage + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public indirect enum ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ExpectationStyle + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ExpectationStyle
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PredicateStatus + +
    +
    +
    +
    +
    +
    +

    PredicateStatus is a trinary that indicates if a Predicate matches a given value or not

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum PredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ToSucceedResult + +
    +
    +
    +
    +
    +
    +

    Used by the succeed matcher.

    + +

    This is the return type for the closure.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ToSucceedResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Enums/ExpectationMessage.html b/docs/Enums/ExpectationMessage.html new file mode 100644 index 000000000..9a981b38d --- /dev/null +++ b/docs/Enums/ExpectationMessage.html @@ -0,0 +1,1206 @@ + + + + ExpectationMessage Enumeration Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

ExpectationMessage

+
+
+ +
public indirect enum ExpectationMessage
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    includes actual value in output (“expected to , got ”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case expectedActualValueTo(String)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    uses a custom actual value string in output (“expected to , got ”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case expectedCustomValueTo(String, actual: String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expectedTo(_:) + +
    +
    +
    +
    +
    +
    +

    excludes actual value in output (“expected to ”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case expectedTo(String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail(_:) + +
    +
    +
    +
    +
    +
    +

    allows any free-form message (“”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case fail(String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + prepends(_:_:) + +
    +
    +
    +
    +
    +
    +

    Not Fully Implemented Yet.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case prepends(String, ExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appends(_:_:) + +
    +
    +
    +
    +
    +
    +

    appends after an existing message (“ (use beNil() to match nils)”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case appends(ExpectationMessage, String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + details(_:_:) + +
    +
    +
    +
    +
    +
    +

    provides long-form multi-line explainations (“\n\n”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case details(ExpectationMessage, String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expectedMessage + +
    +
    +
    +
    +
    +
    +

    Returns the smallest message after the “expected to” string that summarizes the error.

    + +

    Returns the message part from ExpectationMessage, ignoring all .appends and .details.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var expectedMessage: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appended(message:) + +
    +
    +
    +
    +
    +
    +

    Appends a message after the primary expectation message

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func appended(message: String) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appendedBeNilHint() + +
    +
    +
    +
    +
    +
    +

    Appends a message hinting to use beNil() for when the actual value given was nil.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func appendedBeNilHint() -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appended(details:) + +
    +
    +
    +
    +
    +
    +

    Appends a detailed (aka - multiline) message after the primary expectation message +Detailed messages will be placed after .appended(message:) calls.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func appended(details: String) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Replaces a primary expectation with one returned by f. Preserves all composite expectations +that were built upon it (aka - all appended(message:) and appended(details:).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func replacedExpectation(_ f: @escaping (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Wraps a primary expectation with text before and after it. +Alias to prepended(message: before).appended(message: after)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func wrappedExpectation(before: String, after: String) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Prepends a message by modifying the primary expectation

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func prepended(expectation message: String) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Converts the tree of ExpectationMessages into a final built string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toString(actual: String, expected: String = "expected", to: String = "to") -> String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Enums/ExpectationStyle.html b/docs/Enums/ExpectationStyle.html new file mode 100644 index 000000000..120ebda6e --- /dev/null +++ b/docs/Enums/ExpectationStyle.html @@ -0,0 +1,850 @@ + + + + ExpectationStyle Enumeration Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

ExpectationStyle

+
+
+ +
public enum ExpectationStyle
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + toMatch + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case toMatch
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNotMatch + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case toNotMatch
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Enums/PredicateStatus.html b/docs/Enums/PredicateStatus.html new file mode 100644 index 000000000..79e866508 --- /dev/null +++ b/docs/Enums/PredicateStatus.html @@ -0,0 +1,942 @@ + + + + PredicateStatus Enumeration Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

PredicateStatus

+
+
+ +
public enum PredicateStatus
+ +
+
+

PredicateStatus is a trinary that indicates if a Predicate matches a given value or not

+ +
+
+
+
    +
  • +
    + + + + matches + +
    +
    +
    +
    +
    +
    +

    Matches indicates if the predicate / matcher passes with the given value

    + +

    For example, equals(1) returns .matches for expect(1).to(equal(1)).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case matches
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + doesNotMatch + +
    +
    +
    +
    +
    +
    +

    DoesNotMatch indicates if the predicate / matcher fails with the given value, but would +succeed if the expectation was inverted.

    + +

    For example, equals(2) returns .doesNotMatch for expect(1).toNot(equal(2)).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case doesNotMatch
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail + +
    +
    +
    +
    +
    +
    +

    Fail indicates the predicate will never satisfy with the given value in any case. +A perfect example is that most matchers fail whenever given nil.

    + +

    Using equal(1) fails both expect(nil).to(equal(1)) and expect(nil).toNot(equal(1)). +Note: Predicate’s requireNonNil property will also provide this feature mostly for free. + Your predicate will still need to guard against nils, but error messaging will be + handled for you.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case fail
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(bool:) + +
    +
    +
    +
    +
    +
    +

    Converts a boolean to either .matches (if true) or .doesNotMatch (if false).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(bool matches: Bool)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toObjectiveC() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toObjectiveC() -> NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Enums/ToSucceedResult.html b/docs/Enums/ToSucceedResult.html new file mode 100644 index 000000000..170f888c8 --- /dev/null +++ b/docs/Enums/ToSucceedResult.html @@ -0,0 +1,852 @@ + + + + ToSucceedResult Enumeration Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

ToSucceedResult

+
+
+ +
public enum ToSucceedResult
+ +
+
+

Used by the succeed matcher.

+ +

This is the return type for the closure.

+ +
+
+
+
    +
  • +
    + + + + succeeded + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case succeeded
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + failed(reason:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case failed(reason: String)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions.html b/docs/Extensions.html new file mode 100644 index 000000000..3b18f4c2d --- /dev/null +++ b/docs/Extensions.html @@ -0,0 +1,1524 @@ + + + + Extensions Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Extensions

+

The following extensions are available globally.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/Extensions/AnySequence.html b/docs/Extensions/AnySequence.html new file mode 100644 index 000000000..06bfca5d0 --- /dev/null +++ b/docs/Extensions/AnySequence.html @@ -0,0 +1,822 @@ + + + + AnySequence Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AnySequence

+
+
+ +
extension AnySequence: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Array.html b/docs/Extensions/Array.html new file mode 100644 index 000000000..0d7da297a --- /dev/null +++ b/docs/Extensions/Array.html @@ -0,0 +1,822 @@ + + + + Array Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Array

+
+
+ +
extension Array: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Data.html b/docs/Extensions/Data.html new file mode 100644 index 000000000..e0536e365 --- /dev/null +++ b/docs/Extensions/Data.html @@ -0,0 +1,822 @@ + + + + Data Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Data

+
+
+ +
extension Data: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Date.html b/docs/Extensions/Date.html new file mode 100644 index 000000000..5b5f32a75 --- /dev/null +++ b/docs/Extensions/Date.html @@ -0,0 +1,850 @@ + + + + Date Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Date

+
+
+ +
extension Date: NMBDoubleConvertible
+
extension Date: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + doubleValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var doubleValue: CDouble { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Double.html b/docs/Extensions/Double.html new file mode 100644 index 000000000..f35ad9ab1 --- /dev/null +++ b/docs/Extensions/Double.html @@ -0,0 +1,849 @@ + + + + Double Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Double

+
+
+ +
extension Double: ExpressibleByBooleanLiteral
+
extension Double: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Float.html b/docs/Extensions/Float.html new file mode 100644 index 000000000..bb1f43a8b --- /dev/null +++ b/docs/Extensions/Float.html @@ -0,0 +1,849 @@ + + + + Float Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Float

+
+
+ +
extension Float: ExpressibleByBooleanLiteral
+
extension Float: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Int.html b/docs/Extensions/Int.html new file mode 100644 index 000000000..59fab0b39 --- /dev/null +++ b/docs/Extensions/Int.html @@ -0,0 +1,821 @@ + + + + Int Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int

+
+
+ +
extension Int: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Int16.html b/docs/Extensions/Int16.html new file mode 100644 index 000000000..f74c131f9 --- /dev/null +++ b/docs/Extensions/Int16.html @@ -0,0 +1,821 @@ + + + + Int16 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int16

+
+
+ +
extension Int16: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Int32.html b/docs/Extensions/Int32.html new file mode 100644 index 000000000..4e21a0b49 --- /dev/null +++ b/docs/Extensions/Int32.html @@ -0,0 +1,821 @@ + + + + Int32 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int32

+
+
+ +
extension Int32: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Int64.html b/docs/Extensions/Int64.html new file mode 100644 index 000000000..0c81d7a79 --- /dev/null +++ b/docs/Extensions/Int64.html @@ -0,0 +1,821 @@ + + + + Int64 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int64

+
+
+ +
extension Int64: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/Int8.html b/docs/Extensions/Int8.html new file mode 100644 index 000000000..f21032c1f --- /dev/null +++ b/docs/Extensions/Int8.html @@ -0,0 +1,821 @@ + + + + Int8 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int8

+
+
+ +
extension Int8: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/NSArray.html b/docs/Extensions/NSArray.html new file mode 100644 index 000000000..18e83ac55 --- /dev/null +++ b/docs/Extensions/NSArray.html @@ -0,0 +1,824 @@ + + + + NSArray Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSArray

+
+
+ +
extension NSArray: NMBContainer
+
extension NSArray: NMBOrderedCollection
+
extension NSArray: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/NSDate.html b/docs/Extensions/NSDate.html new file mode 100644 index 000000000..f065b2bde --- /dev/null +++ b/docs/Extensions/NSDate.html @@ -0,0 +1,850 @@ + + + + NSDate Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSDate

+
+
+ +
extension NSDate: NMBDoubleConvertible
+
extension NSDate: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + doubleValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var doubleValue: CDouble { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/NSException.html b/docs/Extensions/NSException.html new file mode 100644 index 000000000..4150a3d75 --- /dev/null +++ b/docs/Extensions/NSException.html @@ -0,0 +1,822 @@ + + + + NSException Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSException

+
+
+ +
extension NSException
+ +
+
+ +
+
+
+
    +
  • +
    + + + + catchException(in:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func catchException(in block: @escaping () -> Void) -> `Self`?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/NSIndexSet.html b/docs/Extensions/NSIndexSet.html new file mode 100644 index 000000000..56aa85a90 --- /dev/null +++ b/docs/Extensions/NSIndexSet.html @@ -0,0 +1,823 @@ + + + + NSIndexSet Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSIndexSet

+
+
+ +
extension NSIndexSet: NMBCollection
+
extension NSIndexSet: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/NSNumber.html b/docs/Extensions/NSNumber.html new file mode 100644 index 000000000..7476faee2 --- /dev/null +++ b/docs/Extensions/NSNumber.html @@ -0,0 +1,851 @@ + + + + NSNumber Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSNumber

+
+
+ +
extension NSNumber: NMBDoubleConvertible
+
extension NSNumber: NMBComparable
+
extension NSNumber: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + NMB_compare(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/NSString.html b/docs/Extensions/NSString.html new file mode 100644 index 000000000..3454bbd61 --- /dev/null +++ b/docs/Extensions/NSString.html @@ -0,0 +1,822 @@ + + + + NSString Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSString

+
+
+ +
extension NSString: NMBComparable
+ +
+
+ +
+
+
+
    +
  • +
    + + + + NMB_compare(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/String.html b/docs/Extensions/String.html new file mode 100644 index 000000000..5cd71bbbe --- /dev/null +++ b/docs/Extensions/String.html @@ -0,0 +1,822 @@ + + + + String Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

String

+
+
+ +
extension String: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/UInt.html b/docs/Extensions/UInt.html new file mode 100644 index 000000000..03d41ad5c --- /dev/null +++ b/docs/Extensions/UInt.html @@ -0,0 +1,821 @@ + + + + UInt Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt

+
+
+ +
extension UInt: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/UInt16.html b/docs/Extensions/UInt16.html new file mode 100644 index 000000000..0eac6a8a7 --- /dev/null +++ b/docs/Extensions/UInt16.html @@ -0,0 +1,821 @@ + + + + UInt16 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt16

+
+
+ +
extension UInt16: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/UInt32.html b/docs/Extensions/UInt32.html new file mode 100644 index 000000000..6c326b73c --- /dev/null +++ b/docs/Extensions/UInt32.html @@ -0,0 +1,821 @@ + + + + UInt32 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt32

+
+
+ +
extension UInt32: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/UInt64.html b/docs/Extensions/UInt64.html new file mode 100644 index 000000000..b937628af --- /dev/null +++ b/docs/Extensions/UInt64.html @@ -0,0 +1,821 @@ + + + + UInt64 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt64

+
+
+ +
extension UInt64: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Extensions/UInt8.html b/docs/Extensions/UInt8.html new file mode 100644 index 000000000..ada330ae9 --- /dev/null +++ b/docs/Extensions/UInt8.html @@ -0,0 +1,821 @@ + + + + UInt8 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt8

+
+
+ +
extension UInt8: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Functions.html b/docs/Functions.html new file mode 100644 index 000000000..4ca169d97 --- /dev/null +++ b/docs/Functions.html @@ -0,0 +1,5439 @@ + + + + Functions Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Functions

+

The following functions are available globally.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Run the provided block. If a mach “BAD_INSTRUCTION” exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil. +NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a “BAD_INSTRUCTION” exception is raised, the block will be exited before completion via Objective-C exception. The risks associated with an Objective-C exception apply here: most Swift/Objective-C functions are not exception-safe. Memory may be leaked and the program will not necessarily be left in a safe state.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func catchBadInstruction(in block: @escaping () -> Void) -> BadInstructionException?
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + block + + +
    +

    a function without parameters that will be run

    +
    +
    +
    +
    +

    Return Value

    +

    if an EXC_BAD_INSTRUCTION is raised during the execution of block then a BadInstructionException will be returned, otherwise nil.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func MACH_MSGH_BITS_REMOTE(_ bits: UInt32) -> UInt32
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MACH_MSGH_BITS(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func MACH_MSGH_BITS(_ remote: UInt32, _ local: UInt32) -> UInt32
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler,
    +                                 file: FileString = #file,
    +                                 line: UInt = #line,
    +                                 closure: () throws -> Void)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Captures expectations that occur in the given closure. Note that all +expectations will still go through to the default Nimble handler.

    + +

    This can be useful if you want to gather information about expectations +that occur within a closure.

    + +

    @param silently expectations are no longer send to the default Nimble + assertion handler when this is true. Defaults to false.

    + +

    @see gatherFailingExpectations

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func gatherExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord]
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Captures failed expectations that occur in the given closure. Note that all +expectations will still go through to the default Nimble handler.

    + +

    This can be useful if you want to gather information about failed +expectations that occur within a closure.

    + +

    @param silently expectations are no longer send to the default Nimble + assertion handler when this is true. Defaults to false.

    + +

    @see gatherExpectations +@see raiseException source for an example use case.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func gatherFailingExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord]
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func recordFailure(_ message: String, location: SourceLocation)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Wait asynchronously until the done closure is called or the timeout has been reached.

    + +

    @discussion +Call the done() closure to indicate the waiting has completed.

    + +

    This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func waitUntil(timeout: DispatchTimeInterval = AsyncDefaults.timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expect(file:line:_:) + +
    +
    +
    +
    +
    +
    +

    Make an expectation on a given actual value. The value given is lazily evaluated.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func expect<T>(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () throws -> T?) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expect(file:line:_:) + +
    +
    +
    +
    +
    +
    +

    Make an expectation on a given actual value. The closure is lazily invoked.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func expect<T>(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T)) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expect(file:line:_:) + +
    +
    +
    +
    +
    +
    +

    Make an expectation on a given actual value. The closure is lazily invoked.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func expect<T>(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T?)) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expect(file:line:_:) + +
    +
    +
    +
    +
    +
    +

    Make an expectation on a given actual value. The closure is lazily invoked.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> Void)) -> Expectation<Void>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail(_:location:) + +
    +
    +
    +
    +
    +
    +

    Always fails the test with a message and a specified location.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func fail(_ message: String, location: SourceLocation)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail(_:file:line:) + +
    +
    +
    +
    +
    +
    +

    Always fails the test with a message.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func fail(_ message: String, file: FileString = #file, line: UInt = #line)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail(_:line:) + +
    +
    +
    +
    +
    +
    +

    Always fails the test.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func fail(_ file: FileString = #file, line: UInt = #line)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allPass(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func allPass<S: Sequence>(
    +    _ passFunc: @escaping (S.Element) throws -> Bool
    +) -> Predicate<S>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allPass(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func allPass<S: Sequence>(
    +    _ passName: String,
    +    _ passFunc: @escaping (S.Element) throws -> Bool
    +) -> Predicate<S>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allPass(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func allPass<S>(_ elementPredicate: Predicate<S.Element>) -> Predicate<S> where S : Sequence
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAKindOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is an instance of the given class.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beAKindOf<T>(_ expectedType: T.Type) -> Predicate<Any>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAKindOf(_:) + +
    +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beAKindOf(_ expectedClass: AnyClass) -> Predicate<NSObject>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAnInstanceOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is an exact instance of the given class.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beAnInstanceOf<T>(_ expectedType: T.Type) -> Predicate<Any>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAnInstanceOf(_:) + +
    +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate<NSObject>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + defaultDelta() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func defaultDelta<F>() -> F where F : FloatingPoint
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beCloseTo(_:within:) + +
    +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beCloseTo<Value: FloatingPoint>(
    +    _ expectedValue: Value,
    +    within delta: Value = defaultDelta()
    +) -> Predicate<Value>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beCloseTo(_:within:) + +
    +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beCloseTo<Value: NMBDoubleConvertible>(
    +    _ expectedValue: Value,
    +    within delta: Double = DefaultDelta
    +) -> Predicate<Value>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beCloseTo(_:within:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beCloseTo<Value: FloatingPoint, Values: Collection>(
    +    _ expectedValues: Values,
    +    within delta: Value = defaultDelta()
    +) -> Predicate<Values> where Values.Element == Value
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Operators +

+
+
+
    +
  • +
    + + + + ±(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ± <Value>(lhs: Value, rhs: Value) -> (expected: Value, delta: Value) where Value : FloatingPoint
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ±(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ± <Value>(lhs: Value, rhs: Double) -> (expected: Value, delta: Double) where Value : NMBDoubleConvertible
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty<S>() -> Predicate<S> where S : Sequence
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty<S>() -> Predicate<S> where S : SetAlgebra
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty<S>() -> Predicate<S> where S : Sequence, S : SetAlgebra
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when a value is “empty”. For collections, this +means the are no items in that collection. For NSString instances, it is an empty string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<NSString>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<NSDictionary>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<NSArray>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<NMBCollection>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beGreaterThan(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is greater than the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beGreaterThan<T>(_ expectedValue: T?) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + >(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func > <T>(lhs: Expectation<T>, rhs: T) where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beGreaterThan(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is greater than the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate<NMBComparable>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + >(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func > (lhs: Expectation<NMBComparable>, rhs: NMBComparable?)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is greater than +or equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beGreaterThanOrEqualTo<T>(_ expectedValue: T?) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + >=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func >= <T>(lhs: Expectation<T>, rhs: T) where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is greater than +or equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beGreaterThanOrEqualTo<T>(_ expectedValue: T?) -> Predicate<T> where T : NMBComparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + >=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func >= <T>(lhs: Expectation<T>, rhs: T) where T : NMBComparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beIdenticalTo(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is the same instance +as the expected instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beIdenticalTo(_ expected: AnyObject?) -> Predicate<AnyObject>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + be(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is the same instance +as the expected instance.

    + +

    Alias for “beIdenticalTo”.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func be(_ expected: AnyObject?) -> Predicate<AnyObject>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beLessThan(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is less than the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beLessThan<T>(_ expectedValue: T?) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + <(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func < <T>(lhs: Expectation<T>, rhs: T) where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beLessThan(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is less than the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate<NMBComparable>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + <(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func < (lhs: Expectation<NMBComparable>, rhs: NMBComparable?)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is less than +or equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beLessThanOrEqualTo<T>(_ expectedValue: T?) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + <=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func <= <T>(lhs: Expectation<T>, rhs: T) where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is less than +or equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beLessThanOrEqualTo<T>(_ expectedValue: T?) -> Predicate<T> where T : NMBComparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + <=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func <= <T>(lhs: Expectation<T>, rhs: T) where T : NMBComparable
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

beTrue() / beFalse() +

+
+
+
    +
  • +
    + + + + beTrue() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is exactly true. +This matcher will not match against nils.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beTrue() -> Predicate<Bool>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFalse() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is exactly false. +This matcher will not match against nils.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beFalse() -> Predicate<Bool>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

beTruthy() / beFalsy() +

+
+
+
    +
  • +
    + + + + beTruthy() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is not logically false.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beTruthy<T>() -> Predicate<T> where T : Equatable, T : ExpressibleByBooleanLiteral
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFalsy() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is logically false. +This matcher will match against nils.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beFalsy<T>() -> Predicate<T> where T : Equatable, T : ExpressibleByBooleanLiteral
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beNil() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is nil.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beNil<T>() -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beSuccess(test:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher for Result that succeeds when the actual value is success.

    + +

    You can pass a closure to do any arbitrary custom matching to the value inside result. +The closure only gets called when the result is success.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beSuccess<Success, Failure>(
    +    test: ((Success) -> Void)? = nil
    +) -> Predicate<Result<Success, Failure>>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFailure(test:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher for Result that succeeds when the actual value is failure.

    + +

    You can pass a closure to do any arbitrary custom matching to the error inside result. +The closure only gets called when the result is failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beFailure<Success, Failure>(
    +    test: ((Failure) -> Void)? = nil
    +) -> Predicate<Result<Success, Failure>>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beVoid() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is Void.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beVoid() -> Predicate<()>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beWithin(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is within given range.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beWithin<T>(_ range: Range<T>) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beWithin(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is within given range.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beWithin<T>(_ range: ClosedRange<T>) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence’s first element +is equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith<S>(_ startingElement: S.Element) -> Predicate<S> where S : Sequence, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual collection’s first element +is equal to the expected object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith(_ startingElement: Any) -> Predicate<NMBOrderedCollection>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual string contains expected substring +where the expected substring’s location is zero.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith(_ startingSubstring: String) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(prefix:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the exepected sequence is a prefix of the actual sequence.

    + +

    This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2854218-starts

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith<Seq1: Sequence, Seq2: Sequence>(prefix expectedPrefix: Seq2?)
    +    -> Predicate<Seq1> where Seq1.Element: Equatable, Seq1.Element == Seq2.Element
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(prefix:by:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the expected sequence is the prefix of the actual sequence, using the given predicate as the equivalence test.

    + +

    This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2996828-starts

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith<Seq1: Sequence, Seq2: Sequence>(
    +    prefix expectedPrefix: Seq2?,
    +    by areEquivalent: @escaping (Seq1.Element, Seq2.Element) -> Bool
    +) -> Predicate<Seq1>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: S.Element...) -> Predicate<S> where S : Sequence, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: [S.Element]) -> Predicate<S> where S : Sequence, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: S.Element...) -> Predicate<S> where S : SetAlgebra, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: [S.Element]) -> Predicate<S> where S : SetAlgebra, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: S.Element...) -> Predicate<S> where S : Sequence, S : SetAlgebra, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: [S.Element]) -> Predicate<S> where S : Sequence, S : SetAlgebra, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual string contains the expected substring.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ substrings: String...) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ substrings: [String]) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual string contains the expected substring.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ substrings: NSString...) -> Predicate<NSString>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ substrings: [NSString]) -> Predicate<NSString>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual collection contains the expected object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ items: Any?...) -> Predicate<NMBContainer>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ items: [Any?]) -> Predicate<NMBContainer>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func containElementSatisfying<S: Sequence>(
    +    _ predicate: @escaping ((S.Element) -> Bool), _ predicateDescription: String = ""
    +) -> Predicate<S>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + elementsEqual(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain the same elements in +the same order.

    + +

    This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2854213-elementsequal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func elementsEqual<Seq1: Sequence, Seq2: Sequence>(
    +    _ expectedValue: Seq2?
    +) -> Predicate<Seq1> where Seq1.Element: Equatable, Seq1.Element == Seq2.Element
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + elementsEqual(_:by:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain equivalent elements in +the same order, using the given predicate as the equivalence test.

    + +

    This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2949668-elementsequal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func elementsEqual<Seq1: Sequence, Seq2: Sequence>(
    +    _ expectedValue: Seq2?,
    +    by areEquivalent: @escaping (Seq1.Element, Seq2.Element) -> Bool
    +) -> Predicate<Seq1>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + endWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence’s last element +is equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func endWith<S>(_ endingElement: S.Element) -> Predicate<S> where S : Sequence, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + endWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual collection’s last element +is equal to the expected object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func endWith(_ endingElement: Any) -> Predicate<NMBOrderedCollection>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + endWith(_:) + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func endWith(_ endingSubstring: String) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple2 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable>(
    +    _ expectedValue: (T1, T2)?
    +) -> Predicate<(T1, T2)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable>(
    +    lhs: Expectation<(T1, T2)>,
    +    rhs: (T1, T2)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable>(
    +    lhs: Expectation<(T1, T2)>,
    +    rhs: (T1, T2)?
    +)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple3 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable, T3: Equatable>(
    +    _ expectedValue: (T1, T2, T3)?
    +) -> Predicate<(T1, T2, T3)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable, T3: Equatable>(
    +    lhs: Expectation<(T1, T2, T3)>,
    +    rhs: (T1, T2, T3)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable, T3: Equatable>(
    +    lhs: Expectation<(T1, T2, T3)>,
    +    rhs: (T1, T2, T3)?
    +)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple4 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable>(
    +    _ expectedValue: (T1, T2, T3, T4)?
    +) -> Predicate<(T1, T2, T3, T4)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4)>,
    +    rhs: (T1, T2, T3, T4)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4)>,
    +    rhs: (T1, T2, T3, T4)?
    +)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple5 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable>(
    +    _ expectedValue: (T1, T2, T3, T4, T5)?
    +) -> Predicate<(T1, T2, T3, T4, T5)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4, T5)>,
    +    rhs: (T1, T2, T3, T4, T5)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4, T5)>,
    +    rhs: (T1, T2, T3, T4, T5)?
    +)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple6 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable, T6: Equatable>(
    +    _ expectedValue: (T1, T2, T3, T4, T5, T6)?
    +) -> Predicate<(T1, T2, T3, T4, T5, T6)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable, T6: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4, T5, T6)>,
    +    rhs: (T1, T2, T3, T4, T5, T6)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable, T6: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4, T5, T6)>,
    +    rhs: (T1, T2, T3, T4, T5, T6)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    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).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: T) -> Predicate<T> where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher allowing comparison of collection with optional type

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: [T?]) -> Predicate<[T?]> where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    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).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: T?) -> Predicate<T> where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set is equal to the expected set.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: Set<T>) -> Predicate<Set<T>> where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set is equal to the expected set.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: Set<T>?) -> Predicate<Set<T>> where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set is equal to the expected set.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: Set<T>) -> Predicate<Set<T>> where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set is equal to the expected set.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: Set<T>?) -> Predicate<Set<T>> where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual dictionary is equal to the expected dictionary

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<K, V>(_ expectedValue: [K : V?]) -> Predicate<[K : V]> where K : Hashable, V : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<T>, rhs: T) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<T>, rhs: T?) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<T>, rhs: T) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<T>, rhs: T?) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<[T]>, rhs: [T]?) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<[T]>, rhs: [T]?) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<Set<T>>, rhs: Set<T>) where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<Set<T>>, rhs: Set<T>?) where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<Set<T>>, rhs: Set<T>) where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<Set<T>>, rhs: Set<T>?) where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<Set<T>>, rhs: Set<T>) where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<Set<T>>, rhs: Set<T>?) where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<Set<T>>, rhs: Set<T>) where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<Set<T>>, rhs: Set<T>?) where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T, C>(lhs: Expectation<[T : C]>, rhs: [T : C]?) where T : Hashable, C : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T, C>(lhs: Expectation<[T : C]>, rhs: [T : C]?) where T : Hashable, C : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + haveCount(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual Collection’s count equals +the expected value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func haveCount<T>(_ expectedValue: Int) -> Predicate<T> where T : Collection
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + haveCount(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual collection’s count equals +the expected value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func haveCount(_ expectedValue: Int) -> Predicate<NMBCollection>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + match(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual string satisfies the regular expression +described by the expected string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func match(_ expectedValue: String?) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + matchError(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression evaluates to an +error from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparison by _domain and _code.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func matchError<T>(_ error: T) -> Predicate<Error> where T : Error
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + matchError(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression evaluates to an +error from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparision by _domain and _code.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func matchError<T>(_ error: T) -> Predicate<Error> where T : Equatable, T : Error
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + matchError(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression evaluates to an +error of the specified type

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func matchError<T>(_ errorType: T.Type) -> Predicate<Error> where T : Error
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func postNotifications<Out>(
    +    _ predicate: Predicate<[Notification]>,
    +    from center: NotificationCenter = .default
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func postDistributedNotifications<Out>(
    +    _ predicate: Predicate<[Notification]>,
    +    from center: DistributedNotificationCenter = .default(),
    +    names: Set<Notification.Name>
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression raises an +exception with the specified name, reason, and/or userInfo.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the raised exception. The closure only gets called when an exception +is raised.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func raiseException<Out>(
    +    named: NSExceptionName? = nil,
    +    reason: String? = nil,
    +    userInfo: NSDictionary? = nil,
    +    closure: ((NSException) -> Void)? = nil
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression raises an +exception with the specified name, reason, and/or userInfo.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the raised exception. The closure only gets called when an exception +is raised.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func raiseException<Out>(
    +    named: String?,
    +    reason: String? = nil,
    +    userInfo: NSDictionary? = nil,
    +    closure: ((NSException) -> Void)? = nil
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyAllOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value matches with all of the matchers +provided in the variable list of matchers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfyAllOf<T>(_ predicates: Predicate<T>...) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyAllOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value matches with all of the matchers +provided in the array of matchers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfyAllOf<T>(_ predicates: [Predicate<T>]) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + &&(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func && <T>(left: Predicate<T>, right: Predicate<T>) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyAnyOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value matches with any of the matchers +provided in the variable list of matchers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfyAnyOf<T>(_ predicates: Predicate<T>...) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyAnyOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value matches with any of the matchers +provided in the array of matchers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfyAnyOf<T>(_ predicates: [Predicate<T>]) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ||(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func || <T>(left: Predicate<T>, right: Predicate<T>) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Run the provided block. If a POSIX SIGILL is received, handle it and return a BadInstructionException (which is just an empty object in this POSIX signal version). Otherwise return nil. +NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a SIGILL is received, the block will be interrupted using a C longjmp. The risks associated with abrupt jumps apply here: most Swift functions are not interrupt-safe. Memory may be leaked and the program will not necessarily be left in a safe state.

    + +
    +
    +
    +
  • +
  • +
    + + + + throwAssertion() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwAssertion<Out>() -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + throwError() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws an +error of the specified type or from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparison by _domain and _code.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the thrown error. The closure only gets called when an error was thrown.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<Out>() -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws an +error of the specified type or from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparision by _domain and _code.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the thrown error. The closure only gets called when an error was thrown.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<T, Out>(_ error: T, closure: ((Error) -> Void)? = nil) -> Predicate<Out> where T : Error
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws an +error of the specified type or from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparision by _domain and _code.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the thrown error. The closure only gets called when an error was thrown.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<T, Out>(_ error: T, closure: ((T) -> Void)? = nil) -> Predicate<Out> where T : Equatable, T : Error
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws an +error of the specified type or from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparision by _domain and _code.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the thrown error. The closure only gets called when an error was thrown.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<T: Error, Out>(
    +    errorType: T.Type,
    +    closure: ((T) -> Void)? = nil
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + throwError(closure:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws any +error or when the passed closures’ arbitrary custom matching succeeds.

    + +

    This duplication to it’s generic adequate is required to allow to receive +values of the existential type Error in the closure.

    + +

    The closure only gets called when an error was thrown.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<Out>(closure: @escaping ((Error) -> Void)) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + throwError(closure:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws any +error or when the passed closures’ arbitrary custom matching succeeds.

    + +

    This duplication to it’s generic adequate is required to allow to receive +values of the existential type Error in the closure.

    + +

    The closure only gets called when an error was thrown.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<T, Out>(closure: @escaping ((T) -> Void)) -> Predicate<Out> where T : Error
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + succeed() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that takes in a closure for validation.

    + +

    Return .succeeded when the validation succeeds. +Return .failed with a failure reason when the validation fails.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func succeed() -> Predicate<ToSucceedResult>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + stringify(_:) + +
    +
    +
    +
    +
    +
    +

    Returns a string appropriate for displaying in test output +from the provided value.

    +
    +

    See also

    +

    TestOutputStringConvertible

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func stringify<T>(_ value: T?) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + value + + +
    +

    A value that will show up in a test’s output.

    +
    +
    +
    +
    +

    Return Value

    +

    The string that is returned can be +customized per type by conforming a type to the TestOutputStringConvertible +protocol. When stringifying a non-TestOutputStringConvertible type, this +function will return the value’s debug description and then its +normal description if available and in that order. Otherwise it +will return the result of constructing a string from the value.

    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Collection Type Stringers +

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Attempts to generate a pretty type string for a given value. If the value is of a Objective-C +collection type, or a subclass thereof, (e.g. NSArray, NSDictionary, etc.). +This function will return the type name of the root class of the class cluster for better +readability (e.g. NSArray instead of __NSArrayI).

    + +

    For values that don’t have a type of an Objective-C collection, this function returns the +default type description.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func prettyCollectionType<T>(_ value: T) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + value + + +
    +

    A value that will be used to determine a type name.

    +
    +
    +
    +
    +

    Return Value

    +

    The name of the class cluster root class for Objective-C collection types, or the +the dynamicType of the value for values of any other type.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the type name for a given collection type. This overload is used by Swift +collection types.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func prettyCollectionType<T>(_ collection: T) -> String where T : Collection
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + collection + + +
    +

    A Swift CollectionType value.

    +
    +
    +
    +
    +

    Return Value

    +

    A string representing the dynamicType of the value.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Global Variables.html b/docs/Global Variables.html new file mode 100644 index 000000000..25f3c4dfa --- /dev/null +++ b/docs/Global Variables.html @@ -0,0 +1,1038 @@ + + + + Global Variables Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Global Variables

+

The following global variables are available globally.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let MACH_MSG_TYPE_MAKE_SEND: UInt32
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + nativeThreadState + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • +
    + + + + nativeThreadState + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let nativeThreadState: Int32
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let nativeThreadStateCount: UInt32
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let nativeMachExceptionMask: exception_mask_t
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + EXC_TYPES_COUNT + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let EXC_TYPES_COUNT: Int
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Global backing interface for assertions that Nimble creates. +Defaults to a private test handler that passes through to XCTest.

    + +

    If XCTest is not available, you must assign your own assertion handler +before using any matchers, otherwise Nimble will abort the program.

    + +

    @see AssertionHandler

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var NimbleAssertionHandler: AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DefaultDelta + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let DefaultDelta: Double
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Protocols.html b/docs/Protocols.html new file mode 100644 index 000000000..22f03469a --- /dev/null +++ b/docs/Protocols.html @@ -0,0 +1,998 @@ + + + + Protocols Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+
+
    +
  • +
    + + + + AssertionHandler + +
    +
    +
    +
    +
    +
    +

    Protocol for the assertion handler that Nimble uses for all expectations.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBContainer + +
    +
    +
    +
    +
    +
    +

    Protocol for types that support contain() matcher.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol NMBContainer
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBCollection + +
    +
    +
    +
    +
    +
    +

    Protocol for types that support only beEmpty(), haveCount() matchers

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol NMBCollection
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBOrderedCollection + +
    +
    +
    +
    +
    +
    +

    Protocol for types that support beginWith(), endWith(), beEmpty() matchers

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol NMBOrderedCollection : NMBCollection
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBDoubleConvertible + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol NMBDoubleConvertible
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBComparable + +
    +
    +
    +
    +
    +
    +

    Protocol for types to support beLessThan(), beLessThanOrEqualTo(), + beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers.

    + +

    Types that conform to Swift’s Comparable protocol will work implicitly too

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public protocol NMBComparable
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A type with a customized test output text representation.

    + +

    This textual representation is produced when values will be +printed in test runs, and may be useful when producing +error messages in custom matchers.

    +
    +

    See also

    + CustomDebugStringConvertible + +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol TestOutputStringConvertible
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Protocols/AssertionHandler.html b/docs/Protocols/AssertionHandler.html new file mode 100644 index 000000000..0ce52585b --- /dev/null +++ b/docs/Protocols/AssertionHandler.html @@ -0,0 +1,823 @@ + + + + AssertionHandler Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AssertionHandler

+
+
+ +
public protocol AssertionHandler
+ +
+
+

Protocol for the assertion handler that Nimble uses for all expectations.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/Protocols/NMBCollection.html b/docs/Protocols/NMBCollection.html new file mode 100644 index 000000000..8aaaaaa1f --- /dev/null +++ b/docs/Protocols/NMBCollection.html @@ -0,0 +1,823 @@ + + + + NMBCollection Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBCollection

+
+
+ +
public protocol NMBCollection
+ +
+
+

Protocol for types that support only beEmpty(), haveCount() matchers

+ +
+
+
+
    +
  • +
    + + + + count + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var count: Int { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Protocols/NMBComparable.html b/docs/Protocols/NMBComparable.html new file mode 100644 index 000000000..76b048f45 --- /dev/null +++ b/docs/Protocols/NMBComparable.html @@ -0,0 +1,827 @@ + + + + NMBComparable Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBComparable

+
+
+ +
@objc
+public protocol NMBComparable
+ +
+
+

Protocol for types to support beLessThan(), beLessThanOrEqualTo(), + beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers.

+ +

Types that conform to Swift’s Comparable protocol will work implicitly too

+ +
+
+
+
    +
  • +
    + + + + NMB_compare(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Protocols/NMBContainer.html b/docs/Protocols/NMBContainer.html new file mode 100644 index 000000000..828511b98 --- /dev/null +++ b/docs/Protocols/NMBContainer.html @@ -0,0 +1,823 @@ + + + + NMBContainer Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBContainer

+
+
+ +
public protocol NMBContainer
+ +
+
+

Protocol for types that support contain() matcher.

+ +
+
+
+
    +
  • +
    + + + + contains(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func contains(_ anObject: Any) -> Bool
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Protocols/NMBDoubleConvertible.html b/docs/Protocols/NMBDoubleConvertible.html new file mode 100644 index 000000000..594973212 --- /dev/null +++ b/docs/Protocols/NMBDoubleConvertible.html @@ -0,0 +1,823 @@ + + + + NMBDoubleConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBDoubleConvertible

+
+
+ +
public protocol NMBDoubleConvertible
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + doubleValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var doubleValue: CDouble { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Protocols/NMBOrderedCollection.html b/docs/Protocols/NMBOrderedCollection.html new file mode 100644 index 000000000..139c32b1b --- /dev/null +++ b/docs/Protocols/NMBOrderedCollection.html @@ -0,0 +1,823 @@ + + + + NMBOrderedCollection Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBOrderedCollection

+
+
+ +
public protocol NMBOrderedCollection : NMBCollection
+ +
+
+

Protocol for types that support beginWith(), endWith(), beEmpty() matchers

+ +
+
+
+
    +
  • +
    + + + + object(at:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func object(at index: Int) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Protocols/TestOutputStringConvertible.html b/docs/Protocols/TestOutputStringConvertible.html new file mode 100644 index 000000000..df9e2d145 --- /dev/null +++ b/docs/Protocols/TestOutputStringConvertible.html @@ -0,0 +1,832 @@ + + + + TestOutputStringConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

TestOutputStringConvertible

+
+
+ +
public protocol TestOutputStringConvertible
+ +
+
+

A type with a customized test output text representation.

+ +

This textual representation is produced when values will be +printed in test runs, and may be useful when producing +error messages in custom matchers.

+
+

See also

+ CustomDebugStringConvertible + +
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs.html b/docs/Structs.html new file mode 100644 index 000000000..036c90b82 --- /dev/null +++ b/docs/Structs.html @@ -0,0 +1,1015 @@ + + + + Structures Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Structures

+

The following structures are available globally.

+ +
+
+
+
    +
  • +
    + + + + execTypesCountTuple + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct execTypesCountTuple<T> where T : ExpressibleByIntegerLiteral
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AssertionRecord + +
    +
    +
    +
    +
    +
    +

    A data structure that stores information about an assertion when +AssertionRecorder is set as the Nimble assertion handler.

    + +

    @see AssertionRecorder +@see AssertionHandler

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct AssertionRecord : CustomStringConvertible
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Expectation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Expression + +
    +
    +
    +
    +
    +
    +

    Expression represents the closure of the value inside expect(…). +Expressions are memoized by default. This makes them safe to call +evaluate() multiple times without causing a re-evaluation of the underlying +closure.

    + +

    @warning Since the closure can be any code, Objective-C code may choose + to raise an exception. Currently, Expression does not memoize + exception raising.

    + +

    This provides a common consumable API for matchers to utilize to allow +Nimble to change internals to how the captured closure is managed.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Expression<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AsyncDefaults + +
    +
    +
    +
    +
    +
    +

    If you are running on a slower machine, it could be useful to increase the default timeout value +or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct AsyncDefaults
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Predicate + +
    +
    +
    +
    +
    +
    +

    A Predicate is part of the new matcher API that provides assertions to expectations.

    + +

    Given a code snippet:

    + +

    expect(1).to(equal(2)) + ^^^^^^^^ + Called a “matcher”

    + +

    A matcher consists of two parts a constructor function and the Predicate. The term Predicate +is used as a separate name from Matcher to help transition custom matchers to the new Nimble +matcher API.

    + +

    The Predicate provide the heavy lifting on how to assert against a given value. Internally, +predicates are simple wrappers around closures to provide static type information and +allow composition and wrapping of existing behaviors.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PredicateResult + +
    +
    +
    +
    +
    +
    +

    The value that a Predicates return to describe if the given (actual) value matches the +predicate.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct PredicateResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs/AssertionRecord.html b/docs/Structs/AssertionRecord.html new file mode 100644 index 000000000..b8027a9e0 --- /dev/null +++ b/docs/Structs/AssertionRecord.html @@ -0,0 +1,907 @@ + + + + AssertionRecord Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AssertionRecord

+
+
+ +
public struct AssertionRecord : CustomStringConvertible
+ +
+
+

A data structure that stores information about an assertion when +AssertionRecorder is set as the Nimble assertion handler.

+ +

@see AssertionRecorder +@see AssertionHandler

+ +
+
+
+
    +
  • +
    + + + + success + +
    +
    +
    +
    +
    +
    +

    Whether the assertion succeeded or failed

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let success: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + message + +
    +
    +
    +
    +
    +
    +

    The failure message the assertion would display on failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let message: FailureMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + location + +
    +
    +
    +
    +
    +
    +

    The source location the expectation occurred on.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let location: SourceLocation
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs/AsyncDefaults.html b/docs/Structs/AsyncDefaults.html new file mode 100644 index 000000000..157fd19a8 --- /dev/null +++ b/docs/Structs/AsyncDefaults.html @@ -0,0 +1,851 @@ + + + + AsyncDefaults Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AsyncDefaults

+
+
+ +
public struct AsyncDefaults
+ +
+
+

If you are running on a slower machine, it could be useful to increase the default timeout value +or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01.

+ +
+
+
+
    +
  • +
    + + + + timeout + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var timeout: DispatchTimeInterval
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + pollInterval + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var pollInterval: DispatchTimeInterval
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs/Expectation.html b/docs/Structs/Expectation.html new file mode 100644 index 000000000..5f6b8fde3 --- /dev/null +++ b/docs/Structs/Expectation.html @@ -0,0 +1,1637 @@ + + + + Expectation Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Expectation

+
+
+ +
public struct Expectation<T>
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + expression + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let expression: Expression<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(expression:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expression: Expression<T>)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + verify(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func verify(_ pass: Bool, _ message: FailureMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + to(_:description:) + +
    +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to match.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @discardableResult
    +public func to(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNot(_:description:) + +
    +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to not match.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @discardableResult
    +public func toNot(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + notTo(_:description:) + +
    +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to not match.

    + +

    Alias to toNot().

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @discardableResult
    +public func notTo(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to match by checking continuously +at each pollInterval until the timeout is reached.

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toEventually(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to not match by checking +continuously at each pollInterval until the timeout is reached.

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toEventuallyNot(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to not match by checking +continuously at each pollInterval until the timeout is reached.

    + +

    Alias of toEventuallyNot()

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toNotEventually(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to never match by checking +continuously at each pollInterval until the timeout is reached.

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toNever(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to never match by checking +continuously at each pollInterval until the timeout is reached.

    + +

    Alias of toNever()

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func neverTo(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to always match by checking +continusouly at each pollInterval until the timeout is reached

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toAlways(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to always match by checking +continusouly at each pollInterval until the timeout is reached

    + +

    Alias of toAlways()

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func alwaysTo(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Nil + +
    +
    +
    +
    +
    +
    +

    Represents nil value to be used with the operator overloads for beNil.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Nil : ExpressibleByNilLiteral
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Expectation, rhs: Expectation.Nil)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func != (lhs: Expectation, rhs: Expectation.Nil)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T: Collection, T.Element: FloatingPoint +

+
+
+
    +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: T)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T: FloatingPoint +

+
+
+
    +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: T)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: (expected: T, delta: T))
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Expectation, rhs: (expected: T, delta: T))
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T: NMBDoubleConvertible +

+
+
+
    +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: T)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: (expected: T, delta: Double))
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Expectation, rhs: (expected: T, delta: Double))
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T == AnyObject +

+
+
+
    +
  • +
    + + + + ===(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func === (lhs: Expectation, rhs: AnyObject?)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func !== (lhs: Expectation, rhs: AnyObject?)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T == () +

+
+
+
    +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Expectation<()>, rhs: ())
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func != (lhs: Expectation<()>, rhs: ())
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs/Expectation/Nil.html b/docs/Structs/Expectation/Nil.html new file mode 100644 index 000000000..b2736c653 --- /dev/null +++ b/docs/Structs/Expectation/Nil.html @@ -0,0 +1,822 @@ + + + + Nil Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Nil

+
+
+ +
public struct Nil : ExpressibleByNilLiteral
+ +
+
+

Represents nil value to be used with the operator overloads for beNil.

+ +
+
+
+
    +
  • +
    + + + + init(nilLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(nilLiteral: ())
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs/Expression.html b/docs/Structs/Expression.html new file mode 100644 index 000000000..37ec6af2b --- /dev/null +++ b/docs/Structs/Expression.html @@ -0,0 +1,1025 @@ + + + + Expression Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Expression

+
+
+ +
public struct Expression<T>
+ +
+
+

Expression represents the closure of the value inside expect(…). +Expressions are memoized by default. This makes them safe to call +evaluate() multiple times without causing a re-evaluation of the underlying +closure.

+ +

@warning Since the closure can be any code, Objective-C code may choose + to raise an exception. Currently, Expression does not memoize + exception raising.

+ +

This provides a common consumable API for matchers to utilize to allow +Nimble to change internals to how the captured closure is managed.

+ +
+
+
+
    +
  • +
    + + + + location + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let location: SourceLocation
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isClosure + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let isClosure: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a new expression struct. Normally, expect(…) will manage this +creation process. The expression is memoized.

    + +

    @param expression The closure that produces a given value. +@param location The source location that this closure originates from. +@param isClosure A bool indicating if the captured expression is a + closure or internally produced closure. Some matchers + may require closures. For example, toEventually() + requires an explicit closure. This gives Nimble + flexibility if @autoclosure behavior changes between + Swift versions. Nimble internals always sets this true.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expression: @escaping () throws -> T?, location: SourceLocation, isClosure: Bool = true)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a new expression struct. Normally, expect(…) will manage this +creation process.

    + +

    @param expression The closure that produces a given value. +@param location The source location that this closure originates from. +@param withoutCaching Indicates if the struct should memoize the given + closure’s result. Subsequent evaluate() calls will + not call the given closure if this is true. +@param isClosure A bool indicating if the captured expression is a + closure or internally produced closure. Some matchers + may require closures. For example, toEventually() + requires an explicit closure. This gives Nimble + flexibility if @autoclosure behavior changes between + Swift versions. Nimble internals always sets this true.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(memoizedExpression: @escaping (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cast(_:) + +
    +
    +
    +
    +
    +
    +

    Returns a new Expression from the given expression. Identical to a map() +on this type. This should be used only to typecast the Expression’s +closure value.

    + +

    The returned expression will preserve location and isClosure.

    + +

    @param block The block that can cast the current Expression value to a + new type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func cast<U>(_ block: @escaping (T?) throws -> U?) -> Expression<U>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + evaluate() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func evaluate() throws -> T?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + withoutCaching() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func withoutCaching() -> Expression<T>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs/Predicate.html b/docs/Structs/Predicate.html new file mode 100644 index 000000000..8f07a1d68 --- /dev/null +++ b/docs/Structs/Predicate.html @@ -0,0 +1,1038 @@ + + + + Predicate Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Predicate

+
+
+ +
public struct Predicate<T>
+ +
+
+

A Predicate is part of the new matcher API that provides assertions to expectations.

+ +

Given a code snippet:

+ +

expect(1).to(equal(2)) + ^^^^^^^^ + Called a “matcher”

+ +

A matcher consists of two parts a constructor function and the Predicate. The term Predicate +is used as a separate name from Matcher to help transition custom matchers to the new Nimble +matcher API.

+ +

The Predicate provide the heavy lifting on how to assert against a given value. Internally, +predicates are simple wrappers around closures to provide static type information and +allow composition and wrapping of existing behaviors.

+ +
+
+
+
    +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Constructs a predicate that knows how take a given value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ matcher: @escaping (Expression<T>) throws -> PredicateResult)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfies(_:) + +
    +
    +
    +
    +
    +
    +

    Uses a predicate on a given value to see if it passes the predicate.

    + +

    @param expression The value to run the predicate’s logic against +@returns A predicate result indicate passing or failing and an associated error message.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfies(_ expression: Expression<T>) throws -> PredicateResult
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + define(matcher:) + +
    +
    +
    +
    +
    +
    +

    Like Predicate() constructor, but automatically guard against nil (actual) values

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func define(matcher: @escaping (Expression<T>) throws -> PredicateResult) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + define(_:matcher:) + +
    +
    +
    +
    +
    +
    +

    Defines a predicate with a default message that can be returned in the closure +Also ensures the predicate’s actual value cannot pass with nil given.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func define(_ message: String = "match", matcher: @escaping (Expression<T>, ExpectationMessage) throws -> PredicateResult) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Defines a predicate with a default message that can be returned in the closure +Unlike define, this allows nil values to succeed if the given closure chooses to.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func defineNilable(_ message: String = "match", matcher: @escaping (Expression<T>, ExpectationMessage) throws -> PredicateResult) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + simple(_:matcher:) + +
    +
    +
    +
    +
    +
    +

    Provides a simple predicate definition that provides no control over the predefined +error message.

    + +

    Also ensures the predicate’s actual value cannot pass with nil given.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func simple(_ message: String = "match", matcher: @escaping (Expression<T>) throws -> PredicateStatus) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Provides a simple predicate definition that provides no control over the predefined +error message.

    + +

    Unlike simple, this allows nil values to succeed if the given closure chooses to.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func simpleNilable(_ message: String = "match", matcher: @escaping (Expression<T>) throws -> PredicateStatus) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + requireNonNil + +
    +
    +
    +
    +
    +
    +

    Returns a new Predicate based on the current one that always fails if nil is given as +the actual value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var requireNonNil: Predicate<T> { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs/PredicateResult.html b/docs/Structs/PredicateResult.html new file mode 100644 index 000000000..02f4b71c9 --- /dev/null +++ b/docs/Structs/PredicateResult.html @@ -0,0 +1,959 @@ + + + + PredicateResult Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

PredicateResult

+
+
+ +
public struct PredicateResult
+ +
+
+

The value that a Predicates return to describe if the given (actual) value matches the +predicate.

+ +
+
+
+
    +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    Status indicates if the predicate matches, does not match, or fails.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var status: PredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + message + +
    +
    +
    +
    +
    +
    +

    The error message that can be displayed if it does not match

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var message: ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(status:message:) + +
    +
    +
    +
    +
    +
    +

    Constructs a new PredicateResult with a given status and error message

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(status: PredicateStatus, message: ExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(bool:message:) + +
    +
    +
    +
    +
    +
    +

    Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(bool: Bool, message: ExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Converts the result to a boolean based on what the expectation intended

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toBoolean(expectation style: ExpectationStyle) -> Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toObjectiveC() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toObjectiveC() -> NMBPredicateResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Structs/execTypesCountTuple.html b/docs/Structs/execTypesCountTuple.html new file mode 100644 index 000000000..5863321a9 --- /dev/null +++ b/docs/Structs/execTypesCountTuple.html @@ -0,0 +1,850 @@ + + + + execTypesCountTuple Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

execTypesCountTuple

+
+
+ +
public struct execTypesCountTuple<T> where T : ExpressibleByIntegerLiteral
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + value + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var value: (T, T, T, T, T, T, T, T, T, T, T, T, T, T)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init()
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/Typealiases.html b/docs/Typealiases.html new file mode 100644 index 000000000..d6105e909 --- /dev/null +++ b/docs/Typealiases.html @@ -0,0 +1,861 @@ + + + + Type Aliases Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Type Aliases

+

The following type aliases are available globally.

+ +
+
+
+
    +
  • +
    + + + + PredicateBlock + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias PredicateBlock = (_ actualExpression: Expression<NSObject>) throws -> NMBPredicateResult
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + FileString + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • +
    + + + + FileString + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias FileString = String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/badge.svg b/docs/badge.svg new file mode 100644 index 000000000..7eb257cb4 --- /dev/null +++ b/docs/badge.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + documentation + + + documentation + + + 46% + + + 46% + + + diff --git a/docs/css/highlight.css b/docs/css/highlight.css new file mode 100644 index 000000000..c170357ce --- /dev/null +++ b/docs/css/highlight.css @@ -0,0 +1,202 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight .c { + color: #999988; + font-style: italic; } + +.highlight .err { + color: #a61717; + background-color: #e3d2d2; } + +.highlight .k { + color: #000000; + font-weight: bold; } + +.highlight .o { + color: #000000; + font-weight: bold; } + +.highlight .cm { + color: #999988; + font-style: italic; } + +.highlight .cp { + color: #999999; + font-weight: bold; } + +.highlight .c1 { + color: #999988; + font-style: italic; } + +.highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + +.highlight .gd { + color: #000000; + background-color: #ffdddd; } + +.highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + +.highlight .ge { + color: #000000; + font-style: italic; } + +.highlight .gr { + color: #aa0000; } + +.highlight .gh { + color: #999999; } + +.highlight .gi { + color: #000000; + background-color: #ddffdd; } + +.highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + +.highlight .go { + color: #888888; } + +.highlight .gp { + color: #555555; } + +.highlight .gs { + font-weight: bold; } + +.highlight .gu { + color: #aaaaaa; } + +.highlight .gt { + color: #aa0000; } + +.highlight .kc { + color: #000000; + font-weight: bold; } + +.highlight .kd { + color: #000000; + font-weight: bold; } + +.highlight .kp { + color: #000000; + font-weight: bold; } + +.highlight .kr { + color: #000000; + font-weight: bold; } + +.highlight .kt { + color: #445588; } + +.highlight .m { + color: #009999; } + +.highlight .s { + color: #d14; } + +.highlight .na { + color: #008080; } + +.highlight .nb { + color: #0086B3; } + +.highlight .nc { + color: #445588; + font-weight: bold; } + +.highlight .no { + color: #008080; } + +.highlight .ni { + color: #800080; } + +.highlight .ne { + color: #990000; + font-weight: bold; } + +.highlight .nf { + color: #990000; } + +.highlight .nn { + color: #555555; } + +.highlight .nt { + color: #000080; } + +.highlight .nv { + color: #008080; } + +.highlight .ow { + color: #000000; + font-weight: bold; } + +.highlight .w { + color: #bbbbbb; } + +.highlight .mf { + color: #009999; } + +.highlight .mh { + color: #009999; } + +.highlight .mi { + color: #009999; } + +.highlight .mo { + color: #009999; } + +.highlight .sb { + color: #d14; } + +.highlight .sc { + color: #d14; } + +.highlight .sd { + color: #d14; } + +.highlight .s2 { + color: #d14; } + +.highlight .se { + color: #d14; } + +.highlight .sh { + color: #d14; } + +.highlight .si { + color: #d14; } + +.highlight .sx { + color: #d14; } + +.highlight .sr { + color: #009926; } + +.highlight .s1 { + color: #d14; } + +.highlight .ss { + color: #990073; } + +.highlight .bp { + color: #999999; } + +.highlight .vc { + color: #008080; } + +.highlight .vg { + color: #008080; } + +.highlight .vi { + color: #008080; } + +.highlight .il { + color: #009999; } diff --git a/docs/css/jazzy.css b/docs/css/jazzy.css new file mode 100644 index 000000000..2e3871391 --- /dev/null +++ b/docs/css/jazzy.css @@ -0,0 +1,439 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { + background: transparent; + border: 0; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; } + +body { + background-color: #f2f2f2; + font-family: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + -webkit-font-smoothing: subpixel-antialiased; + word-wrap: break-word; } + +h1, h2, h3 { + margin-top: 0.8em; + margin-bottom: 0.3em; + font-weight: 100; + color: black; } + +h1 { + font-size: 2.5em; } + +h2 { + font-size: 2em; + border-bottom: 1px solid #e2e2e2; } + +h4 { + font-size: 13px; + line-height: 1.5; + margin-top: 21px; } + +h5 { + font-size: 1.1em; } + +h6 { + font-size: 1.1em; + color: #777; } + +.section-name { + color: gray; + display: block; + font-family: Helvetica; + font-size: 22px; + font-weight: 100; + margin-bottom: 15px; } + +pre, code { + font: 0.95em Menlo, monospace; + color: #777; + word-wrap: normal; } + +p code, li code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; } + +pre > code { + padding: 0; } + +a { + color: #0088cc; + text-decoration: none; } + a code { + color: inherit; } + +ul { + padding-left: 15px; } + +li { + line-height: 1.8em; } + +img { + max-width: 100%; } + +blockquote { + margin-left: 0; + padding: 0 10px; + border-left: 4px solid #ccc; } + +hr { + height: 1px; + border: none; + background-color: #e2e2e2; } + +.footnote-ref { + display: inline-block; + scroll-margin-top: 70px; } + +.footnote-def { + scroll-margin-top: 70px; } + +.content-wrapper { + margin: 0 auto; + width: 980px; } + +header { + font-size: 0.85em; + line-height: 32px; + background-color: #414141; + position: fixed; + width: 100%; + z-index: 3; } + header img { + padding-right: 6px; + vertical-align: -3px; + height: 16px; } + header a { + color: #fff; } + header p { + float: left; + color: #999; } + header .header-right { + float: right; + margin-left: 16px; } + +#breadcrumbs { + background-color: #f2f2f2; + height: 21px; + padding-top: 17px; + position: fixed; + width: 100%; + z-index: 2; + margin-top: 32px; } + #breadcrumbs #carat { + height: 10px; + margin: 0 5px; } + +.sidebar { + background-color: #f9f9f9; + border: 1px solid #e2e2e2; + overflow-y: auto; + overflow-x: hidden; + position: fixed; + top: 70px; + bottom: 0; + width: 230px; + word-wrap: normal; } + +.nav-groups { + list-style-type: none; + background: #fff; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #e2e2e2; + font-size: 1.1em; + font-weight: 100; + padding: 15px 0 15px 20px; } + .nav-group-name > a { + color: #333; } + +.nav-group-tasks { + margin-top: 5px; } + +.nav-group-task { + font-size: 0.9em; + list-style-type: none; + white-space: nowrap; } + .nav-group-task a { + color: #888; } + +.main-content { + background-color: #fff; + border: 1px solid #e2e2e2; + margin-left: 246px; + position: absolute; + overflow: hidden; + padding-bottom: 20px; + top: 70px; + width: 734px; } + .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { + margin-bottom: 1em; } + .main-content p { + line-height: 1.8em; } + .main-content section .section:first-child { + margin-top: 0; + padding-top: 0; } + .main-content section .task-group-section .task-group:first-of-type { + padding-top: 10px; } + .main-content section .task-group-section .task-group:first-of-type .section-name { + padding-top: 15px; } + .main-content section .heading:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .main-content .section-name p { + margin-bottom: inherit; + line-height: inherit; } + .main-content .section-name code { + background-color: inherit; + padding: inherit; + color: inherit; } + +.section { + padding: 0 25px; } + +.highlight { + background-color: #eee; + padding: 10px 12px; + border: 1px solid #e2e2e2; + border-radius: 4px; + overflow-x: auto; } + +.declaration .highlight { + overflow-x: initial; + padding: 0 40px 40px 0; + margin-bottom: -25px; + background-color: transparent; + border: none; } + +.section-name { + margin: 0; + margin-left: 18px; } + +.task-group-section { + margin-top: 10px; + padding-left: 6px; + border-top: 1px solid #e2e2e2; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + +.section-name-container { + position: relative; + display: inline-block; } + .section-name-container .section-name-link { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + margin-bottom: 0; } + .section-name-container .section-name { + position: relative; + pointer-events: none; + z-index: 1; } + .section-name-container .section-name a { + pointer-events: auto; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .item code { + background-color: transparent; + padding: 0; } + .item .token, .item .direct-link { + display: inline-block; + text-indent: -20px; + padding-left: 3px; + margin-left: 35px; + font-size: 11.9px; + transition: all 300ms; } + .item .token-open { + margin-left: 20px; } + .item .discouraged { + text-decoration: line-through; } + .item .declaration-note { + font-size: .85em; + color: gray; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #e2e2e2; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + background: #f9f9f9; + border-left: 1px solid #e2e2e2; + border-top: 1px solid #e2e2e2; + height: 12px; + left: 21px; + top: -7px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + position: absolute; + width: 12px; } + +.height-container { + display: none; + left: -25px; + padding: 0 25px; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #f9f9f9; + border-bottom: 1px solid #e2e2e2; + left: -25px; + position: relative; + width: 100%; + padding-top: 10px; + padding-bottom: 5px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4b8afb; } + +.aside-warning, .aside-deprecated, .aside-unavailable { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #e2e2e2; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +#footer { + position: relative; + top: 10px; + bottom: 0px; + margin-left: 25px; } + #footer p { + margin: 0; + color: #aaa; + font-size: 0.8em; } + +html.dash header, html.dash #breadcrumbs, html.dash .sidebar { + display: none; } + +html.dash .main-content { + width: 980px; + margin-left: 0; + border: none; + width: 100%; + top: 0; + padding-bottom: 0; } + +html.dash .height-container { + display: block; } + +html.dash .item .token { + margin-left: 0; } + +html.dash .content-wrapper { + width: auto; } + +html.dash #footer { + position: static; } + +form[role=search] { + float: right; } + form[role=search] input { + font: Helvetica, freesans, Arial, sans-serif; + margin-top: 6px; + font-size: 13px; + line-height: 20px; + padding: 0px 10px; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } + form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fff; + color: #333; + border: 1px solid #e2e2e2; + z-index: 4; } + form[role=search] .tt-highlight { + font-weight: bold; } + form[role=search] .tt-suggestion { + font: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } + form[role=search] .tt-suggestion:hover, + form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } + form[role=search] .tt-suggestion:hover .doc-parent-name, + form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/docs/docsets/Nimble.docset/Contents/Info.plist b/docs/docsets/Nimble.docset/Contents/Info.plist new file mode 100644 index 000000000..780a0a655 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleIdentifier + com.jazzy.nimble + CFBundleName + Nimble + DocSetPlatformFamily + nimble + isDashDocset + + dashIndexFilePath + index.html + isJavaScriptEnabled + + DashDocSetFamily + dashtoc + + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes.html new file mode 100644 index 000000000..c03d9ade0 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes.html @@ -0,0 +1,1241 @@ + + + + Classes Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Classes

+

The following classes are available globally.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    A simple NSException subclass. It’s not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(BadInstructionException)
    +public class BadInstructionException : NSException
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AssertionDispatcher + +
    +
    +
    +
    +
    +
    +

    AssertionDispatcher allows multiple AssertionHandlers to receive +assertion messages.

    + +

    @warning Does not fully dispatch if one of the handlers raises an exception. + This is possible with XCTest-based assertion handlers.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class AssertionDispatcher : AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AssertionRecorder + +
    +
    +
    +
    +
    +
    +

    An AssertionHandler that silently records assertions that Nimble makes. +This is useful for testing failure messages for matchers.

    + +

    @see AssertionHandler

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class AssertionRecorder : AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBExpectation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBExpectation : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NimbleXCTestHandler + +
    +
    +
    +
    +
    +
    +

    Default handler for Nimble. This assertion handler passes failures along to +XCTest.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NimbleXCTestHandler : AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Alternative handler for Nimble. This assertion handler passes failures along +to XCTest by attempting to reduce the failure message size.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NimbleShortXCTestHandler : AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBExpectationMessage + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBExpectationMessage : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + FailureMessage + +
    +
    +
    +
    +
    +
    +

    Encapsulates the failure message that matchers can report to the end user.

    + +

    This is shared state between Nimble and matchers that mutate this value.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class FailureMessage : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBPredicate + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBPredicate : NSObject
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBObjCBeCloseToPredicate : NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBPredicateResult + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    final public class NMBPredicateResult : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBPredicateStatus + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    final public class NMBPredicateStatus : NSObject
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NMBObjCRaiseExceptionPredicate : NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Without Mach exceptions or the Objective-C runtime, there’s nothing to put in the exception object. It’s really just a boolean – either a SIGILL was caught or not.

    + +
    +
    +
    +
  • +
  • +
    + + + + SourceLocation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public final class SourceLocation : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBStringer + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class NMBStringer : NSObject
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/AssertionDispatcher.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/AssertionDispatcher.html new file mode 100644 index 000000000..caf01ff22 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/AssertionDispatcher.html @@ -0,0 +1,854 @@ + + + + AssertionDispatcher Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AssertionDispatcher

+
+
+ +
public class AssertionDispatcher : AssertionHandler
+ +
+
+

AssertionDispatcher allows multiple AssertionHandlers to receive +assertion messages.

+ +

@warning Does not fully dispatch if one of the handlers raises an exception. + This is possible with XCTest-based assertion handlers.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/AssertionRecorder.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/AssertionRecorder.html new file mode 100644 index 000000000..94e6f3fb8 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/AssertionRecorder.html @@ -0,0 +1,880 @@ + + + + AssertionRecorder Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AssertionRecorder

+
+
+ +
public class AssertionRecorder : AssertionHandler
+ +
+
+

An AssertionHandler that silently records assertions that Nimble makes. +This is useful for testing failure messages for matchers.

+ +

@see AssertionHandler

+ +
+
+
+
    +
  • +
    + + + + assertions + +
    +
    +
    +
    +
    +
    +

    All the assertions that were captured by this recorder

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var assertions: [AssertionRecord]
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init()
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/BadInstructionException.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/BadInstructionException.html new file mode 100644 index 000000000..ee64592aa --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/BadInstructionException.html @@ -0,0 +1,852 @@ + + + + BadInstructionException Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

BadInstructionException

+
+
+ +
@objc(BadInstructionException)
+public class BadInstructionException : NSException
+ +
+
+

A simple NSException subclass. It’s not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type.

+ +
+
+
+
    +
  • +
    + + + + init(coder:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    required public init?(coder aDecoder: NSCoder)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + receiveReply(_:) + +
    +
    +
    +
    +
    +
    +

    An Objective-C callable function, invoked from the mach_exc_server callback function catch_mach_exception_raise_state to push the raiseBadInstructionException function onto the stack.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(receiveReply:)
    +public class func receiveReply(_ reply: bad_instruction_exception_reply_t) -> CInt
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/FailureMessage.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/FailureMessage.html new file mode 100644 index 000000000..58d888fac --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/FailureMessage.html @@ -0,0 +1,1070 @@ + + + + FailureMessage Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

FailureMessage

+
+
+ +
public class FailureMessage : NSObject
+ +
+
+

Encapsulates the failure message that matchers can report to the end user.

+ +

This is shared state between Nimble and matchers that mutate this value.

+ +
+
+
+
    +
  • +
    + + + + expected + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var expected: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + actualValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var actualValue: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + to + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var to: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + postfixMessage + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var postfixMessage: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + postfixActual + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var postfixActual: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + extendedMessage + +
    +
    +
    +
    +
    +
    +

    An optional message that will be appended as a new line and provides additional details +about the failure. This message will only be visible in the issue navigator / in logs but +not directly in the source editor since only a single line is presented there.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var extendedMessage: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + userDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var userDescription: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + stringValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var stringValue: String { get set }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public override init()
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(stringValue:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringValue: String)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBExpectation.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBExpectation.html new file mode 100644 index 000000000..ac5fee61c --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBExpectation.html @@ -0,0 +1,1440 @@ + + + + NMBExpectation Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBExpectation

+
+
+ +
public class NMBExpectation : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public init(actualBlock: @escaping () -> NSObject?, negative: Bool, file: FileString, line: UInt)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + withTimeout + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var withTimeout: (TimeInterval) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + to + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var to: (NMBPredicate) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toWithDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toWithDescription: (NMBPredicate, String) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNot + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNot: (NMBPredicate) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNotWithDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNotWithDescription: (NMBPredicate, String) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + notTo + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var notTo: (NMBPredicate) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + notToWithDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var notToWithDescription: (NMBPredicate, String) -> NMBExpectation { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toEventually + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toEventually: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toEventuallyWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toEventuallyNot + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toEventuallyNot: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toEventuallyNotWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNotEventually + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNotEventually: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNotEventuallyWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNever + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNever: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toNeverWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + neverTo + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var neverTo: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var neverToWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toAlways + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toAlways: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var toAlwaysWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + alwaysTo + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var alwaysTo: (NMBPredicate) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var alwaysToWithDescription: (NMBPredicate, String) -> Void { get }
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func failWithMessage(_ message: String, file: FileString, line: UInt)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBExpectationMessage.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBExpectationMessage.html new file mode 100644 index 000000000..f82eab3f4 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBExpectationMessage.html @@ -0,0 +1,1066 @@ + + + + NMBExpectationMessage Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBExpectationMessage

+
+
+ +
public class NMBExpectationMessage : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + init(expectedTo:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expectedTo message: String)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expectedActualValueTo message: String)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expectedActualValueTo message: String, customActualValue actual: String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(fail:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(fail message: String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(prepend:child:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(prepend message: String, child: NMBExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(appendedMessage message: String, child: NMBExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(prependedMessage message: String, child: NMBExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(details:child:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(details message: String, child: NMBExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appendedBeNilHint() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func appendedBeNilHint() -> NMBExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toSwift() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toSwift() -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBObjCBeCloseToPredicate.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBObjCBeCloseToPredicate.html new file mode 100644 index 000000000..f0fe62b47 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBObjCBeCloseToPredicate.html @@ -0,0 +1,824 @@ + + + + NMBObjCBeCloseToPredicate Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBObjCBeCloseToPredicate

+
+
+ +
public class NMBObjCBeCloseToPredicate : NMBPredicate
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + within + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var within: (CDouble) -> NMBObjCBeCloseToPredicate { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBObjCRaiseExceptionPredicate.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBObjCRaiseExceptionPredicate.html new file mode 100644 index 000000000..324708b51 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBObjCRaiseExceptionPredicate.html @@ -0,0 +1,908 @@ + + + + NMBObjCRaiseExceptionPredicate Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBObjCRaiseExceptionPredicate

+
+
+ +
public class NMBObjCRaiseExceptionPredicate : NMBPredicate
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + named + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var named: (_ name: String) -> NMBObjCRaiseExceptionPredicate { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + reason + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionPredicate { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + userInfo + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionPredicate { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyingBlock + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionPredicate { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicate.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicate.html new file mode 100644 index 000000000..54ef19157 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicate.html @@ -0,0 +1,1536 @@ + + + + NMBPredicate Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBPredicate

+
+
+ +
public class NMBPredicate : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + init(predicate:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(predicate: @escaping PredicateBlock)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allPassMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func allPassMatcher(_ predicate: NMBPredicate) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAKindOfMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmptyMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beEmptyMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beLessThanMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

beTruthy() / beFalsy() +

+
+
+
    +
  • +
    + + + + beTruthyMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beTruthyMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFalsyMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beFalsyMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beTrueMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beTrueMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFalseMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beFalseMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beNilMatcher() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beNilMatcher() -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWithMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func beginWithMatcher(_ expected: Any) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + containMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func containMatcher(_ expected: [NSObject]) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func containElementSatisfyingMatcher(_ predicate: @escaping ((NSObject) -> Bool)) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + endWithMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func endWithMatcher(_ expected: Any) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equalMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func equalMatcher(_ expected: NSObject) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + haveCountMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func haveCountMatcher(_ expected: NSNumber) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + matchMatcher(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func matchMatcher(_ expected: NSString) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func satisfyAllOfMatcher(_ predicates: [NMBPredicate]) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func satisfyAnyOfMatcher(_ predicates: [NMBPredicate]) -> NMBPredicate
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicateResult.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicateResult.html new file mode 100644 index 000000000..a29df4289 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicateResult.html @@ -0,0 +1,931 @@ + + + + NMBPredicateResult Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBPredicateResult

+
+
+ +
final public class NMBPredicateResult : NSObject
+ +
+
+

Undocumented

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicateStatus.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicateStatus.html new file mode 100644 index 000000000..131179e15 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBPredicateStatus.html @@ -0,0 +1,1012 @@ + + + + NMBPredicateStatus Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBPredicateStatus

+
+
+ +
final public class NMBPredicateStatus : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + matches + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let matches: NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + doesNotMatch + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let doesNotMatch: NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let fail: NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + hash + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public override var hash: Int { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isEqual(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public override func isEqual(_ object: Any?) -> Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + from(status:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func from(status: PredicateStatus) -> NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + from(bool:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func from(bool success: Bool) -> NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toSwift() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toSwift() -> PredicateStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBStringer.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBStringer.html new file mode 100644 index 000000000..e8f8b54c9 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NMBStringer.html @@ -0,0 +1,825 @@ + + + + NMBStringer Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBStringer

+
+
+ +
@objc
+public class NMBStringer : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + stringify(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public class func stringify(_ obj: Any?) -> String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NimbleShortXCTestHandler.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NimbleShortXCTestHandler.html new file mode 100644 index 000000000..434d51f30 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NimbleShortXCTestHandler.html @@ -0,0 +1,824 @@ + + + + NimbleShortXCTestHandler Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NimbleShortXCTestHandler

+
+
+ +
public class NimbleShortXCTestHandler : AssertionHandler
+ +
+
+

Alternative handler for Nimble. This assertion handler passes failures along +to XCTest by attempting to reduce the failure message size.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NimbleXCTestHandler.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NimbleXCTestHandler.html new file mode 100644 index 000000000..3b1fc8581 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/NimbleXCTestHandler.html @@ -0,0 +1,824 @@ + + + + NimbleXCTestHandler Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NimbleXCTestHandler

+
+
+ +
public class NimbleXCTestHandler : AssertionHandler
+ +
+
+

Default handler for Nimble. This assertion handler passes failures along to +XCTest.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/SourceLocation.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/SourceLocation.html new file mode 100644 index 000000000..2ba6bc901 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Classes/SourceLocation.html @@ -0,0 +1,877 @@ + + + + SourceLocation Class Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

SourceLocation

+
+
+ +
public final class SourceLocation : NSObject
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + file + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let file: FileString
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + line + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let line: UInt
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var description: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums.html new file mode 100644 index 000000000..3cba5283a --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums.html @@ -0,0 +1,903 @@ + + + + Enumerations Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Enumerations

+

The following enumerations are available globally.

+ +
+
+
+
    +
  • +
    + + + + ExpectationMessage + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public indirect enum ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ExpectationStyle + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ExpectationStyle
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PredicateStatus + +
    +
    +
    +
    +
    +
    +

    PredicateStatus is a trinary that indicates if a Predicate matches a given value or not

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum PredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ToSucceedResult + +
    +
    +
    +
    +
    +
    +

    Used by the succeed matcher.

    + +

    This is the return type for the closure.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ToSucceedResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ExpectationMessage.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ExpectationMessage.html new file mode 100644 index 000000000..9a981b38d --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ExpectationMessage.html @@ -0,0 +1,1206 @@ + + + + ExpectationMessage Enumeration Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

ExpectationMessage

+
+
+ +
public indirect enum ExpectationMessage
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    includes actual value in output (“expected to , got ”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case expectedActualValueTo(String)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    uses a custom actual value string in output (“expected to , got ”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case expectedCustomValueTo(String, actual: String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expectedTo(_:) + +
    +
    +
    +
    +
    +
    +

    excludes actual value in output (“expected to ”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case expectedTo(String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail(_:) + +
    +
    +
    +
    +
    +
    +

    allows any free-form message (“”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case fail(String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + prepends(_:_:) + +
    +
    +
    +
    +
    +
    +

    Not Fully Implemented Yet.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case prepends(String, ExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appends(_:_:) + +
    +
    +
    +
    +
    +
    +

    appends after an existing message (“ (use beNil() to match nils)”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case appends(ExpectationMessage, String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + details(_:_:) + +
    +
    +
    +
    +
    +
    +

    provides long-form multi-line explainations (“\n\n”)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case details(ExpectationMessage, String)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expectedMessage + +
    +
    +
    +
    +
    +
    +

    Returns the smallest message after the “expected to” string that summarizes the error.

    + +

    Returns the message part from ExpectationMessage, ignoring all .appends and .details.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var expectedMessage: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appended(message:) + +
    +
    +
    +
    +
    +
    +

    Appends a message after the primary expectation message

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func appended(message: String) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appendedBeNilHint() + +
    +
    +
    +
    +
    +
    +

    Appends a message hinting to use beNil() for when the actual value given was nil.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func appendedBeNilHint() -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + appended(details:) + +
    +
    +
    +
    +
    +
    +

    Appends a detailed (aka - multiline) message after the primary expectation message +Detailed messages will be placed after .appended(message:) calls.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func appended(details: String) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Replaces a primary expectation with one returned by f. Preserves all composite expectations +that were built upon it (aka - all appended(message:) and appended(details:).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func replacedExpectation(_ f: @escaping (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Wraps a primary expectation with text before and after it. +Alias to prepended(message: before).appended(message: after)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func wrappedExpectation(before: String, after: String) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Prepends a message by modifying the primary expectation

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func prepended(expectation message: String) -> ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Converts the tree of ExpectationMessages into a final built string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toString(actual: String, expected: String = "expected", to: String = "to") -> String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ExpectationStyle.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ExpectationStyle.html new file mode 100644 index 000000000..120ebda6e --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ExpectationStyle.html @@ -0,0 +1,850 @@ + + + + ExpectationStyle Enumeration Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

ExpectationStyle

+
+
+ +
public enum ExpectationStyle
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + toMatch + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case toMatch
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNotMatch + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case toNotMatch
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/PredicateStatus.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/PredicateStatus.html new file mode 100644 index 000000000..79e866508 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/PredicateStatus.html @@ -0,0 +1,942 @@ + + + + PredicateStatus Enumeration Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

PredicateStatus

+
+
+ +
public enum PredicateStatus
+ +
+
+

PredicateStatus is a trinary that indicates if a Predicate matches a given value or not

+ +
+
+
+
    +
  • +
    + + + + matches + +
    +
    +
    +
    +
    +
    +

    Matches indicates if the predicate / matcher passes with the given value

    + +

    For example, equals(1) returns .matches for expect(1).to(equal(1)).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case matches
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + doesNotMatch + +
    +
    +
    +
    +
    +
    +

    DoesNotMatch indicates if the predicate / matcher fails with the given value, but would +succeed if the expectation was inverted.

    + +

    For example, equals(2) returns .doesNotMatch for expect(1).toNot(equal(2)).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case doesNotMatch
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail + +
    +
    +
    +
    +
    +
    +

    Fail indicates the predicate will never satisfy with the given value in any case. +A perfect example is that most matchers fail whenever given nil.

    + +

    Using equal(1) fails both expect(nil).to(equal(1)) and expect(nil).toNot(equal(1)). +Note: Predicate’s requireNonNil property will also provide this feature mostly for free. + Your predicate will still need to guard against nils, but error messaging will be + handled for you.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case fail
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(bool:) + +
    +
    +
    +
    +
    +
    +

    Converts a boolean to either .matches (if true) or .doesNotMatch (if false).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(bool matches: Bool)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toObjectiveC() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toObjectiveC() -> NMBPredicateStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ToSucceedResult.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ToSucceedResult.html new file mode 100644 index 000000000..170f888c8 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Enums/ToSucceedResult.html @@ -0,0 +1,852 @@ + + + + ToSucceedResult Enumeration Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

ToSucceedResult

+
+
+ +
public enum ToSucceedResult
+ +
+
+

Used by the succeed matcher.

+ +

This is the return type for the closure.

+ +
+
+
+
    +
  • +
    + + + + succeeded + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case succeeded
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + failed(reason:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case failed(reason: String)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions.html new file mode 100644 index 000000000..3b18f4c2d --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions.html @@ -0,0 +1,1524 @@ + + + + Extensions Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Extensions

+

The following extensions are available globally.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/AnySequence.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/AnySequence.html new file mode 100644 index 000000000..06bfca5d0 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/AnySequence.html @@ -0,0 +1,822 @@ + + + + AnySequence Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AnySequence

+
+
+ +
extension AnySequence: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Array.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Array.html new file mode 100644 index 000000000..0d7da297a --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Array.html @@ -0,0 +1,822 @@ + + + + Array Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Array

+
+
+ +
extension Array: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Data.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Data.html new file mode 100644 index 000000000..e0536e365 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Data.html @@ -0,0 +1,822 @@ + + + + Data Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Data

+
+
+ +
extension Data: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Date.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Date.html new file mode 100644 index 000000000..5b5f32a75 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Date.html @@ -0,0 +1,850 @@ + + + + Date Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Date

+
+
+ +
extension Date: NMBDoubleConvertible
+
extension Date: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + doubleValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var doubleValue: CDouble { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Double.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Double.html new file mode 100644 index 000000000..f35ad9ab1 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Double.html @@ -0,0 +1,849 @@ + + + + Double Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Double

+
+
+ +
extension Double: ExpressibleByBooleanLiteral
+
extension Double: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Float.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Float.html new file mode 100644 index 000000000..bb1f43a8b --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Float.html @@ -0,0 +1,849 @@ + + + + Float Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Float

+
+
+ +
extension Float: ExpressibleByBooleanLiteral
+
extension Float: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int.html new file mode 100644 index 000000000..59fab0b39 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int.html @@ -0,0 +1,821 @@ + + + + Int Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int

+
+
+ +
extension Int: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int16.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int16.html new file mode 100644 index 000000000..f74c131f9 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int16.html @@ -0,0 +1,821 @@ + + + + Int16 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int16

+
+
+ +
extension Int16: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int32.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int32.html new file mode 100644 index 000000000..4e21a0b49 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int32.html @@ -0,0 +1,821 @@ + + + + Int32 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int32

+
+
+ +
extension Int32: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int64.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int64.html new file mode 100644 index 000000000..0c81d7a79 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int64.html @@ -0,0 +1,821 @@ + + + + Int64 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int64

+
+
+ +
extension Int64: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int8.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int8.html new file mode 100644 index 000000000..f21032c1f --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/Int8.html @@ -0,0 +1,821 @@ + + + + Int8 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Int8

+
+
+ +
extension Int8: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSArray.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSArray.html new file mode 100644 index 000000000..18e83ac55 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSArray.html @@ -0,0 +1,824 @@ + + + + NSArray Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSArray

+
+
+ +
extension NSArray: NMBContainer
+
extension NSArray: NMBOrderedCollection
+
extension NSArray: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSDate.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSDate.html new file mode 100644 index 000000000..f065b2bde --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSDate.html @@ -0,0 +1,850 @@ + + + + NSDate Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSDate

+
+
+ +
extension NSDate: NMBDoubleConvertible
+
extension NSDate: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + doubleValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var doubleValue: CDouble { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSException.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSException.html new file mode 100644 index 000000000..4150a3d75 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSException.html @@ -0,0 +1,822 @@ + + + + NSException Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSException

+
+
+ +
extension NSException
+ +
+
+ +
+
+
+
    +
  • +
    + + + + catchException(in:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func catchException(in block: @escaping () -> Void) -> `Self`?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSIndexSet.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSIndexSet.html new file mode 100644 index 000000000..56aa85a90 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSIndexSet.html @@ -0,0 +1,823 @@ + + + + NSIndexSet Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSIndexSet

+
+
+ +
extension NSIndexSet: NMBCollection
+
extension NSIndexSet: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSNumber.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSNumber.html new file mode 100644 index 000000000..7476faee2 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSNumber.html @@ -0,0 +1,851 @@ + + + + NSNumber Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSNumber

+
+
+ +
extension NSNumber: NMBDoubleConvertible
+
extension NSNumber: NMBComparable
+
extension NSNumber: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + NMB_compare(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSString.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSString.html new file mode 100644 index 000000000..3454bbd61 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/NSString.html @@ -0,0 +1,822 @@ + + + + NSString Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NSString

+
+
+ +
extension NSString: NMBComparable
+ +
+
+ +
+
+
+
    +
  • +
    + + + + NMB_compare(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/String.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/String.html new file mode 100644 index 000000000..5cd71bbbe --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/String.html @@ -0,0 +1,822 @@ + + + + String Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

String

+
+
+ +
extension String: TestOutputStringConvertible
+ +
+
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt.html new file mode 100644 index 000000000..03d41ad5c --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt.html @@ -0,0 +1,821 @@ + + + + UInt Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt

+
+
+ +
extension UInt: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt16.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt16.html new file mode 100644 index 000000000..0eac6a8a7 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt16.html @@ -0,0 +1,821 @@ + + + + UInt16 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt16

+
+
+ +
extension UInt16: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt32.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt32.html new file mode 100644 index 000000000..6c326b73c --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt32.html @@ -0,0 +1,821 @@ + + + + UInt32 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt32

+
+
+ +
extension UInt32: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt64.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt64.html new file mode 100644 index 000000000..b937628af --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt64.html @@ -0,0 +1,821 @@ + + + + UInt64 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt64

+
+
+ +
extension UInt64: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt8.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt8.html new file mode 100644 index 000000000..ada330ae9 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Extensions/UInt8.html @@ -0,0 +1,821 @@ + + + + UInt8 Extension Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

UInt8

+
+
+ +
extension UInt8: ExpressibleByBooleanLiteral
+ +
+
+ +
+
+
+
    +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: Bool)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Functions.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Functions.html new file mode 100644 index 000000000..4ca169d97 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Functions.html @@ -0,0 +1,5439 @@ + + + + Functions Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Functions

+

The following functions are available globally.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Run the provided block. If a mach “BAD_INSTRUCTION” exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil. +NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a “BAD_INSTRUCTION” exception is raised, the block will be exited before completion via Objective-C exception. The risks associated with an Objective-C exception apply here: most Swift/Objective-C functions are not exception-safe. Memory may be leaked and the program will not necessarily be left in a safe state.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func catchBadInstruction(in block: @escaping () -> Void) -> BadInstructionException?
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + block + + +
    +

    a function without parameters that will be run

    +
    +
    +
    +
    +

    Return Value

    +

    if an EXC_BAD_INSTRUCTION is raised during the execution of block then a BadInstructionException will be returned, otherwise nil.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func MACH_MSGH_BITS_REMOTE(_ bits: UInt32) -> UInt32
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MACH_MSGH_BITS(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func MACH_MSGH_BITS(_ remote: UInt32, _ local: UInt32) -> UInt32
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler,
    +                                 file: FileString = #file,
    +                                 line: UInt = #line,
    +                                 closure: () throws -> Void)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Captures expectations that occur in the given closure. Note that all +expectations will still go through to the default Nimble handler.

    + +

    This can be useful if you want to gather information about expectations +that occur within a closure.

    + +

    @param silently expectations are no longer send to the default Nimble + assertion handler when this is true. Defaults to false.

    + +

    @see gatherFailingExpectations

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func gatherExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord]
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Captures failed expectations that occur in the given closure. Note that all +expectations will still go through to the default Nimble handler.

    + +

    This can be useful if you want to gather information about failed +expectations that occur within a closure.

    + +

    @param silently expectations are no longer send to the default Nimble + assertion handler when this is true. Defaults to false.

    + +

    @see gatherExpectations +@see raiseException source for an example use case.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func gatherFailingExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord]
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func recordFailure(_ message: String, location: SourceLocation)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Wait asynchronously until the done closure is called or the timeout has been reached.

    + +

    @discussion +Call the done() closure to indicate the waiting has completed.

    + +

    This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func waitUntil(timeout: DispatchTimeInterval = AsyncDefaults.timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expect(file:line:_:) + +
    +
    +
    +
    +
    +
    +

    Make an expectation on a given actual value. The value given is lazily evaluated.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func expect<T>(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () throws -> T?) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expect(file:line:_:) + +
    +
    +
    +
    +
    +
    +

    Make an expectation on a given actual value. The closure is lazily invoked.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func expect<T>(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T)) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expect(file:line:_:) + +
    +
    +
    +
    +
    +
    +

    Make an expectation on a given actual value. The closure is lazily invoked.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func expect<T>(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T?)) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expect(file:line:_:) + +
    +
    +
    +
    +
    +
    +

    Make an expectation on a given actual value. The closure is lazily invoked.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> Void)) -> Expectation<Void>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail(_:location:) + +
    +
    +
    +
    +
    +
    +

    Always fails the test with a message and a specified location.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func fail(_ message: String, location: SourceLocation)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail(_:file:line:) + +
    +
    +
    +
    +
    +
    +

    Always fails the test with a message.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func fail(_ message: String, file: FileString = #file, line: UInt = #line)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fail(_:line:) + +
    +
    +
    +
    +
    +
    +

    Always fails the test.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func fail(_ file: FileString = #file, line: UInt = #line)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allPass(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func allPass<S: Sequence>(
    +    _ passFunc: @escaping (S.Element) throws -> Bool
    +) -> Predicate<S>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allPass(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func allPass<S: Sequence>(
    +    _ passName: String,
    +    _ passFunc: @escaping (S.Element) throws -> Bool
    +) -> Predicate<S>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allPass(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func allPass<S>(_ elementPredicate: Predicate<S.Element>) -> Predicate<S> where S : Sequence
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAKindOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is an instance of the given class.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beAKindOf<T>(_ expectedType: T.Type) -> Predicate<Any>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAKindOf(_:) + +
    +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beAKindOf(_ expectedClass: AnyClass) -> Predicate<NSObject>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAnInstanceOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is an exact instance of the given class.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beAnInstanceOf<T>(_ expectedType: T.Type) -> Predicate<Any>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beAnInstanceOf(_:) + +
    +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate<NSObject>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + defaultDelta() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func defaultDelta<F>() -> F where F : FloatingPoint
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beCloseTo(_:within:) + +
    +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beCloseTo<Value: FloatingPoint>(
    +    _ expectedValue: Value,
    +    within delta: Value = defaultDelta()
    +) -> Predicate<Value>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beCloseTo(_:within:) + +
    +
    +
    +
    +
    +
    +

    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

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beCloseTo<Value: NMBDoubleConvertible>(
    +    _ expectedValue: Value,
    +    within delta: Double = DefaultDelta
    +) -> Predicate<Value>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beCloseTo(_:within:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beCloseTo<Value: FloatingPoint, Values: Collection>(
    +    _ expectedValues: Values,
    +    within delta: Value = defaultDelta()
    +) -> Predicate<Values> where Values.Element == Value
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Operators +

+
+
+
    +
  • +
    + + + + ±(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ± <Value>(lhs: Value, rhs: Value) -> (expected: Value, delta: Value) where Value : FloatingPoint
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ±(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ± <Value>(lhs: Value, rhs: Double) -> (expected: Value, delta: Double) where Value : NMBDoubleConvertible
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty<S>() -> Predicate<S> where S : Sequence
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty<S>() -> Predicate<S> where S : SetAlgebra
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty<S>() -> Predicate<S> where S : Sequence, S : SetAlgebra
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when a value is “empty”. For collections, this +means the are no items in that collection. For NSString instances, it is an empty string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<NSString>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<NSDictionary>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<NSArray>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beEmpty() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beEmpty() -> Predicate<NMBCollection>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beGreaterThan(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is greater than the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beGreaterThan<T>(_ expectedValue: T?) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + >(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func > <T>(lhs: Expectation<T>, rhs: T) where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beGreaterThan(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is greater than the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate<NMBComparable>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + >(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func > (lhs: Expectation<NMBComparable>, rhs: NMBComparable?)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is greater than +or equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beGreaterThanOrEqualTo<T>(_ expectedValue: T?) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + >=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func >= <T>(lhs: Expectation<T>, rhs: T) where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is greater than +or equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beGreaterThanOrEqualTo<T>(_ expectedValue: T?) -> Predicate<T> where T : NMBComparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + >=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func >= <T>(lhs: Expectation<T>, rhs: T) where T : NMBComparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beIdenticalTo(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is the same instance +as the expected instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beIdenticalTo(_ expected: AnyObject?) -> Predicate<AnyObject>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + be(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is the same instance +as the expected instance.

    + +

    Alias for “beIdenticalTo”.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func be(_ expected: AnyObject?) -> Predicate<AnyObject>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beLessThan(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is less than the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beLessThan<T>(_ expectedValue: T?) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + <(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func < <T>(lhs: Expectation<T>, rhs: T) where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beLessThan(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is less than the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate<NMBComparable>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + <(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func < (lhs: Expectation<NMBComparable>, rhs: NMBComparable?)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is less than +or equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beLessThanOrEqualTo<T>(_ expectedValue: T?) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + <=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func <= <T>(lhs: Expectation<T>, rhs: T) where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is less than +or equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beLessThanOrEqualTo<T>(_ expectedValue: T?) -> Predicate<T> where T : NMBComparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + <=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func <= <T>(lhs: Expectation<T>, rhs: T) where T : NMBComparable
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

beTrue() / beFalse() +

+
+
+
    +
  • +
    + + + + beTrue() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is exactly true. +This matcher will not match against nils.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beTrue() -> Predicate<Bool>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFalse() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is exactly false. +This matcher will not match against nils.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beFalse() -> Predicate<Bool>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

beTruthy() / beFalsy() +

+
+
+
    +
  • +
    + + + + beTruthy() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is not logically false.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beTruthy<T>() -> Predicate<T> where T : Equatable, T : ExpressibleByBooleanLiteral
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFalsy() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is logically false. +This matcher will match against nils.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beFalsy<T>() -> Predicate<T> where T : Equatable, T : ExpressibleByBooleanLiteral
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beNil() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is nil.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beNil<T>() -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beSuccess(test:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher for Result that succeeds when the actual value is success.

    + +

    You can pass a closure to do any arbitrary custom matching to the value inside result. +The closure only gets called when the result is success.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beSuccess<Success, Failure>(
    +    test: ((Success) -> Void)? = nil
    +) -> Predicate<Result<Success, Failure>>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beFailure(test:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher for Result that succeeds when the actual value is failure.

    + +

    You can pass a closure to do any arbitrary custom matching to the error inside result. +The closure only gets called when the result is failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beFailure<Success, Failure>(
    +    test: ((Failure) -> Void)? = nil
    +) -> Predicate<Result<Success, Failure>>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beVoid() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is Void.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beVoid() -> Predicate<()>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beWithin(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is within given range.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beWithin<T>(_ range: Range<T>) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beWithin(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value is within given range.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beWithin<T>(_ range: ClosedRange<T>) -> Predicate<T> where T : Comparable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence’s first element +is equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith<S>(_ startingElement: S.Element) -> Predicate<S> where S : Sequence, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual collection’s first element +is equal to the expected object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith(_ startingElement: Any) -> Predicate<NMBOrderedCollection>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual string contains expected substring +where the expected substring’s location is zero.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith(_ startingSubstring: String) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(prefix:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the exepected sequence is a prefix of the actual sequence.

    + +

    This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2854218-starts

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith<Seq1: Sequence, Seq2: Sequence>(prefix expectedPrefix: Seq2?)
    +    -> Predicate<Seq1> where Seq1.Element: Equatable, Seq1.Element == Seq2.Element
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + beginWith(prefix:by:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the expected sequence is the prefix of the actual sequence, using the given predicate as the equivalence test.

    + +

    This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2996828-starts

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func beginWith<Seq1: Sequence, Seq2: Sequence>(
    +    prefix expectedPrefix: Seq2?,
    +    by areEquivalent: @escaping (Seq1.Element, Seq2.Element) -> Bool
    +) -> Predicate<Seq1>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: S.Element...) -> Predicate<S> where S : Sequence, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: [S.Element]) -> Predicate<S> where S : Sequence, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: S.Element...) -> Predicate<S> where S : SetAlgebra, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: [S.Element]) -> Predicate<S> where S : SetAlgebra, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: S.Element...) -> Predicate<S> where S : Sequence, S : SetAlgebra, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set contains the expected values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain<S>(_ items: [S.Element]) -> Predicate<S> where S : Sequence, S : SetAlgebra, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual string contains the expected substring.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ substrings: String...) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ substrings: [String]) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual string contains the expected substring.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ substrings: NSString...) -> Predicate<NSString>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ substrings: [NSString]) -> Predicate<NSString>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual collection contains the expected object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ items: Any?...) -> Predicate<NMBContainer>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contain(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contain(_ items: [Any?]) -> Predicate<NMBContainer>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func containElementSatisfying<S: Sequence>(
    +    _ predicate: @escaping ((S.Element) -> Bool), _ predicateDescription: String = ""
    +) -> Predicate<S>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + elementsEqual(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain the same elements in +the same order.

    + +

    This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2854213-elementsequal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func elementsEqual<Seq1: Sequence, Seq2: Sequence>(
    +    _ expectedValue: Seq2?
    +) -> Predicate<Seq1> where Seq1.Element: Equatable, Seq1.Element == Seq2.Element
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + elementsEqual(_:by:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain equivalent elements in +the same order, using the given predicate as the equivalence test.

    + +

    This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2949668-elementsequal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func elementsEqual<Seq1: Sequence, Seq2: Sequence>(
    +    _ expectedValue: Seq2?,
    +    by areEquivalent: @escaping (Seq1.Element, Seq2.Element) -> Bool
    +) -> Predicate<Seq1>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + endWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual sequence’s last element +is equal to the expected value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func endWith<S>(_ endingElement: S.Element) -> Predicate<S> where S : Sequence, S.Element : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + endWith(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual collection’s last element +is equal to the expected object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func endWith(_ endingElement: Any) -> Predicate<NMBOrderedCollection>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + endWith(_:) + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func endWith(_ endingSubstring: String) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple2 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable>(
    +    _ expectedValue: (T1, T2)?
    +) -> Predicate<(T1, T2)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable>(
    +    lhs: Expectation<(T1, T2)>,
    +    rhs: (T1, T2)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable>(
    +    lhs: Expectation<(T1, T2)>,
    +    rhs: (T1, T2)?
    +)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple3 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable, T3: Equatable>(
    +    _ expectedValue: (T1, T2, T3)?
    +) -> Predicate<(T1, T2, T3)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable, T3: Equatable>(
    +    lhs: Expectation<(T1, T2, T3)>,
    +    rhs: (T1, T2, T3)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable, T3: Equatable>(
    +    lhs: Expectation<(T1, T2, T3)>,
    +    rhs: (T1, T2, T3)?
    +)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple4 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable>(
    +    _ expectedValue: (T1, T2, T3, T4)?
    +) -> Predicate<(T1, T2, T3, T4)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4)>,
    +    rhs: (T1, T2, T3, T4)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4)>,
    +    rhs: (T1, T2, T3, T4)?
    +)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple5 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable>(
    +    _ expectedValue: (T1, T2, T3, T4, T5)?
    +) -> Predicate<(T1, T2, T3, T4, T5)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4, T5)>,
    +    rhs: (T1, T2, T3, T4, T5)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4, T5)>,
    +    rhs: (T1, T2, T3, T4, T5)?
    +)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Tuple6 +

+
+
+
    +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +Values can support equal by supporting the Equatable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable, T6: Equatable>(
    +    _ expectedValue: (T1, T2, T3, T4, T5, T6)?
    +) -> Predicate<(T1, T2, T3, T4, T5, T6)>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable, T6: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4, T5, T6)>,
    +    rhs: (T1, T2, T3, T4, T5, T6)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func !=<T1: Equatable, T2: Equatable, T3: Equatable, T4: Equatable, T5: Equatable, T6: Equatable>(
    +    lhs: Expectation<(T1, T2, T3, T4, T5, T6)>,
    +    rhs: (T1, T2, T3, T4, T5, T6)?
    +)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    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).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: T) -> Predicate<T> where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher allowing comparison of collection with optional type

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: [T?]) -> Predicate<[T?]> where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    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).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: T?) -> Predicate<T> where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set is equal to the expected set.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: Set<T>) -> Predicate<Set<T>> where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set is equal to the expected set.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: Set<T>?) -> Predicate<Set<T>> where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set is equal to the expected set.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: Set<T>) -> Predicate<Set<T>> where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual set is equal to the expected set.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<T>(_ expectedValue: Set<T>?) -> Predicate<Set<T>> where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + equal(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual dictionary is equal to the expected dictionary

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func equal<K, V>(_ expectedValue: [K : V?]) -> Predicate<[K : V]> where K : Hashable, V : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<T>, rhs: T) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<T>, rhs: T?) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<T>, rhs: T) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<T>, rhs: T?) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<[T]>, rhs: [T]?) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<[T]>, rhs: [T]?) where T : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<Set<T>>, rhs: Set<T>) where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<Set<T>>, rhs: Set<T>?) where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<Set<T>>, rhs: Set<T>) where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<Set<T>>, rhs: Set<T>?) where T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<Set<T>>, rhs: Set<T>) where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T>(lhs: Expectation<Set<T>>, rhs: Set<T>?) where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<Set<T>>, rhs: Set<T>) where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T>(lhs: Expectation<Set<T>>, rhs: Set<T>?) where T : Comparable, T : Hashable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func == <T, C>(lhs: Expectation<[T : C]>, rhs: [T : C]?) where T : Hashable, C : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func != <T, C>(lhs: Expectation<[T : C]>, rhs: [T : C]?) where T : Hashable, C : Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + haveCount(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual Collection’s count equals +the expected value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func haveCount<T>(_ expectedValue: Int) -> Predicate<T> where T : Collection
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + haveCount(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual collection’s count equals +the expected value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func haveCount(_ expectedValue: Int) -> Predicate<NMBCollection>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + match(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual string satisfies the regular expression +described by the expected string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func match(_ expectedValue: String?) -> Predicate<String>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + matchError(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression evaluates to an +error from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparison by _domain and _code.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func matchError<T>(_ error: T) -> Predicate<Error> where T : Error
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + matchError(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression evaluates to an +error from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparision by _domain and _code.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func matchError<T>(_ error: T) -> Predicate<Error> where T : Equatable, T : Error
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + matchError(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression evaluates to an +error of the specified type

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func matchError<T>(_ errorType: T.Type) -> Predicate<Error> where T : Error
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func postNotifications<Out>(
    +    _ predicate: Predicate<[Notification]>,
    +    from center: NotificationCenter = .default
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func postDistributedNotifications<Out>(
    +    _ predicate: Predicate<[Notification]>,
    +    from center: DistributedNotificationCenter = .default(),
    +    names: Set<Notification.Name>
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression raises an +exception with the specified name, reason, and/or userInfo.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the raised exception. The closure only gets called when an exception +is raised.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func raiseException<Out>(
    +    named: NSExceptionName? = nil,
    +    reason: String? = nil,
    +    userInfo: NSDictionary? = nil,
    +    closure: ((NSException) -> Void)? = nil
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression raises an +exception with the specified name, reason, and/or userInfo.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the raised exception. The closure only gets called when an exception +is raised.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func raiseException<Out>(
    +    named: String?,
    +    reason: String? = nil,
    +    userInfo: NSDictionary? = nil,
    +    closure: ((NSException) -> Void)? = nil
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyAllOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value matches with all of the matchers +provided in the variable list of matchers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfyAllOf<T>(_ predicates: Predicate<T>...) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyAllOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value matches with all of the matchers +provided in the array of matchers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfyAllOf<T>(_ predicates: [Predicate<T>]) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + &&(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func && <T>(left: Predicate<T>, right: Predicate<T>) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyAnyOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value matches with any of the matchers +provided in the variable list of matchers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfyAnyOf<T>(_ predicates: Predicate<T>...) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfyAnyOf(_:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual value matches with any of the matchers +provided in the array of matchers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfyAnyOf<T>(_ predicates: [Predicate<T>]) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ||(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func || <T>(left: Predicate<T>, right: Predicate<T>) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Run the provided block. If a POSIX SIGILL is received, handle it and return a BadInstructionException (which is just an empty object in this POSIX signal version). Otherwise return nil. +NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a SIGILL is received, the block will be interrupted using a C longjmp. The risks associated with abrupt jumps apply here: most Swift functions are not interrupt-safe. Memory may be leaked and the program will not necessarily be left in a safe state.

    + +
    +
    +
    +
  • +
  • +
    + + + + throwAssertion() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwAssertion<Out>() -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + throwError() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws an +error of the specified type or from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparison by _domain and _code.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the thrown error. The closure only gets called when an error was thrown.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<Out>() -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws an +error of the specified type or from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparision by _domain and _code.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the thrown error. The closure only gets called when an error was thrown.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<T, Out>(_ error: T, closure: ((Error) -> Void)? = nil) -> Predicate<Out> where T : Error
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws an +error of the specified type or from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparision by _domain and _code.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the thrown error. The closure only gets called when an error was thrown.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<T, Out>(_ error: T, closure: ((T) -> Void)? = nil) -> Predicate<Out> where T : Equatable, T : Error
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws an +error of the specified type or from the specified case.

    + +

    Errors are tried to be compared by their implementation of Equatable, +otherwise they fallback to comparision by _domain and _code.

    + +

    Alternatively, you can pass a closure to do any arbitrary custom matching +to the thrown error. The closure only gets called when an error was thrown.

    + +

    nil arguments indicates that the matcher should not attempt to match against +that parameter.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<T: Error, Out>(
    +    errorType: T.Type,
    +    closure: ((T) -> Void)? = nil
    +) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + throwError(closure:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws any +error or when the passed closures’ arbitrary custom matching succeeds.

    + +

    This duplication to it’s generic adequate is required to allow to receive +values of the existential type Error in the closure.

    + +

    The closure only gets called when an error was thrown.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<Out>(closure: @escaping ((Error) -> Void)) -> Predicate<Out>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + throwError(closure:) + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that succeeds when the actual expression throws any +error or when the passed closures’ arbitrary custom matching succeeds.

    + +

    This duplication to it’s generic adequate is required to allow to receive +values of the existential type Error in the closure.

    + +

    The closure only gets called when an error was thrown.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func throwError<T, Out>(closure: @escaping ((T) -> Void)) -> Predicate<Out> where T : Error
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + succeed() + +
    +
    +
    +
    +
    +
    +

    A Nimble matcher that takes in a closure for validation.

    + +

    Return .succeeded when the validation succeeds. +Return .failed with a failure reason when the validation fails.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func succeed() -> Predicate<ToSucceedResult>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + stringify(_:) + +
    +
    +
    +
    +
    +
    +

    Returns a string appropriate for displaying in test output +from the provided value.

    +
    +

    See also

    +

    TestOutputStringConvertible

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func stringify<T>(_ value: T?) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + value + + +
    +

    A value that will show up in a test’s output.

    +
    +
    +
    +
    +

    Return Value

    +

    The string that is returned can be +customized per type by conforming a type to the TestOutputStringConvertible +protocol. When stringifying a non-TestOutputStringConvertible type, this +function will return the value’s debug description and then its +normal description if available and in that order. Otherwise it +will return the result of constructing a string from the value.

    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Collection Type Stringers +

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Attempts to generate a pretty type string for a given value. If the value is of a Objective-C +collection type, or a subclass thereof, (e.g. NSArray, NSDictionary, etc.). +This function will return the type name of the root class of the class cluster for better +readability (e.g. NSArray instead of __NSArrayI).

    + +

    For values that don’t have a type of an Objective-C collection, this function returns the +default type description.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func prettyCollectionType<T>(_ value: T) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + value + + +
    +

    A value that will be used to determine a type name.

    +
    +
    +
    +
    +

    Return Value

    +

    The name of the class cluster root class for Objective-C collection types, or the +the dynamicType of the value for values of any other type.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the type name for a given collection type. This overload is used by Swift +collection types.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func prettyCollectionType<T>(_ collection: T) -> String where T : Collection
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + collection + + +
    +

    A Swift CollectionType value.

    +
    +
    +
    +
    +

    Return Value

    +

    A string representing the dynamicType of the value.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Global Variables.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Global Variables.html new file mode 100644 index 000000000..25f3c4dfa --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Global Variables.html @@ -0,0 +1,1038 @@ + + + + Global Variables Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Global Variables

+

The following global variables are available globally.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let MACH_MSG_TYPE_MAKE_SEND: UInt32
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + nativeThreadState + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • +
    + + + + nativeThreadState + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let nativeThreadState: Int32
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let nativeThreadStateCount: UInt32
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let nativeMachExceptionMask: exception_mask_t
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + EXC_TYPES_COUNT + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let EXC_TYPES_COUNT: Int
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Global backing interface for assertions that Nimble creates. +Defaults to a private test handler that passes through to XCTest.

    + +

    If XCTest is not available, you must assign your own assertion handler +before using any matchers, otherwise Nimble will abort the program.

    + +

    @see AssertionHandler

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var NimbleAssertionHandler: AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DefaultDelta + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let DefaultDelta: Double
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols.html new file mode 100644 index 000000000..22f03469a --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols.html @@ -0,0 +1,998 @@ + + + + Protocols Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+
+
    +
  • +
    + + + + AssertionHandler + +
    +
    +
    +
    +
    +
    +

    Protocol for the assertion handler that Nimble uses for all expectations.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol AssertionHandler
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBContainer + +
    +
    +
    +
    +
    +
    +

    Protocol for types that support contain() matcher.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol NMBContainer
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBCollection + +
    +
    +
    +
    +
    +
    +

    Protocol for types that support only beEmpty(), haveCount() matchers

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol NMBCollection
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBOrderedCollection + +
    +
    +
    +
    +
    +
    +

    Protocol for types that support beginWith(), endWith(), beEmpty() matchers

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol NMBOrderedCollection : NMBCollection
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBDoubleConvertible + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol NMBDoubleConvertible
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NMBComparable + +
    +
    +
    +
    +
    +
    +

    Protocol for types to support beLessThan(), beLessThanOrEqualTo(), + beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers.

    + +

    Types that conform to Swift’s Comparable protocol will work implicitly too

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public protocol NMBComparable
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A type with a customized test output text representation.

    + +

    This textual representation is produced when values will be +printed in test runs, and may be useful when producing +error messages in custom matchers.

    +
    +

    See also

    + CustomDebugStringConvertible + +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol TestOutputStringConvertible
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/AssertionHandler.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/AssertionHandler.html new file mode 100644 index 000000000..0ce52585b --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/AssertionHandler.html @@ -0,0 +1,823 @@ + + + + AssertionHandler Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AssertionHandler

+
+
+ +
public protocol AssertionHandler
+ +
+
+

Protocol for the assertion handler that Nimble uses for all expectations.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBCollection.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBCollection.html new file mode 100644 index 000000000..8aaaaaa1f --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBCollection.html @@ -0,0 +1,823 @@ + + + + NMBCollection Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBCollection

+
+
+ +
public protocol NMBCollection
+ +
+
+

Protocol for types that support only beEmpty(), haveCount() matchers

+ +
+
+
+
    +
  • +
    + + + + count + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var count: Int { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBComparable.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBComparable.html new file mode 100644 index 000000000..76b048f45 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBComparable.html @@ -0,0 +1,827 @@ + + + + NMBComparable Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBComparable

+
+
+ +
@objc
+public protocol NMBComparable
+ +
+
+

Protocol for types to support beLessThan(), beLessThanOrEqualTo(), + beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers.

+ +

Types that conform to Swift’s Comparable protocol will work implicitly too

+ +
+
+
+
    +
  • +
    + + + + NMB_compare(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBContainer.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBContainer.html new file mode 100644 index 000000000..828511b98 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBContainer.html @@ -0,0 +1,823 @@ + + + + NMBContainer Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBContainer

+
+
+ +
public protocol NMBContainer
+ +
+
+

Protocol for types that support contain() matcher.

+ +
+
+
+
    +
  • +
    + + + + contains(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func contains(_ anObject: Any) -> Bool
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBDoubleConvertible.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBDoubleConvertible.html new file mode 100644 index 000000000..594973212 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBDoubleConvertible.html @@ -0,0 +1,823 @@ + + + + NMBDoubleConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBDoubleConvertible

+
+
+ +
public protocol NMBDoubleConvertible
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + doubleValue + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var doubleValue: CDouble { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBOrderedCollection.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBOrderedCollection.html new file mode 100644 index 000000000..139c32b1b --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/NMBOrderedCollection.html @@ -0,0 +1,823 @@ + + + + NMBOrderedCollection Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

NMBOrderedCollection

+
+
+ +
public protocol NMBOrderedCollection : NMBCollection
+ +
+
+

Protocol for types that support beginWith(), endWith(), beEmpty() matchers

+ +
+
+
+
    +
  • +
    + + + + object(at:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func object(at index: Int) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/TestOutputStringConvertible.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/TestOutputStringConvertible.html new file mode 100644 index 000000000..df9e2d145 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Protocols/TestOutputStringConvertible.html @@ -0,0 +1,832 @@ + + + + TestOutputStringConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

TestOutputStringConvertible

+
+
+ +
public protocol TestOutputStringConvertible
+ +
+
+

A type with a customized test output text representation.

+ +

This textual representation is produced when values will be +printed in test runs, and may be useful when producing +error messages in custom matchers.

+
+

See also

+ CustomDebugStringConvertible + +
+ +
+
+
+
    +
  • +
    + + + + testDescription + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var testDescription: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs.html new file mode 100644 index 000000000..036c90b82 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs.html @@ -0,0 +1,1015 @@ + + + + Structures Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Structures

+

The following structures are available globally.

+ +
+
+
+
    +
  • +
    + + + + execTypesCountTuple + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct execTypesCountTuple<T> where T : ExpressibleByIntegerLiteral
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AssertionRecord + +
    +
    +
    +
    +
    +
    +

    A data structure that stores information about an assertion when +AssertionRecorder is set as the Nimble assertion handler.

    + +

    @see AssertionRecorder +@see AssertionHandler

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct AssertionRecord : CustomStringConvertible
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Expectation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Expression + +
    +
    +
    +
    +
    +
    +

    Expression represents the closure of the value inside expect(…). +Expressions are memoized by default. This makes them safe to call +evaluate() multiple times without causing a re-evaluation of the underlying +closure.

    + +

    @warning Since the closure can be any code, Objective-C code may choose + to raise an exception. Currently, Expression does not memoize + exception raising.

    + +

    This provides a common consumable API for matchers to utilize to allow +Nimble to change internals to how the captured closure is managed.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Expression<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AsyncDefaults + +
    +
    +
    +
    +
    +
    +

    If you are running on a slower machine, it could be useful to increase the default timeout value +or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct AsyncDefaults
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Predicate + +
    +
    +
    +
    +
    +
    +

    A Predicate is part of the new matcher API that provides assertions to expectations.

    + +

    Given a code snippet:

    + +

    expect(1).to(equal(2)) + ^^^^^^^^ + Called a “matcher”

    + +

    A matcher consists of two parts a constructor function and the Predicate. The term Predicate +is used as a separate name from Matcher to help transition custom matchers to the new Nimble +matcher API.

    + +

    The Predicate provide the heavy lifting on how to assert against a given value. Internally, +predicates are simple wrappers around closures to provide static type information and +allow composition and wrapping of existing behaviors.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PredicateResult + +
    +
    +
    +
    +
    +
    +

    The value that a Predicates return to describe if the given (actual) value matches the +predicate.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct PredicateResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/AssertionRecord.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/AssertionRecord.html new file mode 100644 index 000000000..b8027a9e0 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/AssertionRecord.html @@ -0,0 +1,907 @@ + + + + AssertionRecord Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AssertionRecord

+
+
+ +
public struct AssertionRecord : CustomStringConvertible
+ +
+
+

A data structure that stores information about an assertion when +AssertionRecorder is set as the Nimble assertion handler.

+ +

@see AssertionRecorder +@see AssertionHandler

+ +
+
+
+
    +
  • +
    + + + + success + +
    +
    +
    +
    +
    +
    +

    Whether the assertion succeeded or failed

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let success: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + message + +
    +
    +
    +
    +
    +
    +

    The failure message the assertion would display on failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let message: FailureMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + location + +
    +
    +
    +
    +
    +
    +

    The source location the expectation occurred on.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let location: SourceLocation
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/AsyncDefaults.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/AsyncDefaults.html new file mode 100644 index 000000000..157fd19a8 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/AsyncDefaults.html @@ -0,0 +1,851 @@ + + + + AsyncDefaults Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

AsyncDefaults

+
+
+ +
public struct AsyncDefaults
+ +
+
+

If you are running on a slower machine, it could be useful to increase the default timeout value +or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01.

+ +
+
+
+
    +
  • +
    + + + + timeout + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var timeout: DispatchTimeInterval
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + pollInterval + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var pollInterval: DispatchTimeInterval
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expectation.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expectation.html new file mode 100644 index 000000000..5f6b8fde3 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expectation.html @@ -0,0 +1,1637 @@ + + + + Expectation Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Expectation

+
+
+ +
public struct Expectation<T>
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + expression + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let expression: Expression<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(expression:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expression: Expression<T>)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + verify(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func verify(_ pass: Bool, _ message: FailureMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + to(_:description:) + +
    +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to match.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @discardableResult
    +public func to(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toNot(_:description:) + +
    +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to not match.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @discardableResult
    +public func toNot(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + notTo(_:description:) + +
    +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to not match.

    + +

    Alias to toNot().

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @discardableResult
    +public func notTo(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to match by checking continuously +at each pollInterval until the timeout is reached.

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toEventually(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to not match by checking +continuously at each pollInterval until the timeout is reached.

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toEventuallyNot(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to not match by checking +continuously at each pollInterval until the timeout is reached.

    + +

    Alias of toEventuallyNot()

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toNotEventually(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to never match by checking +continuously at each pollInterval until the timeout is reached.

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toNever(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to never match by checking +continuously at each pollInterval until the timeout is reached.

    + +

    Alias of toNever()

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func neverTo(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to always match by checking +continusouly at each pollInterval until the timeout is reached

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toAlways(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tests the actual value using a matcher to always match by checking +continusouly at each pollInterval until the timeout is reached

    + +

    Alias of toAlways()

    + +

    @discussion +This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function +is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func alwaysTo(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Nil + +
    +
    +
    +
    +
    +
    +

    Represents nil value to be used with the operator overloads for beNil.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Nil : ExpressibleByNilLiteral
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Expectation, rhs: Expectation.Nil)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func != (lhs: Expectation, rhs: Expectation.Nil)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T: Collection, T.Element: FloatingPoint +

+
+
+
    +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: T)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T: FloatingPoint +

+
+
+
    +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: T)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: (expected: T, delta: T))
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Expectation, rhs: (expected: T, delta: T))
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T: NMBDoubleConvertible +

+
+
+
    +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: T)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ≈(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func  (lhs: Expectation, rhs: (expected: T, delta: Double))
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Expectation, rhs: (expected: T, delta: Double))
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T == AnyObject +

+
+
+
    +
  • +
    + + + + ===(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func === (lhs: Expectation, rhs: AnyObject?)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func !== (lhs: Expectation, rhs: AnyObject?)
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + +
+ +

Available where T == () +

+
+
+
    +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Expectation<()>, rhs: ())
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + !=(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func != (lhs: Expectation<()>, rhs: ())
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expectation/Nil.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expectation/Nil.html new file mode 100644 index 000000000..b2736c653 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expectation/Nil.html @@ -0,0 +1,822 @@ + + + + Nil Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Nil

+
+
+ +
public struct Nil : ExpressibleByNilLiteral
+ +
+
+

Represents nil value to be used with the operator overloads for beNil.

+ +
+
+
+
    +
  • +
    + + + + init(nilLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(nilLiteral: ())
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expression.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expression.html new file mode 100644 index 000000000..37ec6af2b --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Expression.html @@ -0,0 +1,1025 @@ + + + + Expression Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Expression

+
+
+ +
public struct Expression<T>
+ +
+
+

Expression represents the closure of the value inside expect(…). +Expressions are memoized by default. This makes them safe to call +evaluate() multiple times without causing a re-evaluation of the underlying +closure.

+ +

@warning Since the closure can be any code, Objective-C code may choose + to raise an exception. Currently, Expression does not memoize + exception raising.

+ +

This provides a common consumable API for matchers to utilize to allow +Nimble to change internals to how the captured closure is managed.

+ +
+
+
+
    +
  • +
    + + + + location + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let location: SourceLocation
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isClosure + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let isClosure: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a new expression struct. Normally, expect(…) will manage this +creation process. The expression is memoized.

    + +

    @param expression The closure that produces a given value. +@param location The source location that this closure originates from. +@param isClosure A bool indicating if the captured expression is a + closure or internally produced closure. Some matchers + may require closures. For example, toEventually() + requires an explicit closure. This gives Nimble + flexibility if @autoclosure behavior changes between + Swift versions. Nimble internals always sets this true.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(expression: @escaping () throws -> T?, location: SourceLocation, isClosure: Bool = true)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a new expression struct. Normally, expect(…) will manage this +creation process.

    + +

    @param expression The closure that produces a given value. +@param location The source location that this closure originates from. +@param withoutCaching Indicates if the struct should memoize the given + closure’s result. Subsequent evaluate() calls will + not call the given closure if this is true. +@param isClosure A bool indicating if the captured expression is a + closure or internally produced closure. Some matchers + may require closures. For example, toEventually() + requires an explicit closure. This gives Nimble + flexibility if @autoclosure behavior changes between + Swift versions. Nimble internals always sets this true.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(memoizedExpression: @escaping (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cast(_:) + +
    +
    +
    +
    +
    +
    +

    Returns a new Expression from the given expression. Identical to a map() +on this type. This should be used only to typecast the Expression’s +closure value.

    + +

    The returned expression will preserve location and isClosure.

    + +

    @param block The block that can cast the current Expression value to a + new type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func cast<U>(_ block: @escaping (T?) throws -> U?) -> Expression<U>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + evaluate() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func evaluate() throws -> T?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + withoutCaching() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func withoutCaching() -> Expression<T>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Predicate.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Predicate.html new file mode 100644 index 000000000..8f07a1d68 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/Predicate.html @@ -0,0 +1,1038 @@ + + + + Predicate Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Predicate

+
+
+ +
public struct Predicate<T>
+ +
+
+

A Predicate is part of the new matcher API that provides assertions to expectations.

+ +

Given a code snippet:

+ +

expect(1).to(equal(2)) + ^^^^^^^^ + Called a “matcher”

+ +

A matcher consists of two parts a constructor function and the Predicate. The term Predicate +is used as a separate name from Matcher to help transition custom matchers to the new Nimble +matcher API.

+ +

The Predicate provide the heavy lifting on how to assert against a given value. Internally, +predicates are simple wrappers around closures to provide static type information and +allow composition and wrapping of existing behaviors.

+ +
+
+
+
    +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Constructs a predicate that knows how take a given value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ matcher: @escaping (Expression<T>) throws -> PredicateResult)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + satisfies(_:) + +
    +
    +
    +
    +
    +
    +

    Uses a predicate on a given value to see if it passes the predicate.

    + +

    @param expression The value to run the predicate’s logic against +@returns A predicate result indicate passing or failing and an associated error message.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func satisfies(_ expression: Expression<T>) throws -> PredicateResult
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + define(matcher:) + +
    +
    +
    +
    +
    +
    +

    Like Predicate() constructor, but automatically guard against nil (actual) values

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func define(matcher: @escaping (Expression<T>) throws -> PredicateResult) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + define(_:matcher:) + +
    +
    +
    +
    +
    +
    +

    Defines a predicate with a default message that can be returned in the closure +Also ensures the predicate’s actual value cannot pass with nil given.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func define(_ message: String = "match", matcher: @escaping (Expression<T>, ExpectationMessage) throws -> PredicateResult) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Defines a predicate with a default message that can be returned in the closure +Unlike define, this allows nil values to succeed if the given closure chooses to.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func defineNilable(_ message: String = "match", matcher: @escaping (Expression<T>, ExpectationMessage) throws -> PredicateResult) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + simple(_:matcher:) + +
    +
    +
    +
    +
    +
    +

    Provides a simple predicate definition that provides no control over the predefined +error message.

    + +

    Also ensures the predicate’s actual value cannot pass with nil given.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func simple(_ message: String = "match", matcher: @escaping (Expression<T>) throws -> PredicateStatus) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Provides a simple predicate definition that provides no control over the predefined +error message.

    + +

    Unlike simple, this allows nil values to succeed if the given closure chooses to.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func simpleNilable(_ message: String = "match", matcher: @escaping (Expression<T>) throws -> PredicateStatus) -> Predicate<T>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + requireNonNil + +
    +
    +
    +
    +
    +
    +

    Returns a new Predicate based on the current one that always fails if nil is given as +the actual value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var requireNonNil: Predicate<T> { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/PredicateResult.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/PredicateResult.html new file mode 100644 index 000000000..02f4b71c9 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/PredicateResult.html @@ -0,0 +1,959 @@ + + + + PredicateResult Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

PredicateResult

+
+
+ +
public struct PredicateResult
+ +
+
+

The value that a Predicates return to describe if the given (actual) value matches the +predicate.

+ +
+
+
+
    +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    Status indicates if the predicate matches, does not match, or fails.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var status: PredicateStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + message + +
    +
    +
    +
    +
    +
    +

    The error message that can be displayed if it does not match

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var message: ExpectationMessage
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(status:message:) + +
    +
    +
    +
    +
    +
    +

    Constructs a new PredicateResult with a given status and error message

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(status: PredicateStatus, message: ExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(bool:message:) + +
    +
    +
    +
    +
    +
    +

    Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(bool: Bool, message: ExpectationMessage)
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Converts the result to a boolean based on what the expectation intended

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toBoolean(expectation style: ExpectationStyle) -> Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toObjectiveC() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toObjectiveC() -> NMBPredicateResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/execTypesCountTuple.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/execTypesCountTuple.html new file mode 100644 index 000000000..5863321a9 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Structs/execTypesCountTuple.html @@ -0,0 +1,850 @@ + + + + execTypesCountTuple Structure Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

execTypesCountTuple

+
+
+ +
public struct execTypesCountTuple<T> where T : ExpressibleByIntegerLiteral
+ +
+
+

Undocumented

+ +
+
+
+
    +
  • +
    + + + + value + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var value: (T, T, T, T, T, T, T, T, T, T, T, T, T, T)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init()
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/Typealiases.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Typealiases.html new file mode 100644 index 000000000..d6105e909 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/Typealiases.html @@ -0,0 +1,861 @@ + + + + Type Aliases Reference + + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Type Aliases

+

The following type aliases are available globally.

+ +
+
+
+
    +
  • +
    + + + + PredicateBlock + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias PredicateBlock = (_ actualExpression: Expression<NSObject>) throws -> NMBPredicateResult
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + FileString + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • +
    + + + + FileString + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias FileString = String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/css/highlight.css b/docs/docsets/Nimble.docset/Contents/Resources/Documents/css/highlight.css new file mode 100644 index 000000000..c170357ce --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/css/highlight.css @@ -0,0 +1,202 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight .c { + color: #999988; + font-style: italic; } + +.highlight .err { + color: #a61717; + background-color: #e3d2d2; } + +.highlight .k { + color: #000000; + font-weight: bold; } + +.highlight .o { + color: #000000; + font-weight: bold; } + +.highlight .cm { + color: #999988; + font-style: italic; } + +.highlight .cp { + color: #999999; + font-weight: bold; } + +.highlight .c1 { + color: #999988; + font-style: italic; } + +.highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + +.highlight .gd { + color: #000000; + background-color: #ffdddd; } + +.highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + +.highlight .ge { + color: #000000; + font-style: italic; } + +.highlight .gr { + color: #aa0000; } + +.highlight .gh { + color: #999999; } + +.highlight .gi { + color: #000000; + background-color: #ddffdd; } + +.highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + +.highlight .go { + color: #888888; } + +.highlight .gp { + color: #555555; } + +.highlight .gs { + font-weight: bold; } + +.highlight .gu { + color: #aaaaaa; } + +.highlight .gt { + color: #aa0000; } + +.highlight .kc { + color: #000000; + font-weight: bold; } + +.highlight .kd { + color: #000000; + font-weight: bold; } + +.highlight .kp { + color: #000000; + font-weight: bold; } + +.highlight .kr { + color: #000000; + font-weight: bold; } + +.highlight .kt { + color: #445588; } + +.highlight .m { + color: #009999; } + +.highlight .s { + color: #d14; } + +.highlight .na { + color: #008080; } + +.highlight .nb { + color: #0086B3; } + +.highlight .nc { + color: #445588; + font-weight: bold; } + +.highlight .no { + color: #008080; } + +.highlight .ni { + color: #800080; } + +.highlight .ne { + color: #990000; + font-weight: bold; } + +.highlight .nf { + color: #990000; } + +.highlight .nn { + color: #555555; } + +.highlight .nt { + color: #000080; } + +.highlight .nv { + color: #008080; } + +.highlight .ow { + color: #000000; + font-weight: bold; } + +.highlight .w { + color: #bbbbbb; } + +.highlight .mf { + color: #009999; } + +.highlight .mh { + color: #009999; } + +.highlight .mi { + color: #009999; } + +.highlight .mo { + color: #009999; } + +.highlight .sb { + color: #d14; } + +.highlight .sc { + color: #d14; } + +.highlight .sd { + color: #d14; } + +.highlight .s2 { + color: #d14; } + +.highlight .se { + color: #d14; } + +.highlight .sh { + color: #d14; } + +.highlight .si { + color: #d14; } + +.highlight .sx { + color: #d14; } + +.highlight .sr { + color: #009926; } + +.highlight .s1 { + color: #d14; } + +.highlight .ss { + color: #990073; } + +.highlight .bp { + color: #999999; } + +.highlight .vc { + color: #008080; } + +.highlight .vg { + color: #008080; } + +.highlight .vi { + color: #008080; } + +.highlight .il { + color: #009999; } diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/css/jazzy.css b/docs/docsets/Nimble.docset/Contents/Resources/Documents/css/jazzy.css new file mode 100644 index 000000000..2e3871391 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/css/jazzy.css @@ -0,0 +1,439 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { + background: transparent; + border: 0; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; } + +body { + background-color: #f2f2f2; + font-family: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + -webkit-font-smoothing: subpixel-antialiased; + word-wrap: break-word; } + +h1, h2, h3 { + margin-top: 0.8em; + margin-bottom: 0.3em; + font-weight: 100; + color: black; } + +h1 { + font-size: 2.5em; } + +h2 { + font-size: 2em; + border-bottom: 1px solid #e2e2e2; } + +h4 { + font-size: 13px; + line-height: 1.5; + margin-top: 21px; } + +h5 { + font-size: 1.1em; } + +h6 { + font-size: 1.1em; + color: #777; } + +.section-name { + color: gray; + display: block; + font-family: Helvetica; + font-size: 22px; + font-weight: 100; + margin-bottom: 15px; } + +pre, code { + font: 0.95em Menlo, monospace; + color: #777; + word-wrap: normal; } + +p code, li code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; } + +pre > code { + padding: 0; } + +a { + color: #0088cc; + text-decoration: none; } + a code { + color: inherit; } + +ul { + padding-left: 15px; } + +li { + line-height: 1.8em; } + +img { + max-width: 100%; } + +blockquote { + margin-left: 0; + padding: 0 10px; + border-left: 4px solid #ccc; } + +hr { + height: 1px; + border: none; + background-color: #e2e2e2; } + +.footnote-ref { + display: inline-block; + scroll-margin-top: 70px; } + +.footnote-def { + scroll-margin-top: 70px; } + +.content-wrapper { + margin: 0 auto; + width: 980px; } + +header { + font-size: 0.85em; + line-height: 32px; + background-color: #414141; + position: fixed; + width: 100%; + z-index: 3; } + header img { + padding-right: 6px; + vertical-align: -3px; + height: 16px; } + header a { + color: #fff; } + header p { + float: left; + color: #999; } + header .header-right { + float: right; + margin-left: 16px; } + +#breadcrumbs { + background-color: #f2f2f2; + height: 21px; + padding-top: 17px; + position: fixed; + width: 100%; + z-index: 2; + margin-top: 32px; } + #breadcrumbs #carat { + height: 10px; + margin: 0 5px; } + +.sidebar { + background-color: #f9f9f9; + border: 1px solid #e2e2e2; + overflow-y: auto; + overflow-x: hidden; + position: fixed; + top: 70px; + bottom: 0; + width: 230px; + word-wrap: normal; } + +.nav-groups { + list-style-type: none; + background: #fff; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #e2e2e2; + font-size: 1.1em; + font-weight: 100; + padding: 15px 0 15px 20px; } + .nav-group-name > a { + color: #333; } + +.nav-group-tasks { + margin-top: 5px; } + +.nav-group-task { + font-size: 0.9em; + list-style-type: none; + white-space: nowrap; } + .nav-group-task a { + color: #888; } + +.main-content { + background-color: #fff; + border: 1px solid #e2e2e2; + margin-left: 246px; + position: absolute; + overflow: hidden; + padding-bottom: 20px; + top: 70px; + width: 734px; } + .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { + margin-bottom: 1em; } + .main-content p { + line-height: 1.8em; } + .main-content section .section:first-child { + margin-top: 0; + padding-top: 0; } + .main-content section .task-group-section .task-group:first-of-type { + padding-top: 10px; } + .main-content section .task-group-section .task-group:first-of-type .section-name { + padding-top: 15px; } + .main-content section .heading:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .main-content .section-name p { + margin-bottom: inherit; + line-height: inherit; } + .main-content .section-name code { + background-color: inherit; + padding: inherit; + color: inherit; } + +.section { + padding: 0 25px; } + +.highlight { + background-color: #eee; + padding: 10px 12px; + border: 1px solid #e2e2e2; + border-radius: 4px; + overflow-x: auto; } + +.declaration .highlight { + overflow-x: initial; + padding: 0 40px 40px 0; + margin-bottom: -25px; + background-color: transparent; + border: none; } + +.section-name { + margin: 0; + margin-left: 18px; } + +.task-group-section { + margin-top: 10px; + padding-left: 6px; + border-top: 1px solid #e2e2e2; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + +.section-name-container { + position: relative; + display: inline-block; } + .section-name-container .section-name-link { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + margin-bottom: 0; } + .section-name-container .section-name { + position: relative; + pointer-events: none; + z-index: 1; } + .section-name-container .section-name a { + pointer-events: auto; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .item code { + background-color: transparent; + padding: 0; } + .item .token, .item .direct-link { + display: inline-block; + text-indent: -20px; + padding-left: 3px; + margin-left: 35px; + font-size: 11.9px; + transition: all 300ms; } + .item .token-open { + margin-left: 20px; } + .item .discouraged { + text-decoration: line-through; } + .item .declaration-note { + font-size: .85em; + color: gray; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #e2e2e2; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + background: #f9f9f9; + border-left: 1px solid #e2e2e2; + border-top: 1px solid #e2e2e2; + height: 12px; + left: 21px; + top: -7px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + position: absolute; + width: 12px; } + +.height-container { + display: none; + left: -25px; + padding: 0 25px; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #f9f9f9; + border-bottom: 1px solid #e2e2e2; + left: -25px; + position: relative; + width: 100%; + padding-top: 10px; + padding-bottom: 5px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4b8afb; } + +.aside-warning, .aside-deprecated, .aside-unavailable { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #e2e2e2; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +#footer { + position: relative; + top: 10px; + bottom: 0px; + margin-left: 25px; } + #footer p { + margin: 0; + color: #aaa; + font-size: 0.8em; } + +html.dash header, html.dash #breadcrumbs, html.dash .sidebar { + display: none; } + +html.dash .main-content { + width: 980px; + margin-left: 0; + border: none; + width: 100%; + top: 0; + padding-bottom: 0; } + +html.dash .height-container { + display: block; } + +html.dash .item .token { + margin-left: 0; } + +html.dash .content-wrapper { + width: auto; } + +html.dash #footer { + position: static; } + +form[role=search] { + float: right; } + form[role=search] input { + font: Helvetica, freesans, Arial, sans-serif; + margin-top: 6px; + font-size: 13px; + line-height: 20px; + padding: 0px 10px; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } + form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fff; + color: #333; + border: 1px solid #e2e2e2; + z-index: 4; } + form[role=search] .tt-highlight { + font-weight: bold; } + form[role=search] .tt-suggestion { + font: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } + form[role=search] .tt-suggestion:hover, + form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } + form[role=search] .tt-suggestion:hover .doc-parent-name, + form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/carat.png b/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/carat.png new file mode 100755 index 000000000..29d2f7fd4 Binary files /dev/null and b/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/carat.png differ diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/dash.png b/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/dash.png new file mode 100755 index 000000000..6f694c7a0 Binary files /dev/null and b/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/dash.png differ diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/gh.png b/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/gh.png new file mode 100755 index 000000000..628da97c7 Binary files /dev/null and b/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/gh.png differ diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/spinner.gif b/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/spinner.gif new file mode 100644 index 000000000..e3038d0a4 Binary files /dev/null and b/docs/docsets/Nimble.docset/Contents/Resources/Documents/img/spinner.gif differ diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/index.html b/docs/docsets/Nimble.docset/Contents/Resources/Documents/index.html new file mode 100644 index 000000000..26755f76f --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/index.html @@ -0,0 +1,2361 @@ + + + + Nimble Reference + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +

Nimble

+ +

Build Status +CocoaPods +Carthage Compatible +Platforms

+ +

Use Nimble to express the expected outcomes of Swift +or Objective-C expressions. Inspired by +Cedar.

+
// Swift
+expect(1 + 1).to(equal(2))
+expect(1.2).to(beCloseTo(1.1, within: 0.1))
+expect(3) > 2
+expect("seahorse").to(contain("sea"))
+expect(["Atlantic", "Pacific"]).toNot(contain("Mississippi"))
+expect(ocean.isClean).toEventually(beTruthy())
+
+

How to Use Nimble

+ + + + + +

Table of Contents generated with DocToc

+ + + + +

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
+
+XCTAssertEqual(1 + 1, 2, "expected one plus one to equal two")
+
+ +

Or, in Objective-C:

+
// 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. +
  3. It’s hard to write asynchronous tests. XCTest forces you to write +a lot of boilerplate code.
  4. +
+ +

Nimble addresses these concerns.

+

Nimble: Expectations Using expect(...).to

+ +

Nimble allows you to express expectations using a natural, +easily understood language:

+
// Swift
+
+import Nimble
+
+expect(seagull.squawk).to(equal("Squee!"))
+
+
// Objective-C
+
+@import Nimble;
+
+expect(seagull.squawk).to(equal(@"Squee!"));
+
+ +
+

The expect function autocompletes to include file: and line:, + but these parameters are optional. Use the default values to have + Xcode highlight the correct line when an expectation is not met.

+
+ +

To perform the opposite expectation–to assert something is not +equal–use toNot or notTo:

+
// Swift
+
+import Nimble
+
+expect(seagull.squawk).toNot(equal("Oh, hello there!"))
+expect(seagull.squawk).notTo(equal("Oh, hello there!"))
+
+
// Objective-C
+
+@import Nimble;
+
+expect(seagull.squawk).toNot(equal(@"Oh, hello there!"));
+expect(seagull.squawk).notTo(equal(@"Oh, hello there!"));
+
+

Custom Failure Messages

+ +

Would you like to add more information to the test’s failure messages? Use the description optional argument to add your own text:

+
// Swift
+
+expect(1 + 1).to(equal(3))
+// failed - expected to equal <3>, got <2>
+
+expect(1 + 1).to(equal(3), description: "Make sure libKindergartenMath is loaded")
+// failed - Make sure libKindergartenMath is loaded
+// expected to equal <3>, got <2>
+
+ +

Or the *WithDescription version in Objective-C:

+
// Objective-C
+
+@import Nimble;
+
+expect(@(1+1)).to(equal(@3));
+// failed - expected to equal <3.0000>, got <2.0000>
+
+expect(@(1+1)).toWithDescription(equal(@3), @"Make sure libKindergartenMath is loaded");
+// failed - Make sure libKindergartenMath is loaded
+// expected to equal <3.0000>, got <2.0000>
+
+

Type Safety

+ +

Nimble makes sure you don’t compare two types that don’t match:

+
// Swift
+
+// 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
+
+// Passes if squawk does not equal "Hi!":
+expect(seagull.squawk) != "Hi!"
+
+// Passes if 10 is greater than 2:
+expect(10) > 2
+
+ +
+

Operator overloads are only available in Swift, so you won’t be able + to use this syntax in Objective-C. :broken_heart:

+
+

Lazily Computed Values

+ +

The expect function doesn’t evaluate the value it’s given until it’s +time to match. So Nimble can test whether an expression raises an +exception once evaluated:

+
// Swift
+
+// Note: Swift currently doesn't have exceptions.
+//       Only Objective-C code can raise exceptions
+//       that Nimble will catch.
+//       (see https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)
+let exception = NSException(
+    name: NSInternalInconsistencyException,
+    reason: "Not enough fish in the sea.",
+    userInfo: ["something": "is fishy"])
+expect { exception.raise() }.to(raiseException())
+
+// Also, you can customize raiseException to be more specific
+expect { exception.raise() }.to(raiseException(named: NSInternalInconsistencyException))
+expect { exception.raise() }.to(raiseException(
+    named: NSInternalInconsistencyException,
+    reason: "Not enough fish in the sea"))
+expect { exception.raise() }.to(raiseException(
+    named: NSInternalInconsistencyException,
+    reason: "Not enough fish in the sea",
+    userInfo: ["something": "is fishy"]))
+
+ +

Objective-C works the same way, but you must use the expectAction +macro when making an expectation on an expression that has no return +value:

+
// Objective-C
+
+NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException
+                                                 reason:@"Not enough fish in the sea."
+                                               userInfo:nil];
+expectAction(^{ [exception raise]; }).to(raiseException());
+
+// Use the property-block syntax to be more specific.
+expectAction(^{ [exception raise]; }).to(raiseException().named(NSInternalInconsistencyException));
+expectAction(^{ [exception raise]; }).to(raiseException().
+    named(NSInternalInconsistencyException).
+    reason("Not enough fish in the sea"));
+expectAction(^{ [exception raise]; }).to(raiseException().
+    named(NSInternalInconsistencyException).
+    reason("Not enough fish in the sea").
+    userInfo(@{@"something": @"is fishy"}));
+
+// You can also pass a block for custom matching of the raised exception
+expectAction(exception.raise()).to(raiseException().satisfyingBlock(^(NSException *exception) {
+    expect(exception.name).to(beginWith(NSInternalInconsistencyException));
+}));
+
+

C Primitives

+ +

Some testing frameworks make it hard to test primitive C values. +In Nimble, it just works:

+
// Swift
+
+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
+
+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:

+
+
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
+DispatchQueue.main.async {
+    ocean.add("dolphins")
+    ocean.add("whales")
+}
+expect(ocean).toEventually(contain("dolphins", "whales"))
+
+
// Objective-C
+
+dispatch_async(dispatch_get_main_queue(), ^{
+    [ocean add:@"dolphins"];
+    [ocean add:@"whales"];
+});
+expect(ocean).toEventually(contain(@"dolphins", @"whales"));
+
+ +

Note: toEventually triggers its polls on the main thread. Blocking the main +thread will cause Nimble to stop the run loop. This can cause test pollution +for whatever incomplete code that was running on the main thread. Blocking the +main thread can be caused by blocking IO, calls to sleep(), deadlocks, and +synchronous IPC.

+ +

In the above example, ocean is constantly re-evaluated. If it ever +contains dolphins and whales, the expectation passes. If ocean still +doesn’t contain them, even after being continuously re-evaluated for one +whole second, the expectation fails.

+ +

You can also test that a value always or never matches throughout the length of the timeout. Use toNever and toAlways for this:

+
// Swift
+ocean.add("dolphins")
+expect(ocean).toAlways(contain("dolphins"))
+expect(ocean).toNever(contain("hares"))
+
+
// Objective-C
+[ocean add:@"dolphins"]
+expect(ocean).toAlways(contain(@"dolphins"))
+expect(ocean).toNever(contain(@"hares"))
+
+ +

Sometimes it takes more than a second for a value to update. In those +cases, use the timeout parameter:

+
// Swift
+
+// Waits three seconds for ocean to contain "starfish":
+expect(ocean).toEventually(contain("starfish"), timeout: .seconds(3))
+
+// Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds.
+expect(someValue).toEventually(equal(100), timeout: .milliseconds(5500), pollInterval: .milliseconds(200))
+
+
// 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
+
+waitUntil { done in
+    ocean.goFish { success in
+        expect(success).to(beTrue())
+        done()
+    }
+}
+
+
// Objective-C
+
+waitUntil(^(void (^done)(void)){
+    [ocean goFishWithHandler:^(BOOL success){
+        expect(success).to(beTrue());
+        done();
+    }];
+});
+
+ +

waitUntil also optionally takes a timeout parameter:

+
// Swift
+
+waitUntil(timeout: .seconds(10)) { done in
+    ocean.goFish { success in
+        expect(success).to(beTrue())
+        done()
+    }
+}
+
+
// Objective-C
+
+waitUntilTimeout(10, ^(void (^done)(void)){
+    [ocean goFishWithHandler:^(BOOL success){
+        expect(success).to(beTrue());
+        done();
+    }];
+});
+
+ +

Note: waitUntil triggers its timeout code on the main thread. Blocking the main +thread will cause Nimble to stop the run loop to continue. This can cause test +pollution for whatever incomplete code that was running on the main thread. +Blocking the main thread can be caused by blocking IO, calls to sleep(), +deadlocks, and synchronous IPC.

+ +

In some cases (e.g. when running on slower machines) it can be useful to modify +the default timeout and poll interval values. This can be done as follows:

+
// Swift
+
+// Increase the global timeout to 5 seconds:
+Nimble.AsyncDefaults.timeout = .seconds(5)
+
+// Slow the polling interval to 0.1 seconds:
+Nimble.AsyncDefaults.pollInterval = .milliseconds(100)
+
+

Objective-C Support

+ +

Nimble has full support for Objective-C. However, there are two things +to keep in mind when using Nimble in Objective-C:

+ +
    +
  1. All parameters passed to the expect function, as well as matcher +functions like equal, must be Objective-C objects or can be converted into +an NSObject equivalent:
  2. +
+
   // Objective-C
+
+   @import Nimble;
+
+   expect(@(1 + 1)).to(equal(@2));
+   expect(@"Hello world").to(contain(@"world"));
+
+   // Boxed as NSNumber *
+   expect(2).to(equal(2));
+   expect(1.2).to(beLessThan(2.0));
+   expect(true).to(beTruthy());
+
+   // Boxed as NSString *
+   expect("Hello world").to(equal("Hello world"));
+
+   // Boxed as NSRange
+   expect(NSMakeRange(1, 10)).to(equal(NSMakeRange(1, 10)));
+
+ +
    +
  1. To make an expectation on an expression that does not return a value, +such as -[NSException raise], use expectAction instead of +expect:
  2. +
+
   // Objective-C
+
+   expectAction(^{ [exception raise]; }).to(raiseException());
+
+ +

The following types are currently converted to an NSObject type:

+ +
    +
  • C Numeric types are converted to NSNumber *
  • +
  • NSRange is converted to NSValue *
  • +
  • char * is converted to NSString *
  • +
+ +

For the following matchers:

+ +
    +
  • equal
  • +
  • beGreaterThan
  • +
  • beGreaterThanOrEqual
  • +
  • beLessThan
  • +
  • beLessThanOrEqual
  • +
  • beCloseTo
  • +
  • beTrue
  • +
  • beFalse
  • +
  • beTruthy
  • +
  • beFalsy
  • +
  • haveCount
  • +
+ +

If you would like to see more, file an issue.

+

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:

+
#define NIMBLE_DISABLE_SHORT_SYNTAX 1
+
+@import Nimble;
+
+NMB_expect(^{ return seagull.squawk; }, __FILE__, __LINE__).to(NMB_equal(@"Squee!"));
+
+ +
+

Disabling the shorthand is useful if you’re testing functions with + names that conflict with Nimble functions, such as expect or + equal. If that’s not the case, there’s no point in disabling the + shorthand.

+
+

Built-in Matcher Functions

+ +

Nimble includes a wide variety of matcher functions.

+

Type Checking

+ +

Nimble supports checking the type membership of any kind of object, whether +Objective-C conformant or not:

+
// Swift
+
+protocol SomeProtocol{}
+class SomeClassConformingToProtocol: SomeProtocol{}
+struct SomeStructConformingToProtocol: SomeProtocol{}
+
+// The following tests pass
+expect(1).to(beAKindOf(Int.self))
+expect("turtle").to(beAKindOf(String.self))
+
+let classObject = SomeClassConformingToProtocol()
+expect(classObject).to(beAKindOf(SomeProtocol.self))
+expect(classObject).to(beAKindOf(SomeClassConformingToProtocol.self))
+expect(classObject).toNot(beAKindOf(SomeStructConformingToProtocol.self))
+
+let structObject = SomeStructConformingToProtocol()
+expect(structObject).to(beAKindOf(SomeProtocol.self))
+expect(structObject).to(beAKindOf(SomeStructConformingToProtocol.self))
+expect(structObject).toNot(beAKindOf(SomeClassConformingToProtocol.self))
+
+
// Objective-C
+
+// The following tests pass
+NSMutableArray *array = [NSMutableArray array];
+expect(array).to(beAKindOf([NSArray class]));
+expect(@1).toNot(beAKindOf([NSNull class]));
+
+ +

Objects can be tested for their exact types using the beAnInstanceOf matcher:

+
// Swift
+
+protocol SomeProtocol{}
+class SomeClassConformingToProtocol: SomeProtocol{}
+struct SomeStructConformingToProtocol: SomeProtocol{}
+
+// Unlike the 'beKindOf' matcher, the 'beAnInstanceOf' matcher only
+// passes if the object is the EXACT type requested. The following
+// tests pass -- note its behavior when working in an inheritance hierarchy.
+expect(1).to(beAnInstanceOf(Int.self))
+expect("turtle").to(beAnInstanceOf(String.self))
+
+let classObject = SomeClassConformingToProtocol()
+expect(classObject).toNot(beAnInstanceOf(SomeProtocol.self))
+expect(classObject).to(beAnInstanceOf(SomeClassConformingToProtocol.self))
+expect(classObject).toNot(beAnInstanceOf(SomeStructConformingToProtocol.self))
+
+let structObject = SomeStructConformingToProtocol()
+expect(structObject).toNot(beAnInstanceOf(SomeProtocol.self))
+expect(structObject).to(beAnInstanceOf(SomeStructConformingToProtocol.self))
+expect(structObject).toNot(beAnInstanceOf(SomeClassConformingToProtocol.self))
+
+

Equivalence

+
// Swift
+
+// 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
+
+
// 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
+
+// Passes if 'actual' has the same pointer address as 'expected':
+expect(actual).to(beIdenticalTo(expected))
+expect(actual) === expected
+
+// Passes if 'actual' does not have the same pointer address as 'expected':
+expect(actual).toNot(beIdenticalTo(expected))
+expect(actual) !== expected
+
+ +

It is important to remember that beIdenticalTo only makes sense when comparing +types with reference semantics, which have a notion of identity. In Swift, +that means types that are defined as a class.

+ +

This matcher will not work when comparing types with value semantics such as +those defined as a struct or enum. If you need to compare two value types, +consider what it means for instances of your type to be identical. This may mean +comparing individual properties or, if it makes sense to do so, conforming your type +to Equatable and using Nimble’s equivalence matchers instead.

+
// Objective-C
+
+// Passes if 'actual' has the same pointer address as 'expected':
+expect(actual).to(beIdenticalTo(expected));
+
+// Passes if 'actual' does not have the same pointer address as 'expected':
+expect(actual).toNot(beIdenticalTo(expected));
+
+

Comparisons

+
// Swift
+
+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
+
+
// 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
+
+expect(actual).to(beCloseTo(expected, within: delta))
+
+
// Objective-C
+
+expect(actual).to(beCloseTo(expected).within(delta));
+
+ +

For example, to assert that 10.01 is close to 10, you can write:

+
// Swift
+
+expect(10.01).to(beCloseTo(10, within: 0.1))
+
+
// Objective-C
+
+expect(@(10.01)).to(beCloseTo(@10).within(0.1));
+
+ +

There is also an operator shortcut available in 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
+
+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
+
+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 conform to FloatingPoint.

+
+

Types/Classes

+
// 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))
+
+
// 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
+
+expect(dolphin).to(beAKindOf(Mammal))
+
+
// Objective-C
+
+expect(dolphin).to(beAKindOf([Mammal class]));
+
+ +
+

beAnInstanceOf uses the -[NSObject isMemberOfClass:] method to + test membership. beAKindOf uses -[NSObject isKindOfClass:].

+
+

Truthiness

+
// Passes if 'actual' is not nil, true, or an object with a boolean value of true:
+expect(actual).to(beTruthy())
+
+// Passes if 'actual' is only true (not nil or an object conforming to Boolean true):
+expect(actual).to(beTrue())
+
+// Passes if 'actual' is nil, false, or an object with a boolean value of false:
+expect(actual).to(beFalsy())
+
+// Passes if 'actual' is only false (not nil or an object conforming to Boolean false):
+expect(actual).to(beFalse())
+
+// Passes if 'actual' is nil:
+expect(actual).to(beNil())
+
+
// Objective-C
+
+// Passes if 'actual' is not nil, true, or an object with a boolean value of true:
+expect(actual).to(beTruthy());
+
+// Passes if 'actual' is only true (not nil or an object conforming to Boolean true):
+expect(actual).to(beTrue());
+
+// Passes if 'actual' is nil, false, or an object with a boolean value of false:
+expect(actual).to(beFalsy());
+
+// Passes if 'actual' is only false (not nil or an object conforming to Boolean false):
+expect(actual).to(beFalse());
+
+// Passes if 'actual' is nil:
+expect(actual).to(beNil());
+
+

Swift Assertions

+ +

If you’re using Swift, you can use the throwAssertion matcher to check if an assertion is thrown (e.g. fatalError()). This is made possible by @mattgallagher’s CwlPreconditionTesting library.

+
// Swift
+
+// Passes if 'somethingThatThrows()' throws an assertion, 
+// such as by calling 'fatalError()' or if a precondition fails:
+expect { try somethingThatThrows() }.to(throwAssertion())
+expect { () -> Void in fatalError() }.to(throwAssertion())
+expect { precondition(false) }.to(throwAssertion())
+
+// Passes if throwing an NSError is not equal to throwing an assertion:
+expect { throw NSError(domain: "test", code: 0, userInfo: nil) }.toNot(throwAssertion())
+
+// Passes if the code after the precondition check is not run:
+var reachedPoint1 = false
+var reachedPoint2 = false
+expect {
+    reachedPoint1 = true
+    precondition(false, "condition message")
+    reachedPoint2 = true
+}.to(throwAssertion())
+
+expect(reachedPoint1) == true
+expect(reachedPoint2) == false
+
+ +

Notes:

+ +
    +
  • This feature is only available in Swift.
  • +
  • The tvOS simulator is supported, but using a different mechanism, requiring you to turn off the Debug executable scheme setting for your tvOS scheme’s Test configuration.
  • +
+

Swift Error Handling

+ +

You can use the throwError matcher to check if an error is thrown.

+
// Swift
+
+// Passes if 'somethingThatThrows()' throws an 'Error':
+expect { try somethingThatThrows() }.to(throwError())
+
+// Passes if 'somethingThatThrows()' throws an error within a particular domain:
+expect { try somethingThatThrows() }.to(throwError { (error: Error) in
+    expect(error._domain).to(equal(NSCocoaErrorDomain))
+})
+
+// Passes if 'somethingThatThrows()' throws a particular error enum case:
+expect { try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError))
+
+// Passes if 'somethingThatThrows()' throws an error of a particular type:
+expect { try somethingThatThrows() }.to(throwError(errorType: NimbleError.self))
+
+ +

When working directly with Error values, using the matchError matcher +allows you to perform certain checks on the error itself without having to +explicitly cast the error.

+ +

The matchError matcher allows you to check whether or not the error:

+ +
    +
  • is the same type of error you are expecting.
  • +
  • represents a particular error value that you are expecting.
  • +
+ +

This can be useful when using Result or Promise types, for example.

+
// Swift
+
+let actual: Error = ...
+
+// Passes if 'actual' represents any error value from the NimbleErrorEnum type:
+expect(actual).to(matchError(NimbleErrorEnum.self))
+
+// Passes if 'actual' represents the case 'timeout' from the NimbleErrorEnum type:
+expect(actual).to(matchError(NimbleErrorEnum.timeout))
+
+// Passes if 'actual' contains an NSError equal to the one provided:
+expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil)))
+
+ +

Note: This feature is only available in Swift.

+

Exceptions

+
// Swift
+
+// Passes if 'actual', when evaluated, raises an exception:
+expect(actual).to(raiseException())
+
+// Passes if 'actual' raises an exception with the given name:
+expect(actual).to(raiseException(named: name))
+
+// Passes if 'actual' raises an exception with the given name and reason:
+expect(actual).to(raiseException(named: name, reason: reason))
+
+// Passes if 'actual' raises an exception which passes expectations defined in the given closure:
+// (in this case, if the exception's name begins with "a r")
+expect { exception.raise() }.to(raiseException { (exception: NSException) in
+    expect(exception.name).to(beginWith("a r"))
+})
+
+
// Objective-C
+
+// Passes if 'actual', when evaluated, raises an exception:
+expect(actual).to(raiseException())
+
+// Passes if 'actual' raises an exception with the given name
+expect(actual).to(raiseException().named(name))
+
+// Passes if 'actual' raises an exception with the given name and reason:
+expect(actual).to(raiseException().named(name).reason(reason))
+
+// Passes if 'actual' raises an exception and it passes expectations defined in the given block:
+// (in this case, if name begins with "a r")
+expect(actual).to(raiseException().satisfyingBlock(^(NSException *exception) {
+    expect(exception.name).to(beginWith(@"a r"));
+}));
+
+ +

Note: Swift currently doesn’t have exceptions (see #220). +Only Objective-C code can raise exceptions that Nimble will catch.

+

Collection Membership

+
// Swift
+
+// Passes if all of the expected values are members of 'actual':
+expect(actual).to(contain(expected...))
+
+// Passes if 'actual' is empty (i.e. it contains no elements):
+expect(actual).to(beEmpty())
+
+
// Objective-C
+
+// Passes if expected is a member of 'actual':
+expect(actual).to(contain(expected));
+
+// Passes if 'actual' is empty (i.e. it contains no elements):
+expect(actual).to(beEmpty());
+
+ +
+

In Swift contain takes any number of arguments. The expectation + passes if all of them are members of the collection. In Objective-C, + contain only takes one argument for now.

+
+ +

For example, to assert that a list of sea creature names contains +“dolphin” and “starfish”:

+
// Swift
+
+expect(["whale", "dolphin", "starfish"]).to(contain("dolphin", "starfish"))
+
+
// 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
+
+// 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...))
+
+
// 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.

+ +

For code that returns collections of complex objects without a strict +ordering, there is the containElementSatisfying matcher:

+
// Swift
+
+struct Turtle {
+    let color: String
+}
+
+let turtles: [Turtle] = functionThatReturnsSomeTurtlesInAnyOrder()
+
+// This set of matchers passes regardless of whether the array is 
+// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]:
+
+expect(turtles).to(containElementSatisfying({ turtle in
+    return turtle.color == "green"
+}))
+expect(turtles).to(containElementSatisfying({ turtle in
+    return turtle.color == "blue"
+}, "that is a turtle with color 'blue'"))
+
+// The second matcher will incorporate the provided string in the error message
+// should it fail
+
+
// Objective-C
+
+@interface Turtle : NSObject
+@property (nonatomic, readonly, nonnull) NSString *color;
+@end
+
+@implementation Turtle 
+@end
+
+NSArray<Turtle *> * __nonnull turtles = functionThatReturnsSomeTurtlesInAnyOrder();
+
+// This set of matchers passes regardless of whether the array is 
+// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]:
+
+expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) {
+    return [[turtle color] isEqualToString:@"green"];
+}));
+expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) {
+    return [[turtle color] isEqualToString:@"blue"];
+}));
+
+ +

For asserting on if the given Comparable value is inside of a Range, use the beWithin matcher.

+
// Swift
+
+// Passes if 5 is within the range 1 through 10, inclusive
+expect(5).to(beWithin(1...10))
+
+// Passes if 5 is not within the range 2 through 4.
+expect(5).toNot(beWithin(2..<5))
+
+

Strings

+
// Swift
+
+// Passes if 'actual' contains 'substring':
+expect(actual).to(contain(substring))
+
+// Passes if 'actual' begins with 'prefix':
+expect(actual).to(beginWith(prefix))
+
+// Passes if 'actual' ends with 'suffix':
+expect(actual).to(endWith(suffix))
+
+// Passes if 'actual' represents the empty string, "":
+expect(actual).to(beEmpty())
+
+// Passes if 'actual' matches the regular expression defined in 'expected':
+expect(actual).to(match(expected))
+
+
// Objective-C
+
+// Passes if 'actual' contains 'substring':
+expect(actual).to(contain(expected));
+
+// Passes if 'actual' begins with 'prefix':
+expect(actual).to(beginWith(prefix));
+
+// Passes if 'actual' ends with 'suffix':
+expect(actual).to(endWith(suffix));
+
+// Passes if 'actual' represents the empty string, "":
+expect(actual).to(beEmpty());
+
+// Passes if 'actual' matches the regular expression defined in 'expected':
+expect(actual).to(match(expected))
+
+

Collection Elements

+ +

Nimble provides a means to check that all elements of a collection pass a given expectation.

+

Swift

+ +

In Swift, the collection must be an instance of a type conforming to +Sequence.

+
// Swift
+
+// Providing a custom function:
+expect([1, 2, 3, 4]).to(allPass { $0 < 5 })
+
+// Composing the expectation with another matcher:
+expect([1, 2, 3, 4]).to(allPass(beLessThan(5)))
+
+

Objective-C

+ +

In Objective-C, the collection must be an instance of a type which implements +the NSFastEnumeration protocol, and whose elements are instances of a type +which subclasses NSObject.

+ +

Additionally, unlike in Swift, there is no override to specify a custom +matcher function.

+
// Objective-C
+
+expect(@[@1, @2, @3, @4]).to(allPass(beLessThan(@5)));
+
+

Collection Count

+
// Swift
+
+// Passes if 'actual' contains the 'expected' number of elements:
+expect(actual).to(haveCount(expected))
+
+// Passes if 'actual' does _not_ contain the 'expected' number of elements:
+expect(actual).notTo(haveCount(expected))
+
+
// Objective-C
+
+// Passes if 'actual' contains the 'expected' number of elements:
+expect(actual).to(haveCount(expected))
+
+// Passes if 'actual' does _not_ contain the 'expected' number of elements:
+expect(actual).notTo(haveCount(expected))
+
+ +

For Swift, the actual value must be an instance of a type conforming to Collection. +For example, instances of Array, Dictionary, or Set.

+ +

For Objective-C, the actual value must be one of the following classes, or their subclasses:

+ +
    +
  • NSArray,
  • +
  • NSDictionary,
  • +
  • NSSet, or
  • +
  • NSHashTable.
  • +
+

Notifications

+
// Swift
+let testNotification = Notification(name: Notification.Name("Foo"), object: nil)
+
+// Passes if the closure in expect { ... } posts a notification to the default
+// notification center.
+expect {
+    NotificationCenter.default.post(testNotification)
+}.to(postNotifications(equal([testNotification])))
+
+// Passes if the closure in expect { ... } posts a notification to a given
+// notification center
+let notificationCenter = NotificationCenter()
+expect {
+    notificationCenter.post(testNotification)
+}.to(postNotifications(equal([testNotification]), from: notificationCenter))
+
+// Passes if the closure in expect { ... } posts a notification with the provided names to a given
+// notification center. Make sure to use this when running tests on Catalina, 
+// using DistributedNotificationCenter as there is currently no way 
+// of observing notifications without providing specific names.
+let distributedNotificationCenter = DistributedNotificationCenter()
+expect {
+    distributedNotificationCenter.post(testNotification)
+}.toEventually(postDistributedNotifications(equal([testNotification]),
+                                  from: distributedNotificationCenter,
+                                  names: [testNotification.name]))
+
+ +
+

This matcher is only available in Swift.

+
+

Result

+
// Swift
+let aResult: Result<String, Error> = .success("Hooray") 
+
+// passes if result is .success
+expect(aResult).to(beSuccess()) 
+
+// passes if result value is .success and validates Success value
+expect(aResult).to(beSuccess { value in
+    expect(value).to(equal("Hooray"))
+})
+
+
+enum AnError: Error {
+    case somethingHappened
+}
+let otherResult: Result<String, AnError> = .failure(.somethingHappened) 
+
+// passes if result is .failure
+expect(otherResult).to(beFailure()) 
+
+// passes if result value is .failure and validates error
+expect(otherResult).to(beFailure { error in
+    expect(error).to(matchError(AnError.somethingHappened))
+}) 
+
+ +
+

This matcher is only available in Swift.

+
+

Matching a value to any of a group of matchers

+
// Swift
+
+// passes if actual is either less than 10 or greater than 20
+expect(actual).to(satisfyAnyOf(beLessThan(10), beGreaterThan(20)))
+
+// can include any number of matchers -- the following will pass
+// **be careful** -- too many matchers can be the sign of an unfocused test
+expect(6).to(satisfyAnyOf(equal(2), equal(3), equal(4), equal(5), equal(6), equal(7)))
+
+// in Swift you also have the option to use the || operator to achieve a similar function
+expect(82).to(beLessThan(50) || beGreaterThan(80))
+
+
// Objective-C
+
+// passes if actual is either less than 10 or greater than 20
+expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20)))
+
+// can include any number of matchers -- the following will pass
+// **be careful** -- too many matchers can be the sign of an unfocused test
+expect(@6).to(satisfyAnyOf(equal(@2), equal(@3), equal(@4), equal(@5), equal(@6), equal(@7)))
+
+ +

Note: This matcher allows you to chain any number of matchers together. This provides flexibility, + but if you find yourself chaining many matchers together in one test, consider whether you + could instead refactor that single test into multiple, more precisely focused tests for + better coverage.

+

Custom Validation

+
// Swift
+
+// passes if .succeeded is returned from the closure
+expect {
+    guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else {
+        return .failed(reason: "wrong enum case")
+    }
+
+    return .succeeded
+}.to(succeed())
+
+// passes if .failed is returned from the closure
+expect {
+    guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else {
+        return .failed(reason: "wrong enum case")
+    }
+
+    return .succeeded
+}.notTo(succeed())
+
+ +

The String provided with .failed() is shown when the test fails.

+ +

When using toEventually() be careful not to make state changes or run process intensive code since this closure will be ran many times.

+

Writing Your Own Matchers

+ +

In Nimble, matchers are Swift functions that take an expected +value and return a Predicate closure. Take equal, for example:

+
// Swift
+
+public func equal<T: Equatable>(expectedValue: T?) -> Predicate<T> {
+    // Can be shortened to:
+    //   Predicate { actual in  ... }
+    //
+    // But shown with types here for clarity.
+    return Predicate { (actualExpression: Expression<T>) throws -> PredicateResult in
+        let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>")
+        if let actualValue = try actualExpression.evaluate() {
+            return PredicateResult(
+                bool: actualValue == expectedValue!,
+                message: msg
+            )
+        } else {
+            return PredicateResult(
+                status: .fail,
+                message: msg.appendedBeNilHint()
+            )
+        }
+    }
+}
+
+ +

The return value of a Predicate closure is a PredicateResult that indicates +whether the actual value matches the expectation and what error message to +display on failure.

+ +
+

The actual equal matcher function does not match when + expected are nil; the example above has been edited for brevity.

+
+ +

Since matchers are just Swift functions, you can define them anywhere: +at the top of your test file, in a file shared by all of your tests, or +in an Xcode project you distribute to others.

+ +
+

If you write a matcher you think everyone can use, consider adding it + to Nimble’s built-in set of matchers by sending a pull request! Or + distribute it yourself via GitHub.

+
+ +

For examples of how to write your own matchers, just check out the +Matchers directory +to see how Nimble’s built-in set of matchers are implemented. You can +also check out the tips below.

+

PredicateResult

+ +

PredicateResult is the return struct that Predicate return to indicate +success and failure. A PredicateResult is made up of two values: +PredicateStatus and ExpectationMessage.

+ +

Instead of a boolean, PredicateStatus captures a trinary set of values:

+
// Swift
+
+public enum PredicateStatus {
+// The predicate "passes" with the given expression
+// eg - expect(1).to(equal(1))
+case matches
+
+// The predicate "fails" with the given expression
+// eg - expect(1).toNot(equal(1))
+case doesNotMatch
+
+// The predicate never "passes" with the given expression, even if negated
+// eg - expect(nil as Int?).toNot(equal(1))
+case fail
+
+// ...
+}
+
+ +

Meanwhile, ExpectationMessage provides messaging semantics for error reporting.

+
// Swift
+
+public indirect enum ExpectationMessage {
+// Emits standard error message:
+// eg - "expected to <string>, got <actual>"
+case expectedActualValueTo(/* message: */ String)
+
+// Allows any free-form message
+// eg - "<string>"
+case fail(/* message: */ String)
+
+// ...
+}
+
+ +

Predicates should usually depend on either .expectedActualValueTo(..) or +.fail(..) when reporting errors. Special cases can be used for the other enum +cases.

+ +

Finally, if your Predicate utilizes other Predicates, you can utilize +.appended(details:) and .appended(message:) methods to annotate an existing +error with more details.

+ +

A common message to append is failing on nils. For that, .appendedBeNilHint() +can be used.

+

Lazy Evaluation

+ +

actualExpression is a lazy, memoized closure around the value provided to the +expect function. The expression can either be a closure or a value directly +passed to expect(...). In order to determine whether that value matches, +custom matchers should call actualExpression.evaluate():

+
// Swift
+
+public func beNil<T>() -> Predicate<T> {
+    // Predicate.simpleNilable(..) automatically generates ExpectationMessage for
+    // us based on the string we provide to it. Also, the 'Nilable' postfix indicates
+    // that this Predicate supports matching against nil actualExpressions, instead of
+    // always resulting in a PredicateStatus.fail result -- which is true for
+    // Predicate.simple(..)
+    return Predicate.simpleNilable("be nil") { actualExpression in
+        let actualValue = try actualExpression.evaluate()
+        return PredicateStatus(bool: actualValue == nil)
+    }
+}
+
+ +

In the above example, actualExpression is not nil – it is a closure +that returns a value. The value it returns, which is accessed via the +evaluate() method, may be nil. If that value is nil, the beNil +matcher function returns true, indicating that the expectation passed.

+

Type Checking via Swift Generics

+ +

Using Swift’s generics, matchers can constrain the type of the actual value +passed to the expect function by modifying the return type.

+ +

For example, the following matcher, haveDescription, only accepts actual +values that implement the Printable protocol. It checks their description +against the one provided to the matcher function, and passes if they are the same:

+
// Swift
+
+public func haveDescription(description: String) -> Predicate<Printable?> {
+    return Predicate.simple("have description") { actual in
+        return PredicateStatus(bool: actual.evaluate().description == description)
+    }
+}
+
+

Customizing Failure Messages

+ +

When using Predicate.simple(..) or Predicate.simpleNilable(..), Nimble +outputs the following failure message when an expectation fails:

+
// where `message` is the first string argument and
+// `actual` is the actual value received in `expect(..)`
+"expected to \(message), got <\(actual)>"
+
+ +

You can customize this message by modifying the way you create a Predicate.

+

Basic Customization

+ +

For slightly more complex error messaging, receive the created failure message +with Predicate.define(..):

+
// Swift
+
+public func equal<T: Equatable>(_ expectedValue: T?) -> Predicate<T> {
+    return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in
+        let actualValue = try actualExpression.evaluate()
+        let matches = actualValue == expectedValue && expectedValue != nil
+        if expectedValue == nil || actualValue == nil {
+            if expectedValue == nil && actualValue != nil {
+                return PredicateResult(
+                    status: .fail,
+                    message: msg.appendedBeNilHint()
+                )
+            }
+            return PredicateResult(status: .fail, message: msg)
+        }
+        return PredicateResult(bool: matches, message: msg)
+    }
+}
+
+ +

In the example above, msg is defined based on the string given to +Predicate.define. The code looks akin to:

+
// Swift
+
+let msg = ExpectationMessage.expectedActualValueTo("equal <\(stringify(expectedValue))>")
+
+

Full Customization

+ +

To fully customize the behavior of the Predicate, use the overload that expects +a PredicateResult to be returned.

+ +

Along with PredicateResult, there are other ExpectationMessage enum values you can use:

+
public indirect enum ExpectationMessage {
+// Emits standard error message:
+// eg - "expected to <message>, got <actual>"
+case expectedActualValueTo(/* message: */ String)
+
+// Allows any free-form message
+// eg - "<message>"
+case fail(/* message: */ String)
+
+// Emits standard error message with a custom actual value instead of the default.
+// eg - "expected to <message>, got <actual>"
+case expectedCustomValueTo(/* message: */ String, /* actual: */ String)
+
+// Emits standard error message without mentioning the actual value
+// eg - "expected to <message>"
+case expectedTo(/* message: */ String)
+
+// ...
+}
+
+ +

For matchers that compose other matchers, there are a handful of helper +functions to annotate messages.

+ +

appended(message: String) is used to append to the original failure message:

+
// produces "expected to be true, got <actual> (use beFalse() for inverse)"
+// appended message do show up inline in Xcode.
+.expectedActualValueTo("be true").appended(message: " (use beFalse() for inverse)")
+
+ +

For a more comprehensive message that spans multiple lines, use +appended(details: String) instead:

+
// produces "expected to be true, got <actual>\n\nuse beFalse() for inverse\nor use beNil()"
+// details do not show inline in Xcode, but do show up in test logs.
+.expectedActualValueTo("be true").appended(details: "use beFalse() for inverse\nor use beNil()")
+
+

Supporting Objective-C

+ +

To use a custom matcher written in Swift from Objective-C, you’ll have +to extend the NMBPredicate class, adding a new class method for your +custom matcher. The example below defines the class method ++[NMBPredicate beNilMatcher]:

+
// Swift
+
+extension NMBPredicate {
+    @objc public class func beNilMatcher() -> NMBPredicate {
+        return NMBPredicate { actualExpression in
+            return try beNil().satisfies(actualExpression).toObjectiveC()
+        }
+    }
+}
+
+ +

The above allows you to use the matcher from Objective-C:

+
// Objective-C
+
+expect(actual).to([NMBPredicate beNilMatcher]());
+
+ +

To make the syntax easier to use, define a C function that calls the +class method:

+
// Objective-C
+
+FOUNDATION_EXPORT NMBPredicate *beNil() {
+    return [NMBPredicate beNilMatcher];
+}
+
+

Properly Handling nil in Objective-C Matchers

+ +

When supporting Objective-C, make sure you handle nil appropriately. +Like Cedar, +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:

+
// 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 Predicate.define or Predicate.simple. +Using those factory methods will automatically generate expected value failure messages when they’re nil.

+
public func beginWith<S: Sequence>(_ startingElement: S.Element) -> Predicate<S> where S.Element: Equatable {
+    return Predicate.simple("begin with <\(startingElement)>") { actualExpression in
+        guard let actualValue = try actualExpression.evaluate() else { return .fail }
+
+        var actualGenerator = actualValue.makeIterator()
+        return PredicateStatus(bool: actualGenerator.next() == startingElement)
+    }
+}
+
+extension NMBPredicate {
+    @objc public class func beginWithMatcher(_ expected: Any) -> NMBPredicate {
+        return NMBPredicate { actualExpression in
+            let actual = try actualExpression.evaluate()
+            let expr = actualExpression.cast { $0 as? NMBOrderedCollection }
+            return try beginWith(expected).satisfies(expr).toObjectiveC()
+        }
+    }
+}
+
+

Migrating from the Old Matcher API

+ +

Previously (<7.0.0), Nimble supported matchers via the following types:

+ +
    +
  • Matcher
  • +
  • NonNilMatcherFunc
  • +
  • MatcherFunc
  • +
+ +

All of those types have been replaced by Predicate. The old API has been +removed completely in Nimble v10.

+

Installing Nimble

+ +
+

Nimble can be used on its own, or in conjunction with its sister + project, Quick. To install both + Quick and Nimble, follow the installation instructions in the Quick + Documentation.

+
+ +

Nimble can currently be installed in one of two ways: using CocoaPods, or with +git submodules.

+

Installing Nimble as a Submodule

+ +

To use Nimble as a submodule to test your macOS, iOS or tvOS applications, follow +these 4 easy steps:

+ +
    +
  1. Clone the Nimble repository
  2. +
  3. Add Nimble.xcodeproj to the Xcode workspace for your project
  4. +
  5. Link Nimble.framework to your test target
  6. +
  7. Start writing expectations!
  8. +
+ +

For more detailed instructions on each of these steps, +read How to Install Quick. +Ignore the steps involving adding Quick to your project in order to +install just Nimble.

+

Installing Nimble via CocoaPods

+ +

To use Nimble in CocoaPods to test your macOS, iOS or tvOS applications, add +Nimble to your podfile and add the use_frameworks! line to enable Swift +support for CocoaPods.

+
platform :ios, '8.0'
+
+source 'https://github.com/CocoaPods/Specs.git'
+
+# Whatever pods you need for your app go here
+
+target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do
+  use_frameworks!
+  pod 'Nimble'
+end
+
+ +

Finally run pod install.

+

Using Nimble without XCTest

+ +

Nimble is integrated with XCTest to allow it work well when used in Xcode test +bundles, however it can also be used in a standalone app. After installing +Nimble using one of the above methods, there are two additional steps required +to make this work.

+ +
    +
  1. Create a custom assertion handler and assign an instance of it to the +global NimbleAssertionHandler variable. For example:
  2. +
+
class MyAssertionHandler : AssertionHandler {
+    func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) {
+        if (!assertion) {
+            print("Expectation failed: \(message.stringValue)")
+        }
+    }
+}
+
+
// Somewhere before you use any assertions
+NimbleAssertionHandler = MyAssertionHandler()
+
+ +
    +
  1. Add a post-build action to fix an issue with the Swift XCTest support +library being unnecessarily copied into your app + +
      +
    • Edit your scheme in Xcode, and navigate to Build -> Post-actions
    • +
    • Click the “+” icon and select “New Run Script Action”
    • +
    • Open the “Provide build settings from” dropdown and select your target
    • +
    • Enter the following script contents: + +rm "${SWIFT_STDLIB_TOOL_DESTINATION_DIR}/libswiftXCTest.dylib" +
    • +
  2. +
+ +

You can now use Nimble assertions in your code and handle failures as you see +fit.

+ +
+
+ +
+
+ + diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jazzy.js b/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jazzy.js new file mode 100755 index 000000000..198441660 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jazzy.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +function toggleItem($link, $content) { + var animationDuration = 300; + $link.toggleClass('token-open'); + $content.slideToggle(animationDuration); +} + +function itemLinkToContent($link) { + return $link.parent().parent().next(); +} + +// On doc load + hash-change, open any targetted item +function openCurrentItemIfClosed() { + if (window.jazzy.docset) { + return; + } + var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); + $content = itemLinkToContent($link); + if ($content.is(':hidden')) { + toggleItem($link, $content); + } +} + +$(openCurrentItemIfClosed); +$(window).on('hashchange', openCurrentItemIfClosed); + +// On item link ('token') click, toggle its discussion +$('.token').on('click', function(event) { + if (window.jazzy.docset) { + return; + } + var $link = $(this); + toggleItem($link, itemLinkToContent($link)); + + // Keeps the document from jumping to the hash. + var href = $link.attr('href'); + if (history.pushState) { + history.pushState({}, '', href); + } else { + location.hash = href; + } + event.preventDefault(); +}); + +// Clicks on links to the current, closed, item need to open the item +$("a:not('.token')").on('click', function() { + if (location == this.href) { + openCurrentItemIfClosed(); + } +}); + +// KaTeX rendering +if ("katex" in window) { + $($('.math').each( (_, element) => { + katex.render(element.textContent, element, { + displayMode: $(element).hasClass('m-block'), + throwOnError: false, + trust: true + }); + })) +} diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jazzy.search.js b/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jazzy.search.js new file mode 100644 index 000000000..359cdbb8b --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jazzy.search.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +$(function(){ + var $typeahead = $('[data-typeahead]'); + var $form = $typeahead.parents('form'); + var searchURL = $form.attr('action'); + + function displayTemplate(result) { + return result.name; + } + + function suggestionTemplate(result) { + var t = '
'; + t += '' + result.name + ''; + if (result.parent_name) { + t += '' + result.parent_name + ''; + } + t += '
'; + return t; + } + + $typeahead.one('focus', function() { + $form.addClass('loading'); + + $.getJSON(searchURL).then(function(searchData) { + const searchIndex = lunr(function() { + this.ref('url'); + this.field('name'); + this.field('abstract'); + for (const [url, doc] of Object.entries(searchData)) { + this.add({url: url, name: doc.name, abstract: doc.abstract}); + } + }); + + $typeahead.typeahead( + { + highlight: true, + minLength: 3, + autoselect: true + }, + { + limit: 10, + display: displayTemplate, + templates: { suggestion: suggestionTemplate }, + source: function(query, sync) { + const lcSearch = query.toLowerCase(); + const results = searchIndex.query(function(q) { + q.term(lcSearch, { boost: 100 }); + q.term(lcSearch, { + boost: 10, + wildcard: lunr.Query.wildcard.TRAILING + }); + }).map(function(result) { + var doc = searchData[result.ref]; + doc.url = result.ref; + return doc; + }); + sync(results); + } + } + ); + $form.removeClass('loading'); + $typeahead.trigger('focus'); + }); + }); + + var baseURL = searchURL.slice(0, -"search.json".length); + + $typeahead.on('typeahead:select', function(e, result) { + window.location = baseURL + result.url; + }); +}); diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jquery.min.js b/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jquery.min.js new file mode 100644 index 000000000..c4c6022f2 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/typeahead.jquery.js b/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/typeahead.jquery.js new file mode 100644 index 000000000..3a2d2ab03 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/js/typeahead.jquery.js @@ -0,0 +1,1694 @@ +/*! + * typeahead.js 1.3.1 + * https://github.com/corejavascript/typeahead.js + * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT + */ + + +(function(root, factory) { + if (typeof define === "function" && define.amd) { + define([ "jquery" ], function(a0) { + return factory(a0); + }); + } else if (typeof module === "object" && module.exports) { + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +})(this, function($) { + var _ = function() { + "use strict"; + return { + isMsie: function() { + return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; + }, + isBlankString: function(str) { + return !str || /^\s*$/.test(str); + }, + escapeRegExChars: function(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }, + isString: function(obj) { + return typeof obj === "string"; + }, + isNumber: function(obj) { + return typeof obj === "number"; + }, + isArray: $.isArray, + isFunction: $.isFunction, + isObject: $.isPlainObject, + isUndefined: function(obj) { + return typeof obj === "undefined"; + }, + isElement: function(obj) { + return !!(obj && obj.nodeType === 1); + }, + isJQuery: function(obj) { + return obj instanceof $; + }, + toStr: function toStr(s) { + return _.isUndefined(s) || s === null ? "" : s + ""; + }, + bind: $.proxy, + each: function(collection, cb) { + $.each(collection, reverseArgs); + function reverseArgs(index, value) { + return cb(value, index); + } + }, + map: $.map, + filter: $.grep, + every: function(obj, test) { + var result = true; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (!(result = test.call(null, val, key, obj))) { + return false; + } + }); + return !!result; + }, + some: function(obj, test) { + var result = false; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (result = test.call(null, val, key, obj)) { + return false; + } + }); + return !!result; + }, + mixin: $.extend, + identity: function(x) { + return x; + }, + clone: function(obj) { + return $.extend(true, {}, obj); + }, + getIdGenerator: function() { + var counter = 0; + return function() { + return counter++; + }; + }, + templatify: function templatify(obj) { + return $.isFunction(obj) ? obj : template; + function template() { + return String(obj); + } + }, + defer: function(fn) { + setTimeout(fn, 0); + }, + debounce: function(func, wait, immediate) { + var timeout, result; + return function() { + var context = this, args = arguments, later, callNow; + later = function() { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + } + }; + callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + } + return result; + }; + }, + throttle: function(func, wait) { + var context, args, timeout, result, previous, later; + previous = 0; + later = function() { + previous = new Date(); + timeout = null; + result = func.apply(context, args); + }; + return function() { + var now = new Date(), remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + } else if (!timeout) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }, + stringify: function(val) { + return _.isString(val) ? val : JSON.stringify(val); + }, + guid: function() { + function _p8(s) { + var p = (Math.random().toString(16) + "000000000").substr(2, 8); + return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; + } + return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); + }, + noop: function() {} + }; + }(); + var WWW = function() { + "use strict"; + var defaultClassNames = { + wrapper: "twitter-typeahead", + input: "tt-input", + hint: "tt-hint", + menu: "tt-menu", + dataset: "tt-dataset", + suggestion: "tt-suggestion", + selectable: "tt-selectable", + empty: "tt-empty", + open: "tt-open", + cursor: "tt-cursor", + highlight: "tt-highlight" + }; + return build; + function build(o) { + var www, classes; + classes = _.mixin({}, defaultClassNames, o); + www = { + css: buildCss(), + classes: classes, + html: buildHtml(classes), + selectors: buildSelectors(classes) + }; + return { + css: www.css, + html: www.html, + classes: www.classes, + selectors: www.selectors, + mixin: function(o) { + _.mixin(o, www); + } + }; + } + function buildHtml(c) { + return { + wrapper: '', + menu: '
' + }; + } + function buildSelectors(classes) { + var selectors = {}; + _.each(classes, function(v, k) { + selectors[k] = "." + v; + }); + return selectors; + } + function buildCss() { + var css = { + wrapper: { + position: "relative", + display: "inline-block" + }, + hint: { + position: "absolute", + top: "0", + left: "0", + borderColor: "transparent", + boxShadow: "none", + opacity: "1" + }, + input: { + position: "relative", + verticalAlign: "top", + backgroundColor: "transparent" + }, + inputWithNoHint: { + position: "relative", + verticalAlign: "top" + }, + menu: { + position: "absolute", + top: "100%", + left: "0", + zIndex: "100", + display: "none" + }, + ltr: { + left: "0", + right: "auto" + }, + rtl: { + left: "auto", + right: " 0" + } + }; + if (_.isMsie()) { + _.mixin(css.input, { + backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" + }); + } + return css; + } + }(); + var EventBus = function() { + "use strict"; + var namespace, deprecationMap; + namespace = "typeahead:"; + deprecationMap = { + render: "rendered", + cursorchange: "cursorchanged", + select: "selected", + autocomplete: "autocompleted" + }; + function EventBus(o) { + if (!o || !o.el) { + $.error("EventBus initialized without el"); + } + this.$el = $(o.el); + } + _.mixin(EventBus.prototype, { + _trigger: function(type, args) { + var $e = $.Event(namespace + type); + this.$el.trigger.call(this.$el, $e, args || []); + return $e; + }, + before: function(type) { + var args, $e; + args = [].slice.call(arguments, 1); + $e = this._trigger("before" + type, args); + return $e.isDefaultPrevented(); + }, + trigger: function(type) { + var deprecatedType; + this._trigger(type, [].slice.call(arguments, 1)); + if (deprecatedType = deprecationMap[type]) { + this._trigger(deprecatedType, [].slice.call(arguments, 1)); + } + } + }); + return EventBus; + }(); + var EventEmitter = function() { + "use strict"; + var splitter = /\s+/, nextTick = getNextTick(); + return { + onSync: onSync, + onAsync: onAsync, + off: off, + trigger: trigger + }; + function on(method, types, cb, context) { + var type; + if (!cb) { + return this; + } + types = types.split(splitter); + cb = context ? bindContext(cb, context) : cb; + this._callbacks = this._callbacks || {}; + while (type = types.shift()) { + this._callbacks[type] = this._callbacks[type] || { + sync: [], + async: [] + }; + this._callbacks[type][method].push(cb); + } + return this; + } + function onAsync(types, cb, context) { + return on.call(this, "async", types, cb, context); + } + function onSync(types, cb, context) { + return on.call(this, "sync", types, cb, context); + } + function off(types) { + var type; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + while (type = types.shift()) { + delete this._callbacks[type]; + } + return this; + } + function trigger(types) { + var type, callbacks, args, syncFlush, asyncFlush; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + args = [].slice.call(arguments, 1); + while ((type = types.shift()) && (callbacks = this._callbacks[type])) { + syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); + asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); + syncFlush() && nextTick(asyncFlush); + } + return this; + } + function getFlush(callbacks, context, args) { + return flush; + function flush() { + var cancelled; + for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { + cancelled = callbacks[i].apply(context, args) === false; + } + return !cancelled; + } + } + function getNextTick() { + var nextTickFn; + if (window.setImmediate) { + nextTickFn = function nextTickSetImmediate(fn) { + setImmediate(function() { + fn(); + }); + }; + } else { + nextTickFn = function nextTickSetTimeout(fn) { + setTimeout(function() { + fn(); + }, 0); + }; + } + return nextTickFn; + } + function bindContext(fn, context) { + return fn.bind ? fn.bind(context) : function() { + fn.apply(context, [].slice.call(arguments, 0)); + }; + } + }(); + var highlight = function(doc) { + "use strict"; + var defaults = { + node: null, + pattern: null, + tagName: "strong", + className: null, + wordsOnly: false, + caseSensitive: false, + diacriticInsensitive: false + }; + var accented = { + A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", + B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", + C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", + D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", + E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", + F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", + G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", + H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", + I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", + J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", + K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", + L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", + M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", + N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", + O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", + P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", + Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", + R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", + S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", + T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", + U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", + V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", + W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", + X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", + Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", + Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" + }; + return function hightlight(o) { + var regex; + o = _.mixin({}, defaults, o); + if (!o.node || !o.pattern) { + return; + } + o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; + regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); + traverse(o.node, hightlightTextNode); + function hightlightTextNode(textNode) { + var match, patternNode, wrapperNode; + if (match = regex.exec(textNode.data)) { + wrapperNode = doc.createElement(o.tagName); + o.className && (wrapperNode.className = o.className); + patternNode = textNode.splitText(match.index); + patternNode.splitText(match[0].length); + wrapperNode.appendChild(patternNode.cloneNode(true)); + textNode.parentNode.replaceChild(wrapperNode, patternNode); + } + return !!match; + } + function traverse(el, hightlightTextNode) { + var childNode, TEXT_NODE_TYPE = 3; + for (var i = 0; i < el.childNodes.length; i++) { + childNode = el.childNodes[i]; + if (childNode.nodeType === TEXT_NODE_TYPE) { + i += hightlightTextNode(childNode) ? 1 : 0; + } else { + traverse(childNode, hightlightTextNode); + } + } + } + }; + function accent_replacer(chr) { + return accented[chr.toUpperCase()] || chr; + } + function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { + var escapedPatterns = [], regexStr; + for (var i = 0, len = patterns.length; i < len; i++) { + var escapedWord = _.escapeRegExChars(patterns[i]); + if (diacriticInsensitive) { + escapedWord = escapedWord.replace(/\S/g, accent_replacer); + } + escapedPatterns.push(escapedWord); + } + regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; + return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); + } + }(window.document); + var Input = function() { + "use strict"; + var specialKeyCodeMap; + specialKeyCodeMap = { + 9: "tab", + 27: "esc", + 37: "left", + 39: "right", + 13: "enter", + 38: "up", + 40: "down" + }; + function Input(o, www) { + var id; + o = o || {}; + if (!o.input) { + $.error("input is missing"); + } + www.mixin(this); + this.$hint = $(o.hint); + this.$input = $(o.input); + this.$menu = $(o.menu); + id = this.$input.attr("id") || _.guid(); + this.$menu.attr("id", id + "_listbox"); + this.$hint.attr({ + "aria-hidden": true + }); + this.$input.attr({ + "aria-owns": id + "_listbox", + role: "combobox", + "aria-autocomplete": "list", + "aria-expanded": false + }); + this.query = this.$input.val(); + this.queryWhenFocused = this.hasFocus() ? this.query : null; + this.$overflowHelper = buildOverflowHelper(this.$input); + this._checkLanguageDirection(); + if (this.$hint.length === 0) { + this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; + } + this.onSync("cursorchange", this._updateDescendent); + } + Input.normalizeQuery = function(str) { + return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); + }; + _.mixin(Input.prototype, EventEmitter, { + _onBlur: function onBlur() { + this.resetInputValue(); + this.trigger("blurred"); + }, + _onFocus: function onFocus() { + this.queryWhenFocused = this.query; + this.trigger("focused"); + }, + _onKeydown: function onKeydown($e) { + var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; + this._managePreventDefault(keyName, $e); + if (keyName && this._shouldTrigger(keyName, $e)) { + this.trigger(keyName + "Keyed", $e); + } + }, + _onInput: function onInput() { + this._setQuery(this.getInputValue()); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + _managePreventDefault: function managePreventDefault(keyName, $e) { + var preventDefault; + switch (keyName) { + case "up": + case "down": + preventDefault = !withModifier($e); + break; + + default: + preventDefault = false; + } + preventDefault && $e.preventDefault(); + }, + _shouldTrigger: function shouldTrigger(keyName, $e) { + var trigger; + switch (keyName) { + case "tab": + trigger = !withModifier($e); + break; + + default: + trigger = true; + } + return trigger; + }, + _checkLanguageDirection: function checkLanguageDirection() { + var dir = (this.$input.css("direction") || "ltr").toLowerCase(); + if (this.dir !== dir) { + this.dir = dir; + this.$hint.attr("dir", dir); + this.trigger("langDirChanged", dir); + } + }, + _setQuery: function setQuery(val, silent) { + var areEquivalent, hasDifferentWhitespace; + areEquivalent = areQueriesEquivalent(val, this.query); + hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; + this.query = val; + if (!silent && !areEquivalent) { + this.trigger("queryChanged", this.query); + } else if (!silent && hasDifferentWhitespace) { + this.trigger("whitespaceChanged", this.query); + } + }, + _updateDescendent: function updateDescendent(event, id) { + this.$input.attr("aria-activedescendant", id); + }, + bind: function() { + var that = this, onBlur, onFocus, onKeydown, onInput; + onBlur = _.bind(this._onBlur, this); + onFocus = _.bind(this._onFocus, this); + onKeydown = _.bind(this._onKeydown, this); + onInput = _.bind(this._onInput, this); + this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); + if (!_.isMsie() || _.isMsie() > 9) { + this.$input.on("input.tt", onInput); + } else { + this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { + if (specialKeyCodeMap[$e.which || $e.keyCode]) { + return; + } + _.defer(_.bind(that._onInput, that, $e)); + }); + } + return this; + }, + focus: function focus() { + this.$input.focus(); + }, + blur: function blur() { + this.$input.blur(); + }, + getLangDir: function getLangDir() { + return this.dir; + }, + getQuery: function getQuery() { + return this.query || ""; + }, + setQuery: function setQuery(val, silent) { + this.setInputValue(val); + this._setQuery(val, silent); + }, + hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { + return this.query !== this.queryWhenFocused; + }, + getInputValue: function getInputValue() { + return this.$input.val(); + }, + setInputValue: function setInputValue(value) { + this.$input.val(value); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + resetInputValue: function resetInputValue() { + this.setInputValue(this.query); + }, + getHint: function getHint() { + return this.$hint.val(); + }, + setHint: function setHint(value) { + this.$hint.val(value); + }, + clearHint: function clearHint() { + this.setHint(""); + }, + clearHintIfInvalid: function clearHintIfInvalid() { + var val, hint, valIsPrefixOfHint, isValid; + val = this.getInputValue(); + hint = this.getHint(); + valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; + isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); + !isValid && this.clearHint(); + }, + hasFocus: function hasFocus() { + return this.$input.is(":focus"); + }, + hasOverflow: function hasOverflow() { + var constraint = this.$input.width() - 2; + this.$overflowHelper.text(this.getInputValue()); + return this.$overflowHelper.width() >= constraint; + }, + isCursorAtEnd: function() { + var valueLength, selectionStart, range; + valueLength = this.$input.val().length; + selectionStart = this.$input[0].selectionStart; + if (_.isNumber(selectionStart)) { + return selectionStart === valueLength; + } else if (document.selection) { + range = document.selection.createRange(); + range.moveStart("character", -valueLength); + return valueLength === range.text.length; + } + return true; + }, + destroy: function destroy() { + this.$hint.off(".tt"); + this.$input.off(".tt"); + this.$overflowHelper.remove(); + this.$hint = this.$input = this.$overflowHelper = $("
"); + }, + setAriaExpanded: function setAriaExpanded(value) { + this.$input.attr("aria-expanded", value); + } + }); + return Input; + function buildOverflowHelper($input) { + return $('').css({ + position: "absolute", + visibility: "hidden", + whiteSpace: "pre", + fontFamily: $input.css("font-family"), + fontSize: $input.css("font-size"), + fontStyle: $input.css("font-style"), + fontVariant: $input.css("font-variant"), + fontWeight: $input.css("font-weight"), + wordSpacing: $input.css("word-spacing"), + letterSpacing: $input.css("letter-spacing"), + textIndent: $input.css("text-indent"), + textRendering: $input.css("text-rendering"), + textTransform: $input.css("text-transform") + }).insertAfter($input); + } + function areQueriesEquivalent(a, b) { + return Input.normalizeQuery(a) === Input.normalizeQuery(b); + } + function withModifier($e) { + return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; + } + }(); + var Dataset = function() { + "use strict"; + var keys, nameGenerator; + keys = { + dataset: "tt-selectable-dataset", + val: "tt-selectable-display", + obj: "tt-selectable-object" + }; + nameGenerator = _.getIdGenerator(); + function Dataset(o, www) { + o = o || {}; + o.templates = o.templates || {}; + o.templates.notFound = o.templates.notFound || o.templates.empty; + if (!o.source) { + $.error("missing source"); + } + if (!o.node) { + $.error("missing node"); + } + if (o.name && !isValidName(o.name)) { + $.error("invalid dataset name: " + o.name); + } + www.mixin(this); + this.highlight = !!o.highlight; + this.name = _.toStr(o.name || nameGenerator()); + this.limit = o.limit || 5; + this.displayFn = getDisplayFn(o.display || o.displayKey); + this.templates = getTemplates(o.templates, this.displayFn); + this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; + this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; + this._resetLastSuggestion(); + this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); + } + Dataset.extractData = function extractData(el) { + var $el = $(el); + if ($el.data(keys.obj)) { + return { + dataset: $el.data(keys.dataset) || "", + val: $el.data(keys.val) || "", + obj: $el.data(keys.obj) || null + }; + } + return null; + }; + _.mixin(Dataset.prototype, EventEmitter, { + _overwrite: function overwrite(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (this.async && this.templates.pending) { + this._renderPending(query); + } else if (!this.async && this.templates.notFound) { + this._renderNotFound(query); + } else { + this._empty(); + } + this.trigger("rendered", suggestions, false, this.name); + }, + _append: function append(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length && this.$lastSuggestion.length) { + this._appendSuggestions(query, suggestions); + } else if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (!this.$lastSuggestion.length && this.templates.notFound) { + this._renderNotFound(query); + } + this.trigger("rendered", suggestions, true, this.name); + }, + _renderSuggestions: function renderSuggestions(query, suggestions) { + var $fragment; + $fragment = this._getSuggestionsFragment(query, suggestions); + this.$lastSuggestion = $fragment.children().last(); + this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); + }, + _appendSuggestions: function appendSuggestions(query, suggestions) { + var $fragment, $lastSuggestion; + $fragment = this._getSuggestionsFragment(query, suggestions); + $lastSuggestion = $fragment.children().last(); + this.$lastSuggestion.after($fragment); + this.$lastSuggestion = $lastSuggestion; + }, + _renderPending: function renderPending(query) { + var template = this.templates.pending; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _renderNotFound: function renderNotFound(query) { + var template = this.templates.notFound; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _empty: function empty() { + this.$el.empty(); + this._resetLastSuggestion(); + }, + _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { + var that = this, fragment; + fragment = document.createDocumentFragment(); + _.each(suggestions, function getSuggestionNode(suggestion) { + var $el, context; + context = that._injectQuery(query, suggestion); + $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); + fragment.appendChild($el[0]); + }); + this.highlight && highlight({ + className: this.classes.highlight, + node: fragment, + pattern: query + }); + return $(fragment); + }, + _getFooter: function getFooter(query, suggestions) { + return this.templates.footer ? this.templates.footer({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _getHeader: function getHeader(query, suggestions) { + return this.templates.header ? this.templates.header({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _resetLastSuggestion: function resetLastSuggestion() { + this.$lastSuggestion = $(); + }, + _injectQuery: function injectQuery(query, obj) { + return _.isObject(obj) ? _.mixin({ + _query: query + }, obj) : obj; + }, + update: function update(query) { + var that = this, canceled = false, syncCalled = false, rendered = 0; + this.cancel(); + this.cancel = function cancel() { + canceled = true; + that.cancel = $.noop; + that.async && that.trigger("asyncCanceled", query, that.name); + }; + this.source(query, sync, async); + !syncCalled && sync([]); + function sync(suggestions) { + if (syncCalled) { + return; + } + syncCalled = true; + suggestions = (suggestions || []).slice(0, that.limit); + rendered = suggestions.length; + that._overwrite(query, suggestions); + if (rendered < that.limit && that.async) { + that.trigger("asyncRequested", query, that.name); + } + } + function async(suggestions) { + suggestions = suggestions || []; + if (!canceled && rendered < that.limit) { + that.cancel = $.noop; + var idx = Math.abs(rendered - that.limit); + rendered += idx; + that._append(query, suggestions.slice(0, idx)); + that.async && that.trigger("asyncReceived", query, that.name); + } + } + }, + cancel: $.noop, + clear: function clear() { + this._empty(); + this.cancel(); + this.trigger("cleared"); + }, + isEmpty: function isEmpty() { + return this.$el.is(":empty"); + }, + destroy: function destroy() { + this.$el = $("
"); + } + }); + return Dataset; + function getDisplayFn(display) { + display = display || _.stringify; + return _.isFunction(display) ? display : displayFn; + function displayFn(obj) { + return obj[display]; + } + } + function getTemplates(templates, displayFn) { + return { + notFound: templates.notFound && _.templatify(templates.notFound), + pending: templates.pending && _.templatify(templates.pending), + header: templates.header && _.templatify(templates.header), + footer: templates.footer && _.templatify(templates.footer), + suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate + }; + function userSuggestionTemplate(context) { + var template = templates.suggestion; + return $(template(context)).attr("id", _.guid()); + } + function suggestionTemplate(context) { + return $('
').attr("id", _.guid()).text(displayFn(context)); + } + } + function isValidName(str) { + return /^[_a-zA-Z0-9-]+$/.test(str); + } + }(); + var Menu = function() { + "use strict"; + function Menu(o, www) { + var that = this; + o = o || {}; + if (!o.node) { + $.error("node is required"); + } + www.mixin(this); + this.$node = $(o.node); + this.query = null; + this.datasets = _.map(o.datasets, initializeDataset); + function initializeDataset(oDataset) { + var node = that.$node.find(oDataset.node).first(); + oDataset.node = node.length ? node : $("
").appendTo(that.$node); + return new Dataset(oDataset, www); + } + } + _.mixin(Menu.prototype, EventEmitter, { + _onSelectableClick: function onSelectableClick($e) { + this.trigger("selectableClicked", $($e.currentTarget)); + }, + _onRendered: function onRendered(type, dataset, suggestions, async) { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetRendered", dataset, suggestions, async); + }, + _onCleared: function onCleared() { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetCleared"); + }, + _propagate: function propagate() { + this.trigger.apply(this, arguments); + }, + _allDatasetsEmpty: function allDatasetsEmpty() { + return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { + var isEmpty = dataset.isEmpty(); + this.$node.attr("aria-expanded", !isEmpty); + return isEmpty; + }, this)); + }, + _getSelectables: function getSelectables() { + return this.$node.find(this.selectors.selectable); + }, + _removeCursor: function _removeCursor() { + var $selectable = this.getActiveSelectable(); + $selectable && $selectable.removeClass(this.classes.cursor); + }, + _ensureVisible: function ensureVisible($el) { + var elTop, elBottom, nodeScrollTop, nodeHeight; + elTop = $el.position().top; + elBottom = elTop + $el.outerHeight(true); + nodeScrollTop = this.$node.scrollTop(); + nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); + if (elTop < 0) { + this.$node.scrollTop(nodeScrollTop + elTop); + } else if (nodeHeight < elBottom) { + this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); + } + }, + bind: function() { + var that = this, onSelectableClick; + onSelectableClick = _.bind(this._onSelectableClick, this); + this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); + this.$node.on("mouseover", this.selectors.selectable, function() { + that.setCursor($(this)); + }); + this.$node.on("mouseleave", function() { + that._removeCursor(); + }); + _.each(this.datasets, function(dataset) { + dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); + }); + return this; + }, + isOpen: function isOpen() { + return this.$node.hasClass(this.classes.open); + }, + open: function open() { + this.$node.scrollTop(0); + this.$node.addClass(this.classes.open); + }, + close: function close() { + this.$node.attr("aria-expanded", false); + this.$node.removeClass(this.classes.open); + this._removeCursor(); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.attr("dir", dir); + }, + selectableRelativeToCursor: function selectableRelativeToCursor(delta) { + var $selectables, $oldCursor, oldIndex, newIndex; + $oldCursor = this.getActiveSelectable(); + $selectables = this._getSelectables(); + oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; + newIndex = oldIndex + delta; + newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; + newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; + return newIndex === -1 ? null : $selectables.eq(newIndex); + }, + setCursor: function setCursor($selectable) { + this._removeCursor(); + if ($selectable = $selectable && $selectable.first()) { + $selectable.addClass(this.classes.cursor); + this._ensureVisible($selectable); + } + }, + getSelectableData: function getSelectableData($el) { + return $el && $el.length ? Dataset.extractData($el) : null; + }, + getActiveSelectable: function getActiveSelectable() { + var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); + return $selectable.length ? $selectable : null; + }, + getTopSelectable: function getTopSelectable() { + var $selectable = this._getSelectables().first(); + return $selectable.length ? $selectable : null; + }, + update: function update(query) { + var isValidUpdate = query !== this.query; + if (isValidUpdate) { + this.query = query; + _.each(this.datasets, updateDataset); + } + return isValidUpdate; + function updateDataset(dataset) { + dataset.update(query); + } + }, + empty: function empty() { + _.each(this.datasets, clearDataset); + this.query = null; + this.$node.addClass(this.classes.empty); + function clearDataset(dataset) { + dataset.clear(); + } + }, + destroy: function destroy() { + this.$node.off(".tt"); + this.$node = $("
"); + _.each(this.datasets, destroyDataset); + function destroyDataset(dataset) { + dataset.destroy(); + } + } + }); + return Menu; + }(); + var Status = function() { + "use strict"; + function Status(options) { + this.$el = $("", { + role: "status", + "aria-live": "polite" + }).css({ + position: "absolute", + padding: "0", + border: "0", + height: "1px", + width: "1px", + "margin-bottom": "-1px", + "margin-right": "-1px", + overflow: "hidden", + clip: "rect(0 0 0 0)", + "white-space": "nowrap" + }); + options.$input.after(this.$el); + _.each(options.menu.datasets, _.bind(function(dataset) { + if (dataset.onSync) { + dataset.onSync("rendered", _.bind(this.update, this)); + dataset.onSync("cleared", _.bind(this.cleared, this)); + } + }, this)); + } + _.mixin(Status.prototype, { + update: function update(event, suggestions) { + var length = suggestions.length; + var words; + if (length === 1) { + words = { + result: "result", + is: "is" + }; + } else { + words = { + result: "results", + is: "are" + }; + } + this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); + }, + cleared: function() { + this.$el.text(""); + } + }); + return Status; + }(); + var DefaultMenu = function() { + "use strict"; + var s = Menu.prototype; + function DefaultMenu() { + Menu.apply(this, [].slice.call(arguments, 0)); + } + _.mixin(DefaultMenu.prototype, Menu.prototype, { + open: function open() { + !this._allDatasetsEmpty() && this._show(); + return s.open.apply(this, [].slice.call(arguments, 0)); + }, + close: function close() { + this._hide(); + return s.close.apply(this, [].slice.call(arguments, 0)); + }, + _onRendered: function onRendered() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onRendered.apply(this, [].slice.call(arguments, 0)); + }, + _onCleared: function onCleared() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onCleared.apply(this, [].slice.call(arguments, 0)); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); + return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); + }, + _hide: function hide() { + this.$node.hide(); + }, + _show: function show() { + this.$node.css("display", "block"); + } + }); + return DefaultMenu; + }(); + var Typeahead = function() { + "use strict"; + function Typeahead(o, www) { + var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; + o = o || {}; + if (!o.input) { + $.error("missing input"); + } + if (!o.menu) { + $.error("missing menu"); + } + if (!o.eventBus) { + $.error("missing event bus"); + } + www.mixin(this); + this.eventBus = o.eventBus; + this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; + this.input = o.input; + this.menu = o.menu; + this.enabled = true; + this.autoselect = !!o.autoselect; + this.active = false; + this.input.hasFocus() && this.activate(); + this.dir = this.input.getLangDir(); + this._hacks(); + this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); + onFocused = c(this, "activate", "open", "_onFocused"); + onBlurred = c(this, "deactivate", "_onBlurred"); + onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); + onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); + onEscKeyed = c(this, "isActive", "_onEscKeyed"); + onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); + onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); + onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); + onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); + onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); + onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); + this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); + } + _.mixin(Typeahead.prototype, { + _hacks: function hacks() { + var $input, $menu; + $input = this.input.$input || $("
"); + $menu = this.menu.$node || $("
"); + $input.on("blur.tt", function($e) { + var active, isActive, hasActive; + active = document.activeElement; + isActive = $menu.is(active); + hasActive = $menu.has(active).length > 0; + if (_.isMsie() && (isActive || hasActive)) { + $e.preventDefault(); + $e.stopImmediatePropagation(); + _.defer(function() { + $input.focus(); + }); + } + }); + $menu.on("mousedown.tt", function($e) { + $e.preventDefault(); + }); + }, + _onSelectableClicked: function onSelectableClicked(type, $el) { + this.select($el); + }, + _onDatasetCleared: function onDatasetCleared() { + this._updateHint(); + }, + _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { + this._updateHint(); + if (this.autoselect) { + var cursorClass = this.selectors.cursor.substr(1); + this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); + } + this.eventBus.trigger("render", suggestions, async, dataset); + }, + _onAsyncRequested: function onAsyncRequested(type, dataset, query) { + this.eventBus.trigger("asyncrequest", query, dataset); + }, + _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { + this.eventBus.trigger("asynccancel", query, dataset); + }, + _onAsyncReceived: function onAsyncReceived(type, dataset, query) { + this.eventBus.trigger("asyncreceive", query, dataset); + }, + _onFocused: function onFocused() { + this._minLengthMet() && this.menu.update(this.input.getQuery()); + }, + _onBlurred: function onBlurred() { + if (this.input.hasQueryChangedSinceLastFocus()) { + this.eventBus.trigger("change", this.input.getQuery()); + } + }, + _onEnterKeyed: function onEnterKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + if (this.select($selectable)) { + $e.preventDefault(); + $e.stopPropagation(); + } + } else if (this.autoselect) { + if (this.select(this.menu.getTopSelectable())) { + $e.preventDefault(); + $e.stopPropagation(); + } + } + }, + _onTabKeyed: function onTabKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + this.select($selectable) && $e.preventDefault(); + } else if (this.autoselect) { + if ($selectable = this.menu.getTopSelectable()) { + this.autocomplete($selectable) && $e.preventDefault(); + } + } + }, + _onEscKeyed: function onEscKeyed() { + this.close(); + }, + _onUpKeyed: function onUpKeyed() { + this.moveCursor(-1); + }, + _onDownKeyed: function onDownKeyed() { + this.moveCursor(+1); + }, + _onLeftKeyed: function onLeftKeyed() { + if (this.dir === "rtl" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onRightKeyed: function onRightKeyed() { + if (this.dir === "ltr" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onQueryChanged: function onQueryChanged(e, query) { + this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); + }, + _onWhitespaceChanged: function onWhitespaceChanged() { + this._updateHint(); + }, + _onLangDirChanged: function onLangDirChanged(e, dir) { + if (this.dir !== dir) { + this.dir = dir; + this.menu.setLanguageDirection(dir); + } + }, + _openIfActive: function openIfActive() { + this.isActive() && this.open(); + }, + _minLengthMet: function minLengthMet(query) { + query = _.isString(query) ? query : this.input.getQuery() || ""; + return query.length >= this.minLength; + }, + _updateHint: function updateHint() { + var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; + $selectable = this.menu.getTopSelectable(); + data = this.menu.getSelectableData($selectable); + val = this.input.getInputValue(); + if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { + query = Input.normalizeQuery(val); + escapedQuery = _.escapeRegExChars(query); + frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); + match = frontMatchRegEx.exec(data.val); + match && this.input.setHint(val + match[1]); + } else { + this.input.clearHint(); + } + }, + isEnabled: function isEnabled() { + return this.enabled; + }, + enable: function enable() { + this.enabled = true; + }, + disable: function disable() { + this.enabled = false; + }, + isActive: function isActive() { + return this.active; + }, + activate: function activate() { + if (this.isActive()) { + return true; + } else if (!this.isEnabled() || this.eventBus.before("active")) { + return false; + } else { + this.active = true; + this.eventBus.trigger("active"); + return true; + } + }, + deactivate: function deactivate() { + if (!this.isActive()) { + return true; + } else if (this.eventBus.before("idle")) { + return false; + } else { + this.active = false; + this.close(); + this.eventBus.trigger("idle"); + return true; + } + }, + isOpen: function isOpen() { + return this.menu.isOpen(); + }, + open: function open() { + if (!this.isOpen() && !this.eventBus.before("open")) { + this.input.setAriaExpanded(true); + this.menu.open(); + this._updateHint(); + this.eventBus.trigger("open"); + } + return this.isOpen(); + }, + close: function close() { + if (this.isOpen() && !this.eventBus.before("close")) { + this.input.setAriaExpanded(false); + this.menu.close(); + this.input.clearHint(); + this.input.resetInputValue(); + this.eventBus.trigger("close"); + } + return !this.isOpen(); + }, + setVal: function setVal(val) { + this.input.setQuery(_.toStr(val)); + }, + getVal: function getVal() { + return this.input.getQuery(); + }, + select: function select($selectable) { + var data = this.menu.getSelectableData($selectable); + if (data && !this.eventBus.before("select", data.obj, data.dataset)) { + this.input.setQuery(data.val, true); + this.eventBus.trigger("select", data.obj, data.dataset); + this.close(); + return true; + } + return false; + }, + autocomplete: function autocomplete($selectable) { + var query, data, isValid; + query = this.input.getQuery(); + data = this.menu.getSelectableData($selectable); + isValid = data && query !== data.val; + if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { + this.input.setQuery(data.val); + this.eventBus.trigger("autocomplete", data.obj, data.dataset); + return true; + } + return false; + }, + moveCursor: function moveCursor(delta) { + var query, $candidate, data, suggestion, datasetName, cancelMove, id; + query = this.input.getQuery(); + $candidate = this.menu.selectableRelativeToCursor(delta); + data = this.menu.getSelectableData($candidate); + suggestion = data ? data.obj : null; + datasetName = data ? data.dataset : null; + id = $candidate ? $candidate.attr("id") : null; + this.input.trigger("cursorchange", id); + cancelMove = this._minLengthMet() && this.menu.update(query); + if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { + this.menu.setCursor($candidate); + if (data) { + if (typeof data.val === "string") { + this.input.setInputValue(data.val); + } + } else { + this.input.resetInputValue(); + this._updateHint(); + } + this.eventBus.trigger("cursorchange", suggestion, datasetName); + return true; + } + return false; + }, + destroy: function destroy() { + this.input.destroy(); + this.menu.destroy(); + } + }); + return Typeahead; + function c(ctx) { + var methods = [].slice.call(arguments, 1); + return function() { + var args = [].slice.call(arguments); + _.each(methods, function(method) { + return ctx[method].apply(ctx, args); + }); + }; + } + }(); + (function() { + "use strict"; + var old, keys, methods; + old = $.fn.typeahead; + keys = { + www: "tt-www", + attrs: "tt-attrs", + typeahead: "tt-typeahead" + }; + methods = { + initialize: function initialize(o, datasets) { + var www; + datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); + o = o || {}; + www = WWW(o.classNames); + return this.each(attach); + function attach() { + var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; + _.each(datasets, function(d) { + d.highlight = !!o.highlight; + }); + $input = $(this); + $wrapper = $(www.html.wrapper); + $hint = $elOrNull(o.hint); + $menu = $elOrNull(o.menu); + defaultHint = o.hint !== false && !$hint; + defaultMenu = o.menu !== false && !$menu; + defaultHint && ($hint = buildHintFromInput($input, www)); + defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); + $hint && $hint.val(""); + $input = prepInput($input, www); + if (defaultHint || defaultMenu) { + $wrapper.css(www.css.wrapper); + $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); + $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); + } + MenuConstructor = defaultMenu ? DefaultMenu : Menu; + eventBus = new EventBus({ + el: $input + }); + input = new Input({ + hint: $hint, + input: $input, + menu: $menu + }, www); + menu = new MenuConstructor({ + node: $menu, + datasets: datasets + }, www); + status = new Status({ + $input: $input, + menu: menu + }); + typeahead = new Typeahead({ + input: input, + menu: menu, + eventBus: eventBus, + minLength: o.minLength, + autoselect: o.autoselect + }, www); + $input.data(keys.www, www); + $input.data(keys.typeahead, typeahead); + } + }, + isEnabled: function isEnabled() { + var enabled; + ttEach(this.first(), function(t) { + enabled = t.isEnabled(); + }); + return enabled; + }, + enable: function enable() { + ttEach(this, function(t) { + t.enable(); + }); + return this; + }, + disable: function disable() { + ttEach(this, function(t) { + t.disable(); + }); + return this; + }, + isActive: function isActive() { + var active; + ttEach(this.first(), function(t) { + active = t.isActive(); + }); + return active; + }, + activate: function activate() { + ttEach(this, function(t) { + t.activate(); + }); + return this; + }, + deactivate: function deactivate() { + ttEach(this, function(t) { + t.deactivate(); + }); + return this; + }, + isOpen: function isOpen() { + var open; + ttEach(this.first(), function(t) { + open = t.isOpen(); + }); + return open; + }, + open: function open() { + ttEach(this, function(t) { + t.open(); + }); + return this; + }, + close: function close() { + ttEach(this, function(t) { + t.close(); + }); + return this; + }, + select: function select(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.select($el); + }); + return success; + }, + autocomplete: function autocomplete(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.autocomplete($el); + }); + return success; + }, + moveCursor: function moveCursoe(delta) { + var success = false; + ttEach(this.first(), function(t) { + success = t.moveCursor(delta); + }); + return success; + }, + val: function val(newVal) { + var query; + if (!arguments.length) { + ttEach(this.first(), function(t) { + query = t.getVal(); + }); + return query; + } else { + ttEach(this, function(t) { + t.setVal(_.toStr(newVal)); + }); + return this; + } + }, + destroy: function destroy() { + ttEach(this, function(typeahead, $input) { + revert($input); + typeahead.destroy(); + }); + return this; + } + }; + $.fn.typeahead = function(method) { + if (methods[method]) { + return methods[method].apply(this, [].slice.call(arguments, 1)); + } else { + return methods.initialize.apply(this, arguments); + } + }; + $.fn.typeahead.noConflict = function noConflict() { + $.fn.typeahead = old; + return this; + }; + function ttEach($els, fn) { + $els.each(function() { + var $input = $(this), typeahead; + (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); + }); + } + function buildHintFromInput($input, www) { + return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ + readonly: true, + required: false + }).removeAttr("id name placeholder").removeClass("required").attr({ + spellcheck: "false", + tabindex: -1 + }); + } + function prepInput($input, www) { + $input.data(keys.attrs, { + dir: $input.attr("dir"), + autocomplete: $input.attr("autocomplete"), + spellcheck: $input.attr("spellcheck"), + style: $input.attr("style") + }); + $input.addClass(www.classes.input).attr({ + spellcheck: false + }); + try { + !$input.attr("dir") && $input.attr("dir", "auto"); + } catch (e) {} + return $input; + } + function getBackgroundStyles($el) { + return { + backgroundAttachment: $el.css("background-attachment"), + backgroundClip: $el.css("background-clip"), + backgroundColor: $el.css("background-color"), + backgroundImage: $el.css("background-image"), + backgroundOrigin: $el.css("background-origin"), + backgroundPosition: $el.css("background-position"), + backgroundRepeat: $el.css("background-repeat"), + backgroundSize: $el.css("background-size") + }; + } + function revert($input) { + var www, $wrapper; + www = $input.data(keys.www); + $wrapper = $input.parent().filter(www.selectors.wrapper); + _.each($input.data(keys.attrs), function(val, key) { + _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); + }); + $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); + if ($wrapper.length) { + $input.detach().insertAfter($wrapper); + $wrapper.remove(); + } + } + function $elOrNull(obj) { + var isValid, $el; + isValid = _.isJQuery(obj) || _.isElement(obj); + $el = isValid ? $(obj).first() : []; + return $el.length ? $el : null; + } + })(); +}); \ No newline at end of file diff --git a/docs/docsets/Nimble.docset/Contents/Resources/Documents/search.json b/docs/docsets/Nimble.docset/Contents/Resources/Documents/search.json new file mode 100644 index 000000000..de8112a41 --- /dev/null +++ b/docs/docsets/Nimble.docset/Contents/Resources/Documents/search.json @@ -0,0 +1 @@ +{"Typealiases.html#/s:6Nimble14PredicateBlocka":{"name":"PredicateBlock","abstract":"

Undocumented

"},"Typealiases.html#/FileString":{"name":"FileString"},"Typealiases.html#/s:6Nimble10FileStringa":{"name":"FileString","abstract":"

Undocumented

"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV6statusAA0B6StatusOvp":{"name":"status","abstract":"

Status indicates if the predicate matches, does not match, or fails.

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV7messageAA18ExpectationMessageOvp":{"name":"message","abstract":"

The error message that can be displayed if it does not match

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV6status7messageAcA0B6StatusO_AA18ExpectationMessageOtcfc":{"name":"init(status:message:)","abstract":"

Constructs a new PredicateResult with a given status and error message

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV4bool7messageACSb_AA18ExpectationMessageOtcfc":{"name":"init(bool:message:)","abstract":"

Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message)

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV9toBoolean11expectationSbAA16ExpectationStyleO_tF":{"name":"toBoolean(expectation:)","abstract":"

Converts the result to a boolean based on what the expectation intended

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV12toObjectiveCAA012NMBPredicateC0CyF":{"name":"toObjectiveC()","abstract":"

Undocumented

","parent_name":"PredicateResult"},"Structs/Predicate.html#/s:6Nimble9PredicateVyACyxGAA0B6ResultVAA10ExpressionVyxGKccfc":{"name":"init(_:)","abstract":"

Constructs a predicate that knows how take a given value

","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV9satisfiesyAA0B6ResultVAA10ExpressionVyxGKF":{"name":"satisfies(_:)","abstract":"

Uses a predicate on a given value to see if it passes the predicate.

","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV6define7matcherACyxGAA0B6ResultVAA10ExpressionVyxGKc_tFZ":{"name":"define(matcher:)","abstract":"

Like Predicate() constructor, but automatically guard against nil (actual) values

","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV6define_7matcherACyxGSS_AA0B6ResultVAA10ExpressionVyxG_AA18ExpectationMessageOtKctFZ":{"name":"define(_:matcher:)","abstract":"

Defines a predicate with a default message that can be returned in the closure","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV13defineNilable_7matcherACyxGSS_AA0B6ResultVAA10ExpressionVyxG_AA18ExpectationMessageOtKctFZ":{"name":"defineNilable(_:matcher:)","abstract":"

Defines a predicate with a default message that can be returned in the closure","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV6simple_7matcherACyxGSS_AA0B6StatusOAA10ExpressionVyxGKctFZ":{"name":"simple(_:matcher:)","abstract":"

Provides a simple predicate definition that provides no control over the predefined","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV13simpleNilable_7matcherACyxGSS_AA0B6StatusOAA10ExpressionVyxGKctFZ":{"name":"simpleNilable(_:matcher:)","abstract":"

Provides a simple predicate definition that provides no control over the predefined","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV13requireNonNilACyxGvp":{"name":"requireNonNil","abstract":"

Returns a new Predicate based on the current one that always fails if nil is given as","parent_name":"Predicate"},"Structs/AsyncDefaults.html#/s:6Nimble13AsyncDefaultsV7timeout8Dispatch0E12TimeIntervalOvpZ":{"name":"timeout","abstract":"

Undocumented

","parent_name":"AsyncDefaults"},"Structs/AsyncDefaults.html#/s:6Nimble13AsyncDefaultsV12pollInterval8Dispatch0f4TimeE0OvpZ":{"name":"pollInterval","abstract":"

Undocumented

","parent_name":"AsyncDefaults"},"Structs/Expression.html#/s:6Nimble10ExpressionV8locationAA14SourceLocationCvp":{"name":"location","abstract":"

Undocumented

","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV9isClosureSbvp":{"name":"isClosure","abstract":"

Undocumented

","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV10expression8location9isClosureACyxGxSgyKc_AA14SourceLocationCSbtcfc":{"name":"init(expression:location:isClosure:)","abstract":"

Creates a new expression struct. Normally, expect(…) will manage this","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV08memoizedB08location14withoutCaching9isClosureACyxGxSgSbKc_AA14SourceLocationCS2btcfc":{"name":"init(memoizedExpression:location:withoutCaching:isClosure:)","abstract":"

Creates a new expression struct. Normally, expect(…) will manage this","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV4castyACyqd__Gqd__SgxSgKclF":{"name":"cast(_:)","abstract":"

Returns a new Expression from the given expression. Identical to a map()","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV8evaluatexSgyKF":{"name":"evaluate()","abstract":"

Undocumented

","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV14withoutCachingACyxGyF":{"name":"withoutCaching()","abstract":"

Undocumented

","parent_name":"Expression"},"Structs/Expectation/Nil.html#/s:s23ExpressibleByNilLiteralP03nilD0xyt_tcfc":{"name":"init(nilLiteral:)","parent_name":"Nil"},"Structs/Expectation.html#/s:6Nimble11ExpectationV10expressionAA10ExpressionVyxGvp":{"name":"expression","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV10expressionACyxGAA10ExpressionVyxG_tcfc":{"name":"init(expression:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV6verifyyySb_AA14FailureMessageCtF":{"name":"verify(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV2to_11descriptionACyxGAA9PredicateVyxG_SSSgtF":{"name":"to(_:description:)","abstract":"

Tests the actual value using a matcher to match.

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV5toNot_11descriptionACyxGAA9PredicateVyxG_SSSgtF":{"name":"toNot(_:description:)","abstract":"

Tests the actual value using a matcher to not match.

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV5notTo_11descriptionACyxGAA9PredicateVyxG_SSSgtF":{"name":"notTo(_:description:)","abstract":"

Tests the actual value using a matcher to not match.

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV12toEventually_7timeout12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"toEventually(_:timeout:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to match by checking continuously","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV15toEventuallyNot_7timeout12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0k4TimeH0OAMSSSgtF":{"name":"toEventuallyNot(_:timeout:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to not match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV15toNotEventually_7timeout12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0k4TimeH0OAMSSSgtF":{"name":"toNotEventually(_:timeout:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to not match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV7toNever_5until12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"toNever(_:until:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to never match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV7neverTo_5until12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"neverTo(_:until:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to never match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV8toAlways_5until12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"toAlways(_:until:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to always match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV8alwaysTo_5until12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"alwaysTo(_:until:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to always match by checking","parent_name":"Expectation"},"Structs/Expectation/Nil.html":{"name":"Nil","abstract":"

Represents nil value to be used with the operator overloads for beNil.

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV2eeoiyyACyxG_AC3NilVyx_GtFZ":{"name":"==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV2neoiyyACyxG_AC3NilVyx_GtFZ":{"name":"!=(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAASlRzSF7ElementRpzlE003dchoiyyACyxG_xtFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAASFRzlE003dchoiyyACyxG_xtFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAASFRzlE003dchoiyyACyxG_x8expected_x5deltattFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAASFRzlE2eeoiyyACyxG_x8expected_x5deltattFZ":{"name":"==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVA2A20NMBDoubleConvertibleRzlE003dchoiyyACyxG_xtFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVA2A20NMBDoubleConvertibleRzlE003dchoiyyACyxG_x8expected_Sd5deltattFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVA2A20NMBDoubleConvertibleRzlE2eeoiyyACyxG_x8expected_Sd5deltattFZ":{"name":"==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAAyXlRszlE3eeeoiyyACyyXlG_yXlSgtFZ":{"name":"===(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAAyXlRszlE3neeoiyyACyyXlG_yXlSgtFZ":{"name":"!==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAAytRszlE2eeoiyyACyytG_yttFZ":{"name":"==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAAytRszlE2neoiyyACyytG_yttFZ":{"name":"!=(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/AssertionRecord.html#/s:6Nimble15AssertionRecordV7successSbvp":{"name":"success","abstract":"

Whether the assertion succeeded or failed

","parent_name":"AssertionRecord"},"Structs/AssertionRecord.html#/s:6Nimble15AssertionRecordV7messageAA14FailureMessageCvp":{"name":"message","abstract":"

The failure message the assertion would display on failure.

","parent_name":"AssertionRecord"},"Structs/AssertionRecord.html#/s:6Nimble15AssertionRecordV8locationAA14SourceLocationCvp":{"name":"location","abstract":"

The source location the expectation occurred on.

","parent_name":"AssertionRecord"},"Structs/AssertionRecord.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"AssertionRecord"},"Structs/execTypesCountTuple.html#/s:6Nimble19execTypesCountTupleV5valuex_xxxxxxxxxxxxxtvp":{"name":"value","abstract":"

Undocumented

","parent_name":"execTypesCountTuple"},"Structs/execTypesCountTuple.html#/s:6Nimble19execTypesCountTupleVACyxGycfc":{"name":"init()","abstract":"

Undocumented

","parent_name":"execTypesCountTuple"},"Structs/execTypesCountTuple.html":{"name":"execTypesCountTuple","abstract":"

Undocumented

"},"Structs/AssertionRecord.html":{"name":"AssertionRecord","abstract":"

A data structure that stores information about an assertion when"},"Structs/Expectation.html":{"name":"Expectation","abstract":"

Undocumented

"},"Structs/Expression.html":{"name":"Expression","abstract":"

Expression represents the closure of the value inside expect(…)."},"Structs/AsyncDefaults.html":{"name":"AsyncDefaults","abstract":"

If you are running on a slower machine, it could be useful to increase the default timeout value"},"Structs/Predicate.html":{"name":"Predicate","abstract":"

A Predicate is part of the new matcher API that provides assertions to expectations.

"},"Structs/PredicateResult.html":{"name":"PredicateResult","abstract":"

The value that a Predicates return to describe if the given (actual) value matches the"},"Protocols/TestOutputStringConvertible.html#/s:6Nimble27TestOutputStringConvertibleP15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"TestOutputStringConvertible"},"Protocols/NMBComparable.html#/c:@M@Nimble@objc(pl)NMBComparable(im)NMB_compare:":{"name":"NMB_compare(_:)","abstract":"

Undocumented

","parent_name":"NMBComparable"},"Protocols/NMBDoubleConvertible.html#/s:6Nimble20NMBDoubleConvertibleP11doubleValueSdvp":{"name":"doubleValue","abstract":"

Undocumented

","parent_name":"NMBDoubleConvertible"},"Protocols/NMBOrderedCollection.html#/s:6Nimble20NMBOrderedCollectionP6object2atypSi_tF":{"name":"object(at:)","abstract":"

Undocumented

","parent_name":"NMBOrderedCollection"},"Protocols/NMBCollection.html#/s:6Nimble13NMBCollectionP5countSivp":{"name":"count","abstract":"

Undocumented

","parent_name":"NMBCollection"},"Protocols/NMBContainer.html#/s:6Nimble12NMBContainerP8containsySbypF":{"name":"contains(_:)","abstract":"

Undocumented

","parent_name":"NMBContainer"},"Protocols/AssertionHandler.html#/s:6Nimble16AssertionHandlerP6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"AssertionHandler"},"Protocols/AssertionHandler.html":{"name":"AssertionHandler","abstract":"

Protocol for the assertion handler that Nimble uses for all expectations.

"},"Protocols/NMBContainer.html":{"name":"NMBContainer","abstract":"

Protocol for types that support contain() matcher.

"},"Protocols/NMBCollection.html":{"name":"NMBCollection","abstract":"

Protocol for types that support only beEmpty(), haveCount() matchers

"},"Protocols/NMBOrderedCollection.html":{"name":"NMBOrderedCollection","abstract":"

Protocol for types that support beginWith(), endWith(), beEmpty() matchers

"},"Protocols/NMBDoubleConvertible.html":{"name":"NMBDoubleConvertible","abstract":"

Undocumented

"},"Protocols/NMBComparable.html":{"name":"NMBComparable","abstract":"

Protocol for types to support beLessThan(), beLessThanOrEqualTo(),"},"Protocols/TestOutputStringConvertible.html":{"name":"TestOutputStringConvertible","abstract":"

A type with a customized test output text representation.

"},"Functions.html#/s:6Nimble19catchBadInstruction2inAA0cD9ExceptionCSgyyc_tF":{"name":"catchBadInstruction(in:)","abstract":"

Run the provided block. If a mach “BAD_INSTRUCTION” exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil."},"Functions.html#/s:6Nimble21MACH_MSGH_BITS_REMOTEys6UInt32VADF":{"name":"MACH_MSGH_BITS_REMOTE(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble14MACH_MSGH_BITSys6UInt32VAD_ADtF":{"name":"MACH_MSGH_BITS(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble20withAssertionHandler_4file4line7closureyAA0cD0_p_SSSuyyKXEtF":{"name":"withAssertionHandler(_:file:line:closure:)","abstract":"

Allows you to temporarily replace the current Nimble assertion handler with"},"Functions.html#/s:6Nimble18gatherExpectations8silently7closureSayAA15AssertionRecordVGSb_yyXEtF":{"name":"gatherExpectations(silently:closure:)","abstract":"

Captures expectations that occur in the given closure. Note that all"},"Functions.html#/s:6Nimble25gatherFailingExpectations8silently7closureSayAA15AssertionRecordVGSb_yyXEtF":{"name":"gatherFailingExpectations(silently:closure:)","abstract":"

Captures failed expectations that occur in the given closure. Note that all"},"Functions.html#/s:6Nimble13recordFailure_8locationySS_AA14SourceLocationCtF":{"name":"recordFailure(_:location:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble9waitUntil7timeout4file4line6actiony8Dispatch0H12TimeIntervalO_SSSuyyycctF":{"name":"waitUntil(timeout:file:line:action:)","abstract":"

Wait asynchronously until the done closure is called or the timeout has been reached.

"},"Functions.html#/s:6Nimble6expect4file4line_AA11ExpectationVyxGSS_SuxSgyKXAtlF":{"name":"expect(file:line:_:)","abstract":"

Make an expectation on a given actual value. The value given is lazily evaluated.

"},"Functions.html#/s:6Nimble6expect4file4line_AA11ExpectationVyxGSS_SuxyKcyXKtlF":{"name":"expect(file:line:_:)","abstract":"

Make an expectation on a given actual value. The closure is lazily invoked.

"},"Functions.html#/s:6Nimble6expect4file4line_AA11ExpectationVyxGSS_SuxSgyKcyXKtlF":{"name":"expect(file:line:_:)","abstract":"

Make an expectation on a given actual value. The closure is lazily invoked.

"},"Functions.html#/s:6Nimble6expect4file4line_AA11ExpectationVyytGSS_SuyyKcyXKtF":{"name":"expect(file:line:_:)","abstract":"

Make an expectation on a given actual value. The closure is lazily invoked.

"},"Functions.html#/s:6Nimble4fail_8locationySS_AA14SourceLocationCtF":{"name":"fail(_:location:)","abstract":"

Always fails the test with a message and a specified location.

"},"Functions.html#/s:6Nimble4fail_4file4lineySS_SSSutF":{"name":"fail(_:file:line:)","abstract":"

Always fails the test with a message.

"},"Functions.html#/s:6Nimble4fail_4lineySS_SutF":{"name":"fail(_:line:)","abstract":"

Always fails the test.

"},"Functions.html#/s:6Nimble7allPassyAA9PredicateVyxGSb7ElementQzKcSTRzlF":{"name":"allPass(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7allPassyAA9PredicateVyxGSS_Sb7ElementQzKctSTRzlF":{"name":"allPass(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7allPassyAA9PredicateVyxGADy7ElementQzGSTRzlF":{"name":"allPass(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble9beAKindOfyAA9PredicateVyypGxmlF":{"name":"beAKindOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is an instance of the given class.

"},"Functions.html#/s:6Nimble9beAKindOfyAA9PredicateVySo8NSObjectCGyXlXpF":{"name":"beAKindOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is an instance of the given class."},"Functions.html#/s:6Nimble14beAnInstanceOfyAA9PredicateVyypGxmlF":{"name":"beAnInstanceOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is an exact instance of the given class.

"},"Functions.html#/s:6Nimble14beAnInstanceOfyAA9PredicateVySo8NSObjectCGyXlXpF":{"name":"beAnInstanceOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is an instance of the given class."},"Functions.html#/s:6Nimble12defaultDeltaxySFRzlF":{"name":"defaultDelta()","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble9beCloseTo_6withinAA9PredicateVyxGx_xtSFRzlF":{"name":"beCloseTo(_:within:)","abstract":"

A Nimble matcher that succeeds when a value is close to another. This is used for floating"},"Functions.html#/s:6Nimble9beCloseTo_6withinAA9PredicateVyxGx_SdtAA20NMBDoubleConvertibleRzlF":{"name":"beCloseTo(_:within:)","abstract":"

A Nimble matcher that succeeds when a value is close to another. This is used for floating"},"Functions.html#/s:6Nimble9beCloseTo_6withinAA9PredicateVyq_Gq__xtSFRz7ElementQy_RszSlR_r0_lF":{"name":"beCloseTo(_:within:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble003obaoiyx8expected_x5deltatx_xtSFRzlF":{"name":"±(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble003obaoiyx8expected_Sd5deltatx_SdtAA20NMBDoubleConvertibleRzlF":{"name":"±(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVyxGySTRzlF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVyxGys10SetAlgebraRzlF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVyxGySTRzs10SetAlgebraRzlF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVySSGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVySo8NSStringCGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVySo12NSDictionaryCGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVySo7NSArrayCGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVyAA13NMBCollection_pGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble13beGreaterThanyAA9PredicateVyxGxSgSLRzlF":{"name":"beGreaterThan(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is greater than the expected value.

"},"Functions.html#/s:6Nimble1goiyyAA11ExpectationVyxG_xtSLRzlF":{"name":">(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble13beGreaterThanyAA9PredicateVyAA13NMBComparable_pGAaE_pSgF":{"name":"beGreaterThan(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is greater than the expected value.

"},"Functions.html#/s:6Nimble1goiyyAA11ExpectationVyAA13NMBComparable_pG_AaE_pSgtF":{"name":">(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble22beGreaterThanOrEqualToyAA9PredicateVyxGxSgSLRzlF":{"name":"beGreaterThanOrEqualTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is greater than"},"Functions.html#/s:6Nimble2geoiyyAA11ExpectationVyxG_xtSLRzlF":{"name":">=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble22beGreaterThanOrEqualToyAA9PredicateVyxGxSgAA13NMBComparableRzlF":{"name":"beGreaterThanOrEqualTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is greater than"},"Functions.html#/s:6Nimble2geoiyyAA11ExpectationVyxG_xtAA13NMBComparableRzlF":{"name":">=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble13beIdenticalToyAA9PredicateVyyXlGyXlSgF":{"name":"beIdenticalTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is the same instance"},"Functions.html#/s:6Nimble2beyAA9PredicateVyyXlGyXlSgF":{"name":"be(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is the same instance"},"Functions.html#/s:6Nimble10beLessThanyAA9PredicateVyxGxSgSLRzlF":{"name":"beLessThan(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is less than the expected value.

"},"Functions.html#/s:6Nimble1loiyyAA11ExpectationVyxG_xtSLRzlF":{"name":"<(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble10beLessThanyAA9PredicateVyAA13NMBComparable_pGAaE_pSgF":{"name":"beLessThan(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is less than the expected value.

"},"Functions.html#/s:6Nimble1loiyyAA11ExpectationVyAA13NMBComparable_pG_AaE_pSgtF":{"name":"<(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble19beLessThanOrEqualToyAA9PredicateVyxGxSgSLRzlF":{"name":"beLessThanOrEqualTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is less than"},"Functions.html#/s:6Nimble2leoiyyAA11ExpectationVyxG_xtSLRzlF":{"name":"<=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble19beLessThanOrEqualToyAA9PredicateVyxGxSgAA13NMBComparableRzlF":{"name":"beLessThanOrEqualTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is less than"},"Functions.html#/s:6Nimble2leoiyyAA11ExpectationVyxG_xtAA13NMBComparableRzlF":{"name":"<=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble6beTrueAA9PredicateVySbGyF":{"name":"beTrue()","abstract":"

A Nimble matcher that succeeds when the actual value is exactly true."},"Functions.html#/s:6Nimble7beFalseAA9PredicateVySbGyF":{"name":"beFalse()","abstract":"

A Nimble matcher that succeeds when the actual value is exactly false."},"Functions.html#/s:6Nimble8beTruthyAA9PredicateVyxGySQRzs27ExpressibleByBooleanLiteralRzlF":{"name":"beTruthy()","abstract":"

A Nimble matcher that succeeds when the actual value is not logically false.

"},"Functions.html#/s:6Nimble7beFalsyAA9PredicateVyxGySQRzs27ExpressibleByBooleanLiteralRzlF":{"name":"beFalsy()","abstract":"

A Nimble matcher that succeeds when the actual value is logically false."},"Functions.html#/s:6Nimble5beNilAA9PredicateVyxGylF":{"name":"beNil()","abstract":"

A Nimble matcher that succeeds when the actual value is nil.

"},"Functions.html#/s:6Nimble9beSuccess4testAA9PredicateVys6ResultOyxq_GGyxcSg_ts5ErrorR_r0_lF":{"name":"beSuccess(test:)","abstract":"

A Nimble matcher for Result that succeeds when the actual value is success.

"},"Functions.html#/s:6Nimble9beFailure4testAA9PredicateVys6ResultOyxq_GGyq_cSg_ts5ErrorR_r0_lF":{"name":"beFailure(test:)","abstract":"

A Nimble matcher for Result that succeeds when the actual value is failure.

"},"Functions.html#/s:6Nimble6beVoidAA9PredicateVyytGyF":{"name":"beVoid()","abstract":"

A Nimble matcher that succeeds when the actual value is Void.

"},"Functions.html#/s:6Nimble8beWithinyAA9PredicateVyxGSnyxGSLRzlF":{"name":"beWithin(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is within given range.

"},"Functions.html#/s:6Nimble8beWithinyAA9PredicateVyxGSNyxGSLRzlF":{"name":"beWithin(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is within given range.

"},"Functions.html#/s:6Nimble9beginWithyAA9PredicateVyxG7ElementQzSTRzSQAGRQlF":{"name":"beginWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence’s first element"},"Functions.html#/s:6Nimble9beginWithyAA9PredicateVyAA20NMBOrderedCollection_pGypF":{"name":"beginWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual collection’s first element"},"Functions.html#/s:6Nimble9beginWithyAA9PredicateVySSGSSF":{"name":"beginWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual string contains expected substring"},"Functions.html#/s:6Nimble9beginWith6prefixAA9PredicateVyxGq_Sg_tSTRzSTR_SQ7ElementRpzAHQy_AIRSr0_lF":{"name":"beginWith(prefix:)","abstract":"

A Nimble matcher that succeeds when the exepected sequence is a prefix of the actual sequence.

"},"Functions.html#/s:6Nimble9beginWith6prefix2byAA9PredicateVyxGq_Sg_Sb7ElementQz_AIQy_tctSTRzSTR_r0_lF":{"name":"beginWith(prefix:by:)","abstract":"

A Nimble matcher that succeeds when the expected sequence is the prefix of the actual sequence, using the given predicate as the equivalence test.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxG7ElementQzd_tSTRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxGSay7ElementQzGSTRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxG7ElementQzd_ts10SetAlgebraRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual set contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxGSay7ElementQzGs10SetAlgebraRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual set contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxG7ElementSTQzd_tSTRzs10SetAlgebraRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual set contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxGSay7ElementSTQzGSTRzs10SetAlgebraRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual set contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVySSGSSd_tF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual string contains the expected substring.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVySSGSaySSGF":{"name":"contain(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7containyAA9PredicateVySo8NSStringCGAFd_tF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual string contains the expected substring.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVySo8NSStringCGSayAFGF":{"name":"contain(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyAA12NMBContainer_pGypSgd_tF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual collection contains the expected object.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyAA12NMBContainer_pGSayypSgGF":{"name":"contain(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble24containElementSatisfyingyAA9PredicateVyxGSb0C0Qzc_SStSTRzlF":{"name":"containElementSatisfying(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble13elementsEqualyAA9PredicateVyxGq_SgSTRzSTR_SQ7ElementRpzAGQy_AHRSr0_lF":{"name":"elementsEqual(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain the same elements in"},"Functions.html#/s:6Nimble13elementsEqual_2byAA9PredicateVyxGq_Sg_Sb7ElementQz_AHQy_tctSTRzSTR_r0_lF":{"name":"elementsEqual(_:by:)","abstract":"

A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain equivalent elements in"},"Functions.html#/s:6Nimble7endWithyAA9PredicateVyxG7ElementQzSTRzSQAGRQlF":{"name":"endWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence’s last element"},"Functions.html#/s:6Nimble7endWithyAA9PredicateVyAA20NMBOrderedCollection_pGypF":{"name":"endWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual collection’s last element"},"Functions.html#/s:6Nimble7endWithyAA9PredicateVySSGSSF":{"name":"endWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual string contains the expected substring"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_tGx_q_tSgSQRzSQR_r0_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_tG_x_q_tSgtSQRzSQR_r0_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_tG_x_q_tSgtSQRzSQR_r0_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_q0_tGx_q_q0_tSgSQRzSQR_SQR0_r1_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_q0_tG_x_q_q0_tSgtSQRzSQR_SQR0_r1_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_q0_tG_x_q_q0_tSgtSQRzSQR_SQR0_r1_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_q0_q1_tGx_q_q0_q1_tSgSQRzSQR_SQR0_SQR1_r2_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_q0_q1_tG_x_q_q0_q1_tSgtSQRzSQR_SQR0_SQR1_r2_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_q0_q1_tG_x_q_q0_q1_tSgtSQRzSQR_SQR0_SQR1_r2_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_q0_q1_q2_tGx_q_q0_q1_q2_tSgSQRzSQR_SQR0_SQR1_SQR2_r3_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_q0_q1_q2_tG_x_q_q0_q1_q2_tSgtSQRzSQR_SQR0_SQR1_SQR2_r3_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_q0_q1_q2_tG_x_q_q0_q1_q2_tSgtSQRzSQR_SQR0_SQR1_SQR2_r3_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_q0_q1_q2_q3_tGx_q_q0_q1_q2_q3_tSgSQRzSQR_SQR0_SQR1_SQR2_SQR3_r4_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_q0_q1_q2_q3_tG_x_q_q0_q1_q2_q3_tSgtSQRzSQR_SQR0_SQR1_SQR2_SQR3_r4_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_q0_q1_q2_q3_tG_x_q_q0_q1_q2_q3_tSgtSQRzSQR_SQR0_SQR1_SQR2_SQR3_r4_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyxGxSQRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is equal to the expected value."},"Functions.html#/s:6Nimble5equalyAA9PredicateVySayxSgGGAFSQRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher allowing comparison of collection with optional type

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyxGxSgSQRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is equal to the expected value."},"Functions.html#/s:6Nimble5equalyAA9PredicateVyShyxGGAESHRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual set is equal to the expected set.

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyShyxGGAESgSHRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual set is equal to the expected set.

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyShyxGGAESLRzSHRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual set is equal to the expected set.

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyShyxGGAESgSLRzSHRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual set is equal to the expected set.

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVySDyxq_GGSDyxq_SgGSHRzSQR_r0_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual dictionary is equal to the expected dictionary

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyxG_xtSQRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyxG_xSgtSQRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyxG_xtSQRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyxG_xSgtSQRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVySayxGG_AESgtSQRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVySayxGG_AESgtSQRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyShyxGG_AEtSHRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyShyxGG_AESgtSHRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyShyxGG_AEtSHRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyShyxGG_AESgtSHRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyShyxGG_AEtSLRzSHRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyShyxGG_AESgtSLRzSHRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyShyxGG_AEtSLRzSHRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyShyxGG_AESgtSLRzSHRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVySDyxq_GG_AESgtSHRzSQR_r0_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVySDyxq_GG_AESgtSHRzSQR_r0_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble9haveCountyAA9PredicateVyxGSiSlRzlF":{"name":"haveCount(_:)","abstract":"

A Nimble matcher that succeeds when the actual Collection’s count equals"},"Functions.html#/s:6Nimble9haveCountyAA9PredicateVyAA13NMBCollection_pGSiF":{"name":"haveCount(_:)","abstract":"

A Nimble matcher that succeeds when the actual collection’s count equals"},"Functions.html#/s:6Nimble5matchyAA9PredicateVySSGSSSgF":{"name":"match(_:)","abstract":"

A Nimble matcher that succeeds when the actual string satisfies the regular expression"},"Functions.html#/s:6Nimble10matchErroryAA9PredicateVys0C0_pGxsAERzlF":{"name":"matchError(_:)","abstract":"

A Nimble matcher that succeeds when the actual expression evaluates to an"},"Functions.html#/s:6Nimble10matchErroryAA9PredicateVys0C0_pGxSQRzsAERzlF":{"name":"matchError(_:)","abstract":"

A Nimble matcher that succeeds when the actual expression evaluates to an"},"Functions.html#/s:6Nimble10matchErroryAA9PredicateVys0C0_pGxmsAERzlF":{"name":"matchError(_:)","abstract":"

A Nimble matcher that succeeds when the actual expression evaluates to an"},"Functions.html#/s:6Nimble17postNotifications_4fromAA9PredicateVyxGAEySay10Foundation12NotificationVGG_So20NSNotificationCenterCtlF":{"name":"postNotifications(_:from:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble28postDistributedNotifications_4from5namesAA9PredicateVyxGAFySay10Foundation12NotificationVGG_So013NSDistributedI6CenterCShySo18NSNotificationNameaGtlF":{"name":"postDistributedNotifications(_:from:names:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble14raiseException5named6reason8userInfo7closureAA9PredicateVyxGSo15NSExceptionNameaSg_SSSgSo12NSDictionaryCSgySo0J0CcSgtlF":{"name":"raiseException(named:reason:userInfo:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression raises an"},"Functions.html#/s:6Nimble14raiseException5named6reason8userInfo7closureAA9PredicateVyxGSSSg_AJSo12NSDictionaryCSgySo11NSExceptionCcSgtlF":{"name":"raiseException(named:reason:userInfo:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression raises an"},"Functions.html#/s:6Nimble12satisfyAllOfyAA9PredicateVyxGAEd_tlF":{"name":"satisfyAllOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value matches with all of the matchers"},"Functions.html#/s:6Nimble12satisfyAllOfyAA9PredicateVyxGSayAEGlF":{"name":"satisfyAllOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value matches with all of the matchers"},"Functions.html#/s:6Nimble2aaoiyAA9PredicateVyxGAE_AEtlF":{"name":"&&(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble12satisfyAnyOfyAA9PredicateVyxGAEd_tlF":{"name":"satisfyAnyOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value matches with any of the matchers"},"Functions.html#/s:6Nimble12satisfyAnyOfyAA9PredicateVyxGSayAEGlF":{"name":"satisfyAnyOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value matches with any of the matchers"},"Functions.html#/s:6Nimble2oooiyAA9PredicateVyxGAE_AEtlF":{"name":"||(_:_:)","abstract":"

Undocumented

"},"Functions.html#/catchBadInstruction(block:)":{"name":"catchBadInstruction(block:)","abstract":"

Run the provided block. If a POSIX SIGILL is received, handle it and return a BadInstructionException (which is just an empty object in this POSIX signal version). Otherwise return nil."},"Functions.html#/s:6Nimble14throwAssertionAA9PredicateVyxGylF":{"name":"throwAssertion()","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble10throwErrorAA9PredicateVyxGylF":{"name":"throwError()","abstract":"

A Nimble matcher that succeeds when the actual expression throws an"},"Functions.html#/s:6Nimble10throwError_7closureAA9PredicateVyq_Gx_ys0C0_pcSgtsAGRzr0_lF":{"name":"throwError(_:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws an"},"Functions.html#/s:6Nimble10throwError_7closureAA9PredicateVyq_Gx_yxcSgtSQRzs0C0Rzr0_lF":{"name":"throwError(_:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws an"},"Functions.html#/s:6Nimble10throwError9errorType7closureAA9PredicateVyq_Gxm_yxcSgts0C0Rzr0_lF":{"name":"throwError(errorType:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws an"},"Functions.html#/s:6Nimble10throwError7closureAA9PredicateVyxGys0C0_pc_tlF":{"name":"throwError(closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws any"},"Functions.html#/s:6Nimble10throwError7closureAA9PredicateVyq_Gyxc_ts0C0Rzr0_lF":{"name":"throwError(closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws any"},"Functions.html#/s:6Nimble7succeedAA9PredicateVyAA15ToSucceedResultOGyF":{"name":"succeed()","abstract":"

A Nimble matcher that takes in a closure for validation.

"},"Functions.html#/s:6Nimble9stringifyySSxSglF":{"name":"stringify(_:)","abstract":"

Returns a string appropriate for displaying in test output"},"Functions.html#/s:6Nimble20prettyCollectionTypeySSxlF":{"name":"prettyCollectionType(_:)","abstract":"

Attempts to generate a pretty type string for a given value. If the value is of a Objective-C"},"Functions.html#/s:6Nimble20prettyCollectionTypeySSxSlRzlF":{"name":"prettyCollectionType(_:)","abstract":"

Returns the type name for a given collection type. This overload is used by Swift"},"Extensions/Data.html#/s:10Foundation4DataV6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Data"},"Extensions/String.html#/s:SS6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"String"},"Extensions/AnySequence.html#/s:s11AnySequenceV6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"AnySequence"},"Extensions/Array.html#/s:Sa6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Array"},"Extensions/NSString.html#/c:@CM@Nimble@@objc(cs)NSString(im)NMB_compare:":{"name":"NMB_compare(_:)","abstract":"

Undocumented

","parent_name":"NSString"},"Extensions/NSDate.html#/s:So6NSDateC6NimbleE11doubleValueSdvp":{"name":"doubleValue","abstract":"

Undocumented

","parent_name":"NSDate"},"Extensions/NSDate.html#/s:So6NSDateC6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"NSDate"},"Extensions/Date.html#/s:10Foundation4DateV6NimbleE11doubleValueSdvp":{"name":"doubleValue","abstract":"

Undocumented

","parent_name":"Date"},"Extensions/Date.html#/s:10Foundation4DateV6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Date"},"Extensions/NSNumber.html#/c:@CM@Nimble@@objc(cs)NSNumber(im)NMB_compare:":{"name":"NMB_compare(_:)","abstract":"

Undocumented

","parent_name":"NSNumber"},"Extensions/NSNumber.html#/s:So8NSNumberC6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"NSNumber"},"Extensions/NSIndexSet.html#/s:So10NSIndexSetC6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"NSIndexSet"},"Extensions/NSArray.html#/s:So7NSArrayC6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"NSArray"},"Extensions/UInt.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt"},"Extensions/Int.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int"},"Extensions/Double.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Double"},"Extensions/Double.html#/s:Sd6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Double"},"Extensions/Float.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Float"},"Extensions/Float.html#/s:Sf6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Float"},"Extensions/UInt64.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt64"},"Extensions/Int64.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int64"},"Extensions/UInt32.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt32"},"Extensions/Int32.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int32"},"Extensions/UInt16.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt16"},"Extensions/Int16.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int16"},"Extensions/UInt8.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt8"},"Extensions/Int8.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int8"},"Extensions/NSException.html#/s:So11NSExceptionC6NimbleE14catchException2inABXDSgyyc_tFZ":{"name":"catchException(in:)","abstract":"

Undocumented

","parent_name":"NSException"},"Extensions/NSException.html":{"name":"NSException"},"Extensions/Int8.html":{"name":"Int8"},"Extensions/UInt8.html":{"name":"UInt8"},"Extensions/Int16.html":{"name":"Int16"},"Extensions/UInt16.html":{"name":"UInt16"},"Extensions/Int32.html":{"name":"Int32"},"Extensions/UInt32.html":{"name":"UInt32"},"Extensions/Int64.html":{"name":"Int64"},"Extensions/UInt64.html":{"name":"UInt64"},"Extensions/Float.html":{"name":"Float"},"Extensions/Double.html":{"name":"Double"},"Extensions/Int.html":{"name":"Int"},"Extensions/UInt.html":{"name":"UInt"},"Extensions/NSArray.html":{"name":"NSArray"},"Extensions.html#/c:objc(cs)NSSet":{"name":"NSSet"},"Extensions.html#/c:objc(cs)NSHashTable":{"name":"NSHashTable"},"Extensions.html#/c:objc(cs)NSMapTable":{"name":"NSMapTable"},"Extensions/NSIndexSet.html":{"name":"NSIndexSet"},"Extensions.html#/c:objc(cs)NSDictionary":{"name":"NSDictionary"},"Extensions/NSNumber.html":{"name":"NSNumber"},"Extensions/Date.html":{"name":"Date"},"Extensions/NSDate.html":{"name":"NSDate"},"Extensions/NSString.html":{"name":"NSString"},"Extensions/Array.html":{"name":"Array"},"Extensions/AnySequence.html":{"name":"AnySequence"},"Extensions/String.html":{"name":"String"},"Extensions/Data.html":{"name":"Data"},"Enums/ToSucceedResult.html#/s:6Nimble15ToSucceedResultO9succeededyA2CmF":{"name":"succeeded","abstract":"

Undocumented

","parent_name":"ToSucceedResult"},"Enums/ToSucceedResult.html#/s:6Nimble15ToSucceedResultO6failedyACSS_tcACmF":{"name":"failed(reason:)","abstract":"

Undocumented

","parent_name":"ToSucceedResult"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO7matchesyA2CmF":{"name":"matches","abstract":"

Matches indicates if the predicate / matcher passes with the given value

","parent_name":"PredicateStatus"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO12doesNotMatchyA2CmF":{"name":"doesNotMatch","abstract":"

DoesNotMatch indicates if the predicate / matcher fails with the given value, but would","parent_name":"PredicateStatus"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO4failyA2CmF":{"name":"fail","abstract":"

Fail indicates the predicate will never satisfy with the given value in any case.","parent_name":"PredicateStatus"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO4boolACSb_tcfc":{"name":"init(bool:)","abstract":"

Converts a boolean to either .matches (if true) or .doesNotMatch (if false).

","parent_name":"PredicateStatus"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO12toObjectiveCAA012NMBPredicateC0CyF":{"name":"toObjectiveC()","abstract":"

Undocumented

","parent_name":"PredicateStatus"},"Enums/ExpectationStyle.html#/s:6Nimble16ExpectationStyleO7toMatchyA2CmF":{"name":"toMatch","abstract":"

Undocumented

","parent_name":"ExpectationStyle"},"Enums/ExpectationStyle.html#/s:6Nimble16ExpectationStyleO10toNotMatchyA2CmF":{"name":"toNotMatch","abstract":"

Undocumented

","parent_name":"ExpectationStyle"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO21expectedActualValueToyACSScACmF":{"name":"expectedActualValueTo(_:)","abstract":"

includes actual value in output (“expected to , got ”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO21expectedCustomValueToyACSS_SStcACmF":{"name":"expectedCustomValueTo(_:actual:)","abstract":"

uses a custom actual value string in output (“expected to , got ”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO10expectedToyACSScACmF":{"name":"expectedTo(_:)","abstract":"

excludes actual value in output (“expected to ”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO4failyACSScACmF":{"name":"fail(_:)","abstract":"

allows any free-form message (“”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO8prependsyACSS_ACtcACmF":{"name":"prepends(_:_:)","abstract":"

Not Fully Implemented Yet.

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO7appendsyA2C_SStcACmF":{"name":"appends(_:_:)","abstract":"

appends after an existing message (“ (use beNil() to match nils)”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO7detailsyA2C_SStcACmF":{"name":"details(_:_:)","abstract":"

provides long-form multi-line explainations (“\\n\\n”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO08expectedC0SSvp":{"name":"expectedMessage","abstract":"

Returns the smallest message after the “expected to” string that summarizes the error.

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO8appended7messageACSS_tF":{"name":"appended(message:)","abstract":"

Appends a message after the primary expectation message

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO17appendedBeNilHintACyF":{"name":"appendedBeNilHint()","abstract":"

Appends a message hinting to use beNil() for when the actual value given was nil.

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO8appended7detailsACSS_tF":{"name":"appended(details:)","abstract":"

Appends a detailed (aka - multiline) message after the primary expectation message","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO08replacedB0yA3CcF":{"name":"replacedExpectation(_:)","abstract":"

Replaces a primary expectation with one returned by f. Preserves all composite expectations","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO07wrappedB06before5afterACSS_SStF":{"name":"wrappedExpectation(before:after:)","abstract":"

Wraps a primary expectation with text before and after it.","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO9prepended11expectationACSS_tF":{"name":"prepended(expectation:)","abstract":"

Prepends a message by modifying the primary expectation

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO8toString6actual8expected0D0S2S_S2StF":{"name":"toString(actual:expected:to:)","abstract":"

Converts the tree of ExpectationMessages into a final built string.

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html":{"name":"ExpectationMessage","abstract":"

Undocumented

"},"Enums/ExpectationStyle.html":{"name":"ExpectationStyle","abstract":"

Undocumented

"},"Enums/PredicateStatus.html":{"name":"PredicateStatus","abstract":"

PredicateStatus is a trinary that indicates if a Predicate matches a given value or not

"},"Enums/ToSucceedResult.html":{"name":"ToSucceedResult","abstract":"

Used by the succeed matcher.

"},"Global%20Variables.html#/s:6Nimble23MACH_MSG_TYPE_MAKE_SENDs6UInt32Vvp":{"name":"MACH_MSG_TYPE_MAKE_SEND","abstract":"

Undocumented

"},"Global%20Variables.html#/nativeThreadState":{"name":"nativeThreadState"},"Global%20Variables.html#/nativeThreadStateCount":{"name":"nativeThreadStateCount"},"Global%20Variables.html#/nativeMachExceptionMask":{"name":"nativeMachExceptionMask"},"Global%20Variables.html#/s:6Nimble17nativeThreadStates5Int32Vvp":{"name":"nativeThreadState","abstract":"

Undocumented

"},"Global%20Variables.html#/s:6Nimble22nativeThreadStateCounts6UInt32Vvp":{"name":"nativeThreadStateCount","abstract":"

Undocumented

"},"Global%20Variables.html#/s:6Nimble23nativeMachExceptionMasks6UInt32Vvp":{"name":"nativeMachExceptionMask","abstract":"

Undocumented

"},"Global%20Variables.html#/s:6Nimble15EXC_TYPES_COUNTSivp":{"name":"EXC_TYPES_COUNT","abstract":"

Undocumented

"},"Global%20Variables.html#/s:6Nimble0A16AssertionHandlerAA0bC0_pvp":{"name":"NimbleAssertionHandler","abstract":"

Global backing interface for assertions that Nimble creates."},"Global%20Variables.html#/s:6Nimble12DefaultDeltaSdvp":{"name":"DefaultDelta","abstract":"

Undocumented

"},"Classes/NMBStringer.html#/c:@M@Nimble@objc(cs)NMBStringer(cm)stringify:":{"name":"stringify(_:)","abstract":"

Undocumented

","parent_name":"NMBStringer"},"Classes/SourceLocation.html#/s:6Nimble14SourceLocationC4fileSSvp":{"name":"file","abstract":"

Undocumented

","parent_name":"SourceLocation"},"Classes/SourceLocation.html#/s:6Nimble14SourceLocationC4lineSuvp":{"name":"line","abstract":"

Undocumented

","parent_name":"SourceLocation"},"Classes/SourceLocation.html#/c:@M@Nimble@objc(cs)SourceLocation(py)description":{"name":"description","abstract":"

Undocumented

","parent_name":"SourceLocation"},"Classes/NMBObjCRaiseExceptionPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCRaiseExceptionPredicate(py)named":{"name":"named","abstract":"

Undocumented

","parent_name":"NMBObjCRaiseExceptionPredicate"},"Classes/NMBObjCRaiseExceptionPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCRaiseExceptionPredicate(py)reason":{"name":"reason","abstract":"

Undocumented

","parent_name":"NMBObjCRaiseExceptionPredicate"},"Classes/NMBObjCRaiseExceptionPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCRaiseExceptionPredicate(py)userInfo":{"name":"userInfo","abstract":"

Undocumented

","parent_name":"NMBObjCRaiseExceptionPredicate"},"Classes/NMBObjCRaiseExceptionPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCRaiseExceptionPredicate(py)satisfyingBlock":{"name":"satisfyingBlock","abstract":"

Undocumented

","parent_name":"NMBObjCRaiseExceptionPredicate"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC7matchesACvpZ":{"name":"matches","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC12doesNotMatchACvpZ":{"name":"doesNotMatch","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC4failACvpZ":{"name":"fail","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/c:@M@Nimble@objc(cs)NMBPredicateStatus(py)hash":{"name":"hash","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/c:@M@Nimble@objc(cs)NMBPredicateStatus(im)isEqual:":{"name":"isEqual(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC4from6statusAcA09PredicateC0O_tFZ":{"name":"from(status:)","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC4from4boolACSb_tFZ":{"name":"from(bool:)","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC7toSwiftAA09PredicateC0OyF":{"name":"toSwift()","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC6statusAA0B6StatusCvp":{"name":"status","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC7messageAA21NMBExpectationMessageCvp":{"name":"message","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC6status7messageAcA0B6StatusC_AA21NMBExpectationMessageCtcfc":{"name":"init(status:message:)","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC4bool7messageACSb_AA21NMBExpectationMessageCtcfc":{"name":"init(bool:message:)","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC7toSwiftAA09PredicateC0VyF":{"name":"toSwift()","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBObjCBeCloseToPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCBeCloseToPredicate(py)within":{"name":"within","abstract":"

Undocumented

","parent_name":"NMBObjCBeCloseToPredicate"},"Classes/NMBPredicate.html#/s:6Nimble12NMBPredicateC9predicateAcA0B6ResultCAA10ExpressionVySo8NSObjectCGKc_tcfc":{"name":"init(predicate:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)allPassMatcher:":{"name":"allPassMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beAKindOfMatcher:":{"name":"beAKindOfMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beAnInstanceOfMatcher:":{"name":"beAnInstanceOfMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beCloseToMatcher:within:":{"name":"beCloseToMatcher(_:within:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beEmptyMatcher":{"name":"beEmptyMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beGreaterThanMatcher:":{"name":"beGreaterThanMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beGreaterThanOrEqualToMatcher:":{"name":"beGreaterThanOrEqualToMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beIdenticalToMatcher:":{"name":"beIdenticalToMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beLessThanMatcher:":{"name":"beLessThanMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beLessThanOrEqualToMatcher:":{"name":"beLessThanOrEqualToMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beTruthyMatcher":{"name":"beTruthyMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beFalsyMatcher":{"name":"beFalsyMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beTrueMatcher":{"name":"beTrueMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beFalseMatcher":{"name":"beFalseMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beNilMatcher":{"name":"beNilMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beginWithMatcher:":{"name":"beginWithMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)containMatcher:":{"name":"containMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)containElementSatisfyingMatcher:":{"name":"containElementSatisfyingMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)endWithMatcher:":{"name":"endWithMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)equalMatcher:":{"name":"equalMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)haveCountMatcher:":{"name":"haveCountMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)matchMatcher:":{"name":"matchMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)raiseExceptionMatcher":{"name":"raiseExceptionMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)satisfyAllOfMatcher:":{"name":"satisfyAllOfMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)satisfyAnyOfMatcher:":{"name":"satisfyAnyOfMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC8expectedSSvp":{"name":"expected","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC11actualValueSSSgvp":{"name":"actualValue","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC2toSSvp":{"name":"to","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC07postfixC0SSvp":{"name":"postfixMessage","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC13postfixActualSSvp":{"name":"postfixActual","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC08extendedC0SSSgvp":{"name":"extendedMessage","abstract":"

An optional message that will be appended as a new line and provides additional details","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC15userDescriptionSSSgvp":{"name":"userDescription","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC11stringValueSSvp":{"name":"stringValue","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/c:@M@Nimble@objc(cs)FailureMessage(im)init":{"name":"init()","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC11stringValueACSS_tcfc":{"name":"init(stringValue:)","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC10expectedToACSS_tcfc":{"name":"init(expectedTo:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC21expectedActualValueToACSS_tcfc":{"name":"init(expectedActualValueTo:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC21expectedActualValueTo06customeF0ACSS_SStcfc":{"name":"init(expectedActualValueTo:customActualValue:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC4failACSS_tcfc":{"name":"init(fail:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC7prepend5childACSS_ACtcfc":{"name":"init(prepend:child:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC08appendedC05childACSS_ACtcfc":{"name":"init(appendedMessage:child:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC09prependedC05childACSS_ACtcfc":{"name":"init(prependedMessage:child:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC7details5childACSS_ACtcfc":{"name":"init(details:child:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC17appendedBeNilHintACyF":{"name":"appendedBeNilHint()","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC7toSwiftAA011ExpectationC0OyF":{"name":"toSwift()","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NimbleShortXCTestHandler.html#/s:6Nimble0A18ShortXCTestHandlerC6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"NimbleShortXCTestHandler"},"Classes/NimbleXCTestHandler.html#/s:6Nimble0A13XCTestHandlerC6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"NimbleXCTestHandler"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(im)initWithActualBlock:negative:file:line:":{"name":"init(actualBlock:negative:file:line:)","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)withTimeout":{"name":"withTimeout","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)to":{"name":"to","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toWithDescription":{"name":"toWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNot":{"name":"toNot","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNotWithDescription":{"name":"toNotWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)notTo":{"name":"notTo","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)notToWithDescription":{"name":"notToWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toEventually":{"name":"toEventually","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toEventuallyWithDescription":{"name":"toEventuallyWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toEventuallyNot":{"name":"toEventuallyNot","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toEventuallyNotWithDescription":{"name":"toEventuallyNotWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNotEventually":{"name":"toNotEventually","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNotEventuallyWithDescription":{"name":"toNotEventuallyWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNever":{"name":"toNever","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNeverWithDescription":{"name":"toNeverWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)neverTo":{"name":"neverTo","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)neverToWithDescription":{"name":"neverToWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toAlways":{"name":"toAlways","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toAlwaysWithDescription":{"name":"toAlwaysWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)alwaysTo":{"name":"alwaysTo","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)alwaysToWithDescription":{"name":"alwaysToWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(cm)failWithMessage:file:line:":{"name":"failWithMessage(_:file:line:)","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/AssertionRecorder.html#/s:6Nimble17AssertionRecorderC10assertionsSayAA0B6RecordVGvp":{"name":"assertions","abstract":"

All the assertions that were captured by this recorder

","parent_name":"AssertionRecorder"},"Classes/AssertionRecorder.html#/s:6Nimble17AssertionRecorderCACycfc":{"name":"init()","abstract":"

Undocumented

","parent_name":"AssertionRecorder"},"Classes/AssertionRecorder.html#/s:6Nimble17AssertionRecorderC6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"AssertionRecorder"},"Classes/AssertionDispatcher.html#/s:6Nimble19AssertionDispatcherC8handlersACSayAA0B7Handler_pG_tcfc":{"name":"init(handlers:)","abstract":"

Undocumented

","parent_name":"AssertionDispatcher"},"Classes/AssertionDispatcher.html#/s:6Nimble19AssertionDispatcherC6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"AssertionDispatcher"},"Classes/BadInstructionException.html#/c:@M@Nimble@objc(cs)BadInstructionException(im)initWithCoder:":{"name":"init(coder:)","abstract":"

Undocumented

","parent_name":"BadInstructionException"},"Classes/BadInstructionException.html#/c:@M@Nimble@objc(cs)BadInstructionException(cm)receiveReply:":{"name":"receiveReply(_:)","abstract":"

An Objective-C callable function, invoked from the mach_exc_server callback function catch_mach_exception_raise_state to push the raiseBadInstructionException function onto the stack.

","parent_name":"BadInstructionException"},"Classes/BadInstructionException.html":{"name":"BadInstructionException","abstract":"

A simple NSException subclass. It’s not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type.

"},"Classes/AssertionDispatcher.html":{"name":"AssertionDispatcher","abstract":"

AssertionDispatcher allows multiple AssertionHandlers to receive"},"Classes/AssertionRecorder.html":{"name":"AssertionRecorder","abstract":"

An AssertionHandler that silently records assertions that Nimble makes."},"Classes/NMBExpectation.html":{"name":"NMBExpectation","abstract":"

Undocumented

"},"Classes/NimbleXCTestHandler.html":{"name":"NimbleXCTestHandler","abstract":"

Default handler for Nimble. This assertion handler passes failures along to"},"Classes/NimbleShortXCTestHandler.html":{"name":"NimbleShortXCTestHandler","abstract":"

Alternative handler for Nimble. This assertion handler passes failures along"},"Classes/NMBExpectationMessage.html":{"name":"NMBExpectationMessage","abstract":"

Undocumented

"},"Classes/FailureMessage.html":{"name":"FailureMessage","abstract":"

Encapsulates the failure message that matchers can report to the end user.

"},"Classes/NMBPredicate.html":{"name":"NMBPredicate","abstract":"

Undocumented

"},"Classes/NMBObjCBeCloseToPredicate.html":{"name":"NMBObjCBeCloseToPredicate","abstract":"

Undocumented

"},"Classes/NMBPredicateResult.html":{"name":"NMBPredicateResult","abstract":"

Undocumented

"},"Classes/NMBPredicateStatus.html":{"name":"NMBPredicateStatus","abstract":"

Undocumented

"},"Classes/NMBObjCRaiseExceptionPredicate.html":{"name":"NMBObjCRaiseExceptionPredicate","abstract":"

Undocumented

"},"Classes.html#/BadInstructionException":{"name":"BadInstructionException","abstract":"

Without Mach exceptions or the Objective-C runtime, there’s nothing to put in the exception object. It’s really just a boolean – either a SIGILL was caught or not.

"},"Classes/SourceLocation.html":{"name":"SourceLocation","abstract":"

Undocumented

"},"Classes/NMBStringer.html":{"name":"NMBStringer","abstract":"

Undocumented

"},"Classes.html":{"name":"Classes","abstract":"

The following classes are available globally.

"},"Global%20Variables.html":{"name":"Global Variables","abstract":"

The following global variables are available globally.

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Extensions.html":{"name":"Extensions","abstract":"

The following extensions are available globally.

"},"Functions.html":{"name":"Functions","abstract":"

The following functions are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"},"Typealiases.html":{"name":"Type Aliases","abstract":"

The following type aliases are available globally.

"}} \ No newline at end of file diff --git a/docs/docsets/Nimble.docset/Contents/Resources/docSet.dsidx b/docs/docsets/Nimble.docset/Contents/Resources/docSet.dsidx new file mode 100644 index 000000000..608096cf0 Binary files /dev/null and b/docs/docsets/Nimble.docset/Contents/Resources/docSet.dsidx differ diff --git a/docs/docsets/Nimble.tgz b/docs/docsets/Nimble.tgz new file mode 100644 index 000000000..7b068253a Binary files /dev/null and b/docs/docsets/Nimble.tgz differ diff --git a/docs/img/carat.png b/docs/img/carat.png new file mode 100755 index 000000000..29d2f7fd4 Binary files /dev/null and b/docs/img/carat.png differ diff --git a/docs/img/dash.png b/docs/img/dash.png new file mode 100755 index 000000000..6f694c7a0 Binary files /dev/null and b/docs/img/dash.png differ diff --git a/docs/img/gh.png b/docs/img/gh.png new file mode 100755 index 000000000..628da97c7 Binary files /dev/null and b/docs/img/gh.png differ diff --git a/docs/img/spinner.gif b/docs/img/spinner.gif new file mode 100644 index 000000000..e3038d0a4 Binary files /dev/null and b/docs/img/spinner.gif differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..26755f76f --- /dev/null +++ b/docs/index.html @@ -0,0 +1,2361 @@ + + + + Nimble Reference + + + + + + + + + + + + +
+
+

Nimble 10.0.0 Docs (46% documented)

+

GitHubView on GitHub

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +

Nimble

+ +

Build Status +CocoaPods +Carthage Compatible +Platforms

+ +

Use Nimble to express the expected outcomes of Swift +or Objective-C expressions. Inspired by +Cedar.

+
// Swift
+expect(1 + 1).to(equal(2))
+expect(1.2).to(beCloseTo(1.1, within: 0.1))
+expect(3) > 2
+expect("seahorse").to(contain("sea"))
+expect(["Atlantic", "Pacific"]).toNot(contain("Mississippi"))
+expect(ocean.isClean).toEventually(beTruthy())
+
+

How to Use Nimble

+ + + + + +

Table of Contents generated with DocToc

+ + + + +

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
+
+XCTAssertEqual(1 + 1, 2, "expected one plus one to equal two")
+
+ +

Or, in Objective-C:

+
// 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. +
  3. It’s hard to write asynchronous tests. XCTest forces you to write +a lot of boilerplate code.
  4. +
+ +

Nimble addresses these concerns.

+

Nimble: Expectations Using expect(...).to

+ +

Nimble allows you to express expectations using a natural, +easily understood language:

+
// Swift
+
+import Nimble
+
+expect(seagull.squawk).to(equal("Squee!"))
+
+
// Objective-C
+
+@import Nimble;
+
+expect(seagull.squawk).to(equal(@"Squee!"));
+
+ +
+

The expect function autocompletes to include file: and line:, + but these parameters are optional. Use the default values to have + Xcode highlight the correct line when an expectation is not met.

+
+ +

To perform the opposite expectation–to assert something is not +equal–use toNot or notTo:

+
// Swift
+
+import Nimble
+
+expect(seagull.squawk).toNot(equal("Oh, hello there!"))
+expect(seagull.squawk).notTo(equal("Oh, hello there!"))
+
+
// Objective-C
+
+@import Nimble;
+
+expect(seagull.squawk).toNot(equal(@"Oh, hello there!"));
+expect(seagull.squawk).notTo(equal(@"Oh, hello there!"));
+
+

Custom Failure Messages

+ +

Would you like to add more information to the test’s failure messages? Use the description optional argument to add your own text:

+
// Swift
+
+expect(1 + 1).to(equal(3))
+// failed - expected to equal <3>, got <2>
+
+expect(1 + 1).to(equal(3), description: "Make sure libKindergartenMath is loaded")
+// failed - Make sure libKindergartenMath is loaded
+// expected to equal <3>, got <2>
+
+ +

Or the *WithDescription version in Objective-C:

+
// Objective-C
+
+@import Nimble;
+
+expect(@(1+1)).to(equal(@3));
+// failed - expected to equal <3.0000>, got <2.0000>
+
+expect(@(1+1)).toWithDescription(equal(@3), @"Make sure libKindergartenMath is loaded");
+// failed - Make sure libKindergartenMath is loaded
+// expected to equal <3.0000>, got <2.0000>
+
+

Type Safety

+ +

Nimble makes sure you don’t compare two types that don’t match:

+
// Swift
+
+// 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
+
+// Passes if squawk does not equal "Hi!":
+expect(seagull.squawk) != "Hi!"
+
+// Passes if 10 is greater than 2:
+expect(10) > 2
+
+ +
+

Operator overloads are only available in Swift, so you won’t be able + to use this syntax in Objective-C. :broken_heart:

+
+

Lazily Computed Values

+ +

The expect function doesn’t evaluate the value it’s given until it’s +time to match. So Nimble can test whether an expression raises an +exception once evaluated:

+
// Swift
+
+// Note: Swift currently doesn't have exceptions.
+//       Only Objective-C code can raise exceptions
+//       that Nimble will catch.
+//       (see https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)
+let exception = NSException(
+    name: NSInternalInconsistencyException,
+    reason: "Not enough fish in the sea.",
+    userInfo: ["something": "is fishy"])
+expect { exception.raise() }.to(raiseException())
+
+// Also, you can customize raiseException to be more specific
+expect { exception.raise() }.to(raiseException(named: NSInternalInconsistencyException))
+expect { exception.raise() }.to(raiseException(
+    named: NSInternalInconsistencyException,
+    reason: "Not enough fish in the sea"))
+expect { exception.raise() }.to(raiseException(
+    named: NSInternalInconsistencyException,
+    reason: "Not enough fish in the sea",
+    userInfo: ["something": "is fishy"]))
+
+ +

Objective-C works the same way, but you must use the expectAction +macro when making an expectation on an expression that has no return +value:

+
// Objective-C
+
+NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException
+                                                 reason:@"Not enough fish in the sea."
+                                               userInfo:nil];
+expectAction(^{ [exception raise]; }).to(raiseException());
+
+// Use the property-block syntax to be more specific.
+expectAction(^{ [exception raise]; }).to(raiseException().named(NSInternalInconsistencyException));
+expectAction(^{ [exception raise]; }).to(raiseException().
+    named(NSInternalInconsistencyException).
+    reason("Not enough fish in the sea"));
+expectAction(^{ [exception raise]; }).to(raiseException().
+    named(NSInternalInconsistencyException).
+    reason("Not enough fish in the sea").
+    userInfo(@{@"something": @"is fishy"}));
+
+// You can also pass a block for custom matching of the raised exception
+expectAction(exception.raise()).to(raiseException().satisfyingBlock(^(NSException *exception) {
+    expect(exception.name).to(beginWith(NSInternalInconsistencyException));
+}));
+
+

C Primitives

+ +

Some testing frameworks make it hard to test primitive C values. +In Nimble, it just works:

+
// Swift
+
+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
+
+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:

+
+
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
+DispatchQueue.main.async {
+    ocean.add("dolphins")
+    ocean.add("whales")
+}
+expect(ocean).toEventually(contain("dolphins", "whales"))
+
+
// Objective-C
+
+dispatch_async(dispatch_get_main_queue(), ^{
+    [ocean add:@"dolphins"];
+    [ocean add:@"whales"];
+});
+expect(ocean).toEventually(contain(@"dolphins", @"whales"));
+
+ +

Note: toEventually triggers its polls on the main thread. Blocking the main +thread will cause Nimble to stop the run loop. This can cause test pollution +for whatever incomplete code that was running on the main thread. Blocking the +main thread can be caused by blocking IO, calls to sleep(), deadlocks, and +synchronous IPC.

+ +

In the above example, ocean is constantly re-evaluated. If it ever +contains dolphins and whales, the expectation passes. If ocean still +doesn’t contain them, even after being continuously re-evaluated for one +whole second, the expectation fails.

+ +

You can also test that a value always or never matches throughout the length of the timeout. Use toNever and toAlways for this:

+
// Swift
+ocean.add("dolphins")
+expect(ocean).toAlways(contain("dolphins"))
+expect(ocean).toNever(contain("hares"))
+
+
// Objective-C
+[ocean add:@"dolphins"]
+expect(ocean).toAlways(contain(@"dolphins"))
+expect(ocean).toNever(contain(@"hares"))
+
+ +

Sometimes it takes more than a second for a value to update. In those +cases, use the timeout parameter:

+
// Swift
+
+// Waits three seconds for ocean to contain "starfish":
+expect(ocean).toEventually(contain("starfish"), timeout: .seconds(3))
+
+// Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds.
+expect(someValue).toEventually(equal(100), timeout: .milliseconds(5500), pollInterval: .milliseconds(200))
+
+
// 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
+
+waitUntil { done in
+    ocean.goFish { success in
+        expect(success).to(beTrue())
+        done()
+    }
+}
+
+
// Objective-C
+
+waitUntil(^(void (^done)(void)){
+    [ocean goFishWithHandler:^(BOOL success){
+        expect(success).to(beTrue());
+        done();
+    }];
+});
+
+ +

waitUntil also optionally takes a timeout parameter:

+
// Swift
+
+waitUntil(timeout: .seconds(10)) { done in
+    ocean.goFish { success in
+        expect(success).to(beTrue())
+        done()
+    }
+}
+
+
// Objective-C
+
+waitUntilTimeout(10, ^(void (^done)(void)){
+    [ocean goFishWithHandler:^(BOOL success){
+        expect(success).to(beTrue());
+        done();
+    }];
+});
+
+ +

Note: waitUntil triggers its timeout code on the main thread. Blocking the main +thread will cause Nimble to stop the run loop to continue. This can cause test +pollution for whatever incomplete code that was running on the main thread. +Blocking the main thread can be caused by blocking IO, calls to sleep(), +deadlocks, and synchronous IPC.

+ +

In some cases (e.g. when running on slower machines) it can be useful to modify +the default timeout and poll interval values. This can be done as follows:

+
// Swift
+
+// Increase the global timeout to 5 seconds:
+Nimble.AsyncDefaults.timeout = .seconds(5)
+
+// Slow the polling interval to 0.1 seconds:
+Nimble.AsyncDefaults.pollInterval = .milliseconds(100)
+
+

Objective-C Support

+ +

Nimble has full support for Objective-C. However, there are two things +to keep in mind when using Nimble in Objective-C:

+ +
    +
  1. All parameters passed to the expect function, as well as matcher +functions like equal, must be Objective-C objects or can be converted into +an NSObject equivalent:
  2. +
+
   // Objective-C
+
+   @import Nimble;
+
+   expect(@(1 + 1)).to(equal(@2));
+   expect(@"Hello world").to(contain(@"world"));
+
+   // Boxed as NSNumber *
+   expect(2).to(equal(2));
+   expect(1.2).to(beLessThan(2.0));
+   expect(true).to(beTruthy());
+
+   // Boxed as NSString *
+   expect("Hello world").to(equal("Hello world"));
+
+   // Boxed as NSRange
+   expect(NSMakeRange(1, 10)).to(equal(NSMakeRange(1, 10)));
+
+ +
    +
  1. To make an expectation on an expression that does not return a value, +such as -[NSException raise], use expectAction instead of +expect:
  2. +
+
   // Objective-C
+
+   expectAction(^{ [exception raise]; }).to(raiseException());
+
+ +

The following types are currently converted to an NSObject type:

+ +
    +
  • C Numeric types are converted to NSNumber *
  • +
  • NSRange is converted to NSValue *
  • +
  • char * is converted to NSString *
  • +
+ +

For the following matchers:

+ +
    +
  • equal
  • +
  • beGreaterThan
  • +
  • beGreaterThanOrEqual
  • +
  • beLessThan
  • +
  • beLessThanOrEqual
  • +
  • beCloseTo
  • +
  • beTrue
  • +
  • beFalse
  • +
  • beTruthy
  • +
  • beFalsy
  • +
  • haveCount
  • +
+ +

If you would like to see more, file an issue.

+

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:

+
#define NIMBLE_DISABLE_SHORT_SYNTAX 1
+
+@import Nimble;
+
+NMB_expect(^{ return seagull.squawk; }, __FILE__, __LINE__).to(NMB_equal(@"Squee!"));
+
+ +
+

Disabling the shorthand is useful if you’re testing functions with + names that conflict with Nimble functions, such as expect or + equal. If that’s not the case, there’s no point in disabling the + shorthand.

+
+

Built-in Matcher Functions

+ +

Nimble includes a wide variety of matcher functions.

+

Type Checking

+ +

Nimble supports checking the type membership of any kind of object, whether +Objective-C conformant or not:

+
// Swift
+
+protocol SomeProtocol{}
+class SomeClassConformingToProtocol: SomeProtocol{}
+struct SomeStructConformingToProtocol: SomeProtocol{}
+
+// The following tests pass
+expect(1).to(beAKindOf(Int.self))
+expect("turtle").to(beAKindOf(String.self))
+
+let classObject = SomeClassConformingToProtocol()
+expect(classObject).to(beAKindOf(SomeProtocol.self))
+expect(classObject).to(beAKindOf(SomeClassConformingToProtocol.self))
+expect(classObject).toNot(beAKindOf(SomeStructConformingToProtocol.self))
+
+let structObject = SomeStructConformingToProtocol()
+expect(structObject).to(beAKindOf(SomeProtocol.self))
+expect(structObject).to(beAKindOf(SomeStructConformingToProtocol.self))
+expect(structObject).toNot(beAKindOf(SomeClassConformingToProtocol.self))
+
+
// Objective-C
+
+// The following tests pass
+NSMutableArray *array = [NSMutableArray array];
+expect(array).to(beAKindOf([NSArray class]));
+expect(@1).toNot(beAKindOf([NSNull class]));
+
+ +

Objects can be tested for their exact types using the beAnInstanceOf matcher:

+
// Swift
+
+protocol SomeProtocol{}
+class SomeClassConformingToProtocol: SomeProtocol{}
+struct SomeStructConformingToProtocol: SomeProtocol{}
+
+// Unlike the 'beKindOf' matcher, the 'beAnInstanceOf' matcher only
+// passes if the object is the EXACT type requested. The following
+// tests pass -- note its behavior when working in an inheritance hierarchy.
+expect(1).to(beAnInstanceOf(Int.self))
+expect("turtle").to(beAnInstanceOf(String.self))
+
+let classObject = SomeClassConformingToProtocol()
+expect(classObject).toNot(beAnInstanceOf(SomeProtocol.self))
+expect(classObject).to(beAnInstanceOf(SomeClassConformingToProtocol.self))
+expect(classObject).toNot(beAnInstanceOf(SomeStructConformingToProtocol.self))
+
+let structObject = SomeStructConformingToProtocol()
+expect(structObject).toNot(beAnInstanceOf(SomeProtocol.self))
+expect(structObject).to(beAnInstanceOf(SomeStructConformingToProtocol.self))
+expect(structObject).toNot(beAnInstanceOf(SomeClassConformingToProtocol.self))
+
+

Equivalence

+
// Swift
+
+// 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
+
+
// 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
+
+// Passes if 'actual' has the same pointer address as 'expected':
+expect(actual).to(beIdenticalTo(expected))
+expect(actual) === expected
+
+// Passes if 'actual' does not have the same pointer address as 'expected':
+expect(actual).toNot(beIdenticalTo(expected))
+expect(actual) !== expected
+
+ +

It is important to remember that beIdenticalTo only makes sense when comparing +types with reference semantics, which have a notion of identity. In Swift, +that means types that are defined as a class.

+ +

This matcher will not work when comparing types with value semantics such as +those defined as a struct or enum. If you need to compare two value types, +consider what it means for instances of your type to be identical. This may mean +comparing individual properties or, if it makes sense to do so, conforming your type +to Equatable and using Nimble’s equivalence matchers instead.

+
// Objective-C
+
+// Passes if 'actual' has the same pointer address as 'expected':
+expect(actual).to(beIdenticalTo(expected));
+
+// Passes if 'actual' does not have the same pointer address as 'expected':
+expect(actual).toNot(beIdenticalTo(expected));
+
+

Comparisons

+
// Swift
+
+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
+
+
// 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
+
+expect(actual).to(beCloseTo(expected, within: delta))
+
+
// Objective-C
+
+expect(actual).to(beCloseTo(expected).within(delta));
+
+ +

For example, to assert that 10.01 is close to 10, you can write:

+
// Swift
+
+expect(10.01).to(beCloseTo(10, within: 0.1))
+
+
// Objective-C
+
+expect(@(10.01)).to(beCloseTo(@10).within(0.1));
+
+ +

There is also an operator shortcut available in 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
+
+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
+
+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 conform to FloatingPoint.

+
+

Types/Classes

+
// 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))
+
+
// 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
+
+expect(dolphin).to(beAKindOf(Mammal))
+
+
// Objective-C
+
+expect(dolphin).to(beAKindOf([Mammal class]));
+
+ +
+

beAnInstanceOf uses the -[NSObject isMemberOfClass:] method to + test membership. beAKindOf uses -[NSObject isKindOfClass:].

+
+

Truthiness

+
// Passes if 'actual' is not nil, true, or an object with a boolean value of true:
+expect(actual).to(beTruthy())
+
+// Passes if 'actual' is only true (not nil or an object conforming to Boolean true):
+expect(actual).to(beTrue())
+
+// Passes if 'actual' is nil, false, or an object with a boolean value of false:
+expect(actual).to(beFalsy())
+
+// Passes if 'actual' is only false (not nil or an object conforming to Boolean false):
+expect(actual).to(beFalse())
+
+// Passes if 'actual' is nil:
+expect(actual).to(beNil())
+
+
// Objective-C
+
+// Passes if 'actual' is not nil, true, or an object with a boolean value of true:
+expect(actual).to(beTruthy());
+
+// Passes if 'actual' is only true (not nil or an object conforming to Boolean true):
+expect(actual).to(beTrue());
+
+// Passes if 'actual' is nil, false, or an object with a boolean value of false:
+expect(actual).to(beFalsy());
+
+// Passes if 'actual' is only false (not nil or an object conforming to Boolean false):
+expect(actual).to(beFalse());
+
+// Passes if 'actual' is nil:
+expect(actual).to(beNil());
+
+

Swift Assertions

+ +

If you’re using Swift, you can use the throwAssertion matcher to check if an assertion is thrown (e.g. fatalError()). This is made possible by @mattgallagher’s CwlPreconditionTesting library.

+
// Swift
+
+// Passes if 'somethingThatThrows()' throws an assertion, 
+// such as by calling 'fatalError()' or if a precondition fails:
+expect { try somethingThatThrows() }.to(throwAssertion())
+expect { () -> Void in fatalError() }.to(throwAssertion())
+expect { precondition(false) }.to(throwAssertion())
+
+// Passes if throwing an NSError is not equal to throwing an assertion:
+expect { throw NSError(domain: "test", code: 0, userInfo: nil) }.toNot(throwAssertion())
+
+// Passes if the code after the precondition check is not run:
+var reachedPoint1 = false
+var reachedPoint2 = false
+expect {
+    reachedPoint1 = true
+    precondition(false, "condition message")
+    reachedPoint2 = true
+}.to(throwAssertion())
+
+expect(reachedPoint1) == true
+expect(reachedPoint2) == false
+
+ +

Notes:

+ +
    +
  • This feature is only available in Swift.
  • +
  • The tvOS simulator is supported, but using a different mechanism, requiring you to turn off the Debug executable scheme setting for your tvOS scheme’s Test configuration.
  • +
+

Swift Error Handling

+ +

You can use the throwError matcher to check if an error is thrown.

+
// Swift
+
+// Passes if 'somethingThatThrows()' throws an 'Error':
+expect { try somethingThatThrows() }.to(throwError())
+
+// Passes if 'somethingThatThrows()' throws an error within a particular domain:
+expect { try somethingThatThrows() }.to(throwError { (error: Error) in
+    expect(error._domain).to(equal(NSCocoaErrorDomain))
+})
+
+// Passes if 'somethingThatThrows()' throws a particular error enum case:
+expect { try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError))
+
+// Passes if 'somethingThatThrows()' throws an error of a particular type:
+expect { try somethingThatThrows() }.to(throwError(errorType: NimbleError.self))
+
+ +

When working directly with Error values, using the matchError matcher +allows you to perform certain checks on the error itself without having to +explicitly cast the error.

+ +

The matchError matcher allows you to check whether or not the error:

+ +
    +
  • is the same type of error you are expecting.
  • +
  • represents a particular error value that you are expecting.
  • +
+ +

This can be useful when using Result or Promise types, for example.

+
// Swift
+
+let actual: Error = ...
+
+// Passes if 'actual' represents any error value from the NimbleErrorEnum type:
+expect(actual).to(matchError(NimbleErrorEnum.self))
+
+// Passes if 'actual' represents the case 'timeout' from the NimbleErrorEnum type:
+expect(actual).to(matchError(NimbleErrorEnum.timeout))
+
+// Passes if 'actual' contains an NSError equal to the one provided:
+expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil)))
+
+ +

Note: This feature is only available in Swift.

+

Exceptions

+
// Swift
+
+// Passes if 'actual', when evaluated, raises an exception:
+expect(actual).to(raiseException())
+
+// Passes if 'actual' raises an exception with the given name:
+expect(actual).to(raiseException(named: name))
+
+// Passes if 'actual' raises an exception with the given name and reason:
+expect(actual).to(raiseException(named: name, reason: reason))
+
+// Passes if 'actual' raises an exception which passes expectations defined in the given closure:
+// (in this case, if the exception's name begins with "a r")
+expect { exception.raise() }.to(raiseException { (exception: NSException) in
+    expect(exception.name).to(beginWith("a r"))
+})
+
+
// Objective-C
+
+// Passes if 'actual', when evaluated, raises an exception:
+expect(actual).to(raiseException())
+
+// Passes if 'actual' raises an exception with the given name
+expect(actual).to(raiseException().named(name))
+
+// Passes if 'actual' raises an exception with the given name and reason:
+expect(actual).to(raiseException().named(name).reason(reason))
+
+// Passes if 'actual' raises an exception and it passes expectations defined in the given block:
+// (in this case, if name begins with "a r")
+expect(actual).to(raiseException().satisfyingBlock(^(NSException *exception) {
+    expect(exception.name).to(beginWith(@"a r"));
+}));
+
+ +

Note: Swift currently doesn’t have exceptions (see #220). +Only Objective-C code can raise exceptions that Nimble will catch.

+

Collection Membership

+
// Swift
+
+// Passes if all of the expected values are members of 'actual':
+expect(actual).to(contain(expected...))
+
+// Passes if 'actual' is empty (i.e. it contains no elements):
+expect(actual).to(beEmpty())
+
+
// Objective-C
+
+// Passes if expected is a member of 'actual':
+expect(actual).to(contain(expected));
+
+// Passes if 'actual' is empty (i.e. it contains no elements):
+expect(actual).to(beEmpty());
+
+ +
+

In Swift contain takes any number of arguments. The expectation + passes if all of them are members of the collection. In Objective-C, + contain only takes one argument for now.

+
+ +

For example, to assert that a list of sea creature names contains +“dolphin” and “starfish”:

+
// Swift
+
+expect(["whale", "dolphin", "starfish"]).to(contain("dolphin", "starfish"))
+
+
// 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
+
+// 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...))
+
+
// 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.

+ +

For code that returns collections of complex objects without a strict +ordering, there is the containElementSatisfying matcher:

+
// Swift
+
+struct Turtle {
+    let color: String
+}
+
+let turtles: [Turtle] = functionThatReturnsSomeTurtlesInAnyOrder()
+
+// This set of matchers passes regardless of whether the array is 
+// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]:
+
+expect(turtles).to(containElementSatisfying({ turtle in
+    return turtle.color == "green"
+}))
+expect(turtles).to(containElementSatisfying({ turtle in
+    return turtle.color == "blue"
+}, "that is a turtle with color 'blue'"))
+
+// The second matcher will incorporate the provided string in the error message
+// should it fail
+
+
// Objective-C
+
+@interface Turtle : NSObject
+@property (nonatomic, readonly, nonnull) NSString *color;
+@end
+
+@implementation Turtle 
+@end
+
+NSArray<Turtle *> * __nonnull turtles = functionThatReturnsSomeTurtlesInAnyOrder();
+
+// This set of matchers passes regardless of whether the array is 
+// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]:
+
+expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) {
+    return [[turtle color] isEqualToString:@"green"];
+}));
+expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) {
+    return [[turtle color] isEqualToString:@"blue"];
+}));
+
+ +

For asserting on if the given Comparable value is inside of a Range, use the beWithin matcher.

+
// Swift
+
+// Passes if 5 is within the range 1 through 10, inclusive
+expect(5).to(beWithin(1...10))
+
+// Passes if 5 is not within the range 2 through 4.
+expect(5).toNot(beWithin(2..<5))
+
+

Strings

+
// Swift
+
+// Passes if 'actual' contains 'substring':
+expect(actual).to(contain(substring))
+
+// Passes if 'actual' begins with 'prefix':
+expect(actual).to(beginWith(prefix))
+
+// Passes if 'actual' ends with 'suffix':
+expect(actual).to(endWith(suffix))
+
+// Passes if 'actual' represents the empty string, "":
+expect(actual).to(beEmpty())
+
+// Passes if 'actual' matches the regular expression defined in 'expected':
+expect(actual).to(match(expected))
+
+
// Objective-C
+
+// Passes if 'actual' contains 'substring':
+expect(actual).to(contain(expected));
+
+// Passes if 'actual' begins with 'prefix':
+expect(actual).to(beginWith(prefix));
+
+// Passes if 'actual' ends with 'suffix':
+expect(actual).to(endWith(suffix));
+
+// Passes if 'actual' represents the empty string, "":
+expect(actual).to(beEmpty());
+
+// Passes if 'actual' matches the regular expression defined in 'expected':
+expect(actual).to(match(expected))
+
+

Collection Elements

+ +

Nimble provides a means to check that all elements of a collection pass a given expectation.

+

Swift

+ +

In Swift, the collection must be an instance of a type conforming to +Sequence.

+
// Swift
+
+// Providing a custom function:
+expect([1, 2, 3, 4]).to(allPass { $0 < 5 })
+
+// Composing the expectation with another matcher:
+expect([1, 2, 3, 4]).to(allPass(beLessThan(5)))
+
+

Objective-C

+ +

In Objective-C, the collection must be an instance of a type which implements +the NSFastEnumeration protocol, and whose elements are instances of a type +which subclasses NSObject.

+ +

Additionally, unlike in Swift, there is no override to specify a custom +matcher function.

+
// Objective-C
+
+expect(@[@1, @2, @3, @4]).to(allPass(beLessThan(@5)));
+
+

Collection Count

+
// Swift
+
+// Passes if 'actual' contains the 'expected' number of elements:
+expect(actual).to(haveCount(expected))
+
+// Passes if 'actual' does _not_ contain the 'expected' number of elements:
+expect(actual).notTo(haveCount(expected))
+
+
// Objective-C
+
+// Passes if 'actual' contains the 'expected' number of elements:
+expect(actual).to(haveCount(expected))
+
+// Passes if 'actual' does _not_ contain the 'expected' number of elements:
+expect(actual).notTo(haveCount(expected))
+
+ +

For Swift, the actual value must be an instance of a type conforming to Collection. +For example, instances of Array, Dictionary, or Set.

+ +

For Objective-C, the actual value must be one of the following classes, or their subclasses:

+ +
    +
  • NSArray,
  • +
  • NSDictionary,
  • +
  • NSSet, or
  • +
  • NSHashTable.
  • +
+

Notifications

+
// Swift
+let testNotification = Notification(name: Notification.Name("Foo"), object: nil)
+
+// Passes if the closure in expect { ... } posts a notification to the default
+// notification center.
+expect {
+    NotificationCenter.default.post(testNotification)
+}.to(postNotifications(equal([testNotification])))
+
+// Passes if the closure in expect { ... } posts a notification to a given
+// notification center
+let notificationCenter = NotificationCenter()
+expect {
+    notificationCenter.post(testNotification)
+}.to(postNotifications(equal([testNotification]), from: notificationCenter))
+
+// Passes if the closure in expect { ... } posts a notification with the provided names to a given
+// notification center. Make sure to use this when running tests on Catalina, 
+// using DistributedNotificationCenter as there is currently no way 
+// of observing notifications without providing specific names.
+let distributedNotificationCenter = DistributedNotificationCenter()
+expect {
+    distributedNotificationCenter.post(testNotification)
+}.toEventually(postDistributedNotifications(equal([testNotification]),
+                                  from: distributedNotificationCenter,
+                                  names: [testNotification.name]))
+
+ +
+

This matcher is only available in Swift.

+
+

Result

+
// Swift
+let aResult: Result<String, Error> = .success("Hooray") 
+
+// passes if result is .success
+expect(aResult).to(beSuccess()) 
+
+// passes if result value is .success and validates Success value
+expect(aResult).to(beSuccess { value in
+    expect(value).to(equal("Hooray"))
+})
+
+
+enum AnError: Error {
+    case somethingHappened
+}
+let otherResult: Result<String, AnError> = .failure(.somethingHappened) 
+
+// passes if result is .failure
+expect(otherResult).to(beFailure()) 
+
+// passes if result value is .failure and validates error
+expect(otherResult).to(beFailure { error in
+    expect(error).to(matchError(AnError.somethingHappened))
+}) 
+
+ +
+

This matcher is only available in Swift.

+
+

Matching a value to any of a group of matchers

+
// Swift
+
+// passes if actual is either less than 10 or greater than 20
+expect(actual).to(satisfyAnyOf(beLessThan(10), beGreaterThan(20)))
+
+// can include any number of matchers -- the following will pass
+// **be careful** -- too many matchers can be the sign of an unfocused test
+expect(6).to(satisfyAnyOf(equal(2), equal(3), equal(4), equal(5), equal(6), equal(7)))
+
+// in Swift you also have the option to use the || operator to achieve a similar function
+expect(82).to(beLessThan(50) || beGreaterThan(80))
+
+
// Objective-C
+
+// passes if actual is either less than 10 or greater than 20
+expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20)))
+
+// can include any number of matchers -- the following will pass
+// **be careful** -- too many matchers can be the sign of an unfocused test
+expect(@6).to(satisfyAnyOf(equal(@2), equal(@3), equal(@4), equal(@5), equal(@6), equal(@7)))
+
+ +

Note: This matcher allows you to chain any number of matchers together. This provides flexibility, + but if you find yourself chaining many matchers together in one test, consider whether you + could instead refactor that single test into multiple, more precisely focused tests for + better coverage.

+

Custom Validation

+
// Swift
+
+// passes if .succeeded is returned from the closure
+expect {
+    guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else {
+        return .failed(reason: "wrong enum case")
+    }
+
+    return .succeeded
+}.to(succeed())
+
+// passes if .failed is returned from the closure
+expect {
+    guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else {
+        return .failed(reason: "wrong enum case")
+    }
+
+    return .succeeded
+}.notTo(succeed())
+
+ +

The String provided with .failed() is shown when the test fails.

+ +

When using toEventually() be careful not to make state changes or run process intensive code since this closure will be ran many times.

+

Writing Your Own Matchers

+ +

In Nimble, matchers are Swift functions that take an expected +value and return a Predicate closure. Take equal, for example:

+
// Swift
+
+public func equal<T: Equatable>(expectedValue: T?) -> Predicate<T> {
+    // Can be shortened to:
+    //   Predicate { actual in  ... }
+    //
+    // But shown with types here for clarity.
+    return Predicate { (actualExpression: Expression<T>) throws -> PredicateResult in
+        let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>")
+        if let actualValue = try actualExpression.evaluate() {
+            return PredicateResult(
+                bool: actualValue == expectedValue!,
+                message: msg
+            )
+        } else {
+            return PredicateResult(
+                status: .fail,
+                message: msg.appendedBeNilHint()
+            )
+        }
+    }
+}
+
+ +

The return value of a Predicate closure is a PredicateResult that indicates +whether the actual value matches the expectation and what error message to +display on failure.

+ +
+

The actual equal matcher function does not match when + expected are nil; the example above has been edited for brevity.

+
+ +

Since matchers are just Swift functions, you can define them anywhere: +at the top of your test file, in a file shared by all of your tests, or +in an Xcode project you distribute to others.

+ +
+

If you write a matcher you think everyone can use, consider adding it + to Nimble’s built-in set of matchers by sending a pull request! Or + distribute it yourself via GitHub.

+
+ +

For examples of how to write your own matchers, just check out the +Matchers directory +to see how Nimble’s built-in set of matchers are implemented. You can +also check out the tips below.

+

PredicateResult

+ +

PredicateResult is the return struct that Predicate return to indicate +success and failure. A PredicateResult is made up of two values: +PredicateStatus and ExpectationMessage.

+ +

Instead of a boolean, PredicateStatus captures a trinary set of values:

+
// Swift
+
+public enum PredicateStatus {
+// The predicate "passes" with the given expression
+// eg - expect(1).to(equal(1))
+case matches
+
+// The predicate "fails" with the given expression
+// eg - expect(1).toNot(equal(1))
+case doesNotMatch
+
+// The predicate never "passes" with the given expression, even if negated
+// eg - expect(nil as Int?).toNot(equal(1))
+case fail
+
+// ...
+}
+
+ +

Meanwhile, ExpectationMessage provides messaging semantics for error reporting.

+
// Swift
+
+public indirect enum ExpectationMessage {
+// Emits standard error message:
+// eg - "expected to <string>, got <actual>"
+case expectedActualValueTo(/* message: */ String)
+
+// Allows any free-form message
+// eg - "<string>"
+case fail(/* message: */ String)
+
+// ...
+}
+
+ +

Predicates should usually depend on either .expectedActualValueTo(..) or +.fail(..) when reporting errors. Special cases can be used for the other enum +cases.

+ +

Finally, if your Predicate utilizes other Predicates, you can utilize +.appended(details:) and .appended(message:) methods to annotate an existing +error with more details.

+ +

A common message to append is failing on nils. For that, .appendedBeNilHint() +can be used.

+

Lazy Evaluation

+ +

actualExpression is a lazy, memoized closure around the value provided to the +expect function. The expression can either be a closure or a value directly +passed to expect(...). In order to determine whether that value matches, +custom matchers should call actualExpression.evaluate():

+
// Swift
+
+public func beNil<T>() -> Predicate<T> {
+    // Predicate.simpleNilable(..) automatically generates ExpectationMessage for
+    // us based on the string we provide to it. Also, the 'Nilable' postfix indicates
+    // that this Predicate supports matching against nil actualExpressions, instead of
+    // always resulting in a PredicateStatus.fail result -- which is true for
+    // Predicate.simple(..)
+    return Predicate.simpleNilable("be nil") { actualExpression in
+        let actualValue = try actualExpression.evaluate()
+        return PredicateStatus(bool: actualValue == nil)
+    }
+}
+
+ +

In the above example, actualExpression is not nil – it is a closure +that returns a value. The value it returns, which is accessed via the +evaluate() method, may be nil. If that value is nil, the beNil +matcher function returns true, indicating that the expectation passed.

+

Type Checking via Swift Generics

+ +

Using Swift’s generics, matchers can constrain the type of the actual value +passed to the expect function by modifying the return type.

+ +

For example, the following matcher, haveDescription, only accepts actual +values that implement the Printable protocol. It checks their description +against the one provided to the matcher function, and passes if they are the same:

+
// Swift
+
+public func haveDescription(description: String) -> Predicate<Printable?> {
+    return Predicate.simple("have description") { actual in
+        return PredicateStatus(bool: actual.evaluate().description == description)
+    }
+}
+
+

Customizing Failure Messages

+ +

When using Predicate.simple(..) or Predicate.simpleNilable(..), Nimble +outputs the following failure message when an expectation fails:

+
// where `message` is the first string argument and
+// `actual` is the actual value received in `expect(..)`
+"expected to \(message), got <\(actual)>"
+
+ +

You can customize this message by modifying the way you create a Predicate.

+

Basic Customization

+ +

For slightly more complex error messaging, receive the created failure message +with Predicate.define(..):

+
// Swift
+
+public func equal<T: Equatable>(_ expectedValue: T?) -> Predicate<T> {
+    return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in
+        let actualValue = try actualExpression.evaluate()
+        let matches = actualValue == expectedValue && expectedValue != nil
+        if expectedValue == nil || actualValue == nil {
+            if expectedValue == nil && actualValue != nil {
+                return PredicateResult(
+                    status: .fail,
+                    message: msg.appendedBeNilHint()
+                )
+            }
+            return PredicateResult(status: .fail, message: msg)
+        }
+        return PredicateResult(bool: matches, message: msg)
+    }
+}
+
+ +

In the example above, msg is defined based on the string given to +Predicate.define. The code looks akin to:

+
// Swift
+
+let msg = ExpectationMessage.expectedActualValueTo("equal <\(stringify(expectedValue))>")
+
+

Full Customization

+ +

To fully customize the behavior of the Predicate, use the overload that expects +a PredicateResult to be returned.

+ +

Along with PredicateResult, there are other ExpectationMessage enum values you can use:

+
public indirect enum ExpectationMessage {
+// Emits standard error message:
+// eg - "expected to <message>, got <actual>"
+case expectedActualValueTo(/* message: */ String)
+
+// Allows any free-form message
+// eg - "<message>"
+case fail(/* message: */ String)
+
+// Emits standard error message with a custom actual value instead of the default.
+// eg - "expected to <message>, got <actual>"
+case expectedCustomValueTo(/* message: */ String, /* actual: */ String)
+
+// Emits standard error message without mentioning the actual value
+// eg - "expected to <message>"
+case expectedTo(/* message: */ String)
+
+// ...
+}
+
+ +

For matchers that compose other matchers, there are a handful of helper +functions to annotate messages.

+ +

appended(message: String) is used to append to the original failure message:

+
// produces "expected to be true, got <actual> (use beFalse() for inverse)"
+// appended message do show up inline in Xcode.
+.expectedActualValueTo("be true").appended(message: " (use beFalse() for inverse)")
+
+ +

For a more comprehensive message that spans multiple lines, use +appended(details: String) instead:

+
// produces "expected to be true, got <actual>\n\nuse beFalse() for inverse\nor use beNil()"
+// details do not show inline in Xcode, but do show up in test logs.
+.expectedActualValueTo("be true").appended(details: "use beFalse() for inverse\nor use beNil()")
+
+

Supporting Objective-C

+ +

To use a custom matcher written in Swift from Objective-C, you’ll have +to extend the NMBPredicate class, adding a new class method for your +custom matcher. The example below defines the class method ++[NMBPredicate beNilMatcher]:

+
// Swift
+
+extension NMBPredicate {
+    @objc public class func beNilMatcher() -> NMBPredicate {
+        return NMBPredicate { actualExpression in
+            return try beNil().satisfies(actualExpression).toObjectiveC()
+        }
+    }
+}
+
+ +

The above allows you to use the matcher from Objective-C:

+
// Objective-C
+
+expect(actual).to([NMBPredicate beNilMatcher]());
+
+ +

To make the syntax easier to use, define a C function that calls the +class method:

+
// Objective-C
+
+FOUNDATION_EXPORT NMBPredicate *beNil() {
+    return [NMBPredicate beNilMatcher];
+}
+
+

Properly Handling nil in Objective-C Matchers

+ +

When supporting Objective-C, make sure you handle nil appropriately. +Like Cedar, +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:

+
// 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 Predicate.define or Predicate.simple. +Using those factory methods will automatically generate expected value failure messages when they’re nil.

+
public func beginWith<S: Sequence>(_ startingElement: S.Element) -> Predicate<S> where S.Element: Equatable {
+    return Predicate.simple("begin with <\(startingElement)>") { actualExpression in
+        guard let actualValue = try actualExpression.evaluate() else { return .fail }
+
+        var actualGenerator = actualValue.makeIterator()
+        return PredicateStatus(bool: actualGenerator.next() == startingElement)
+    }
+}
+
+extension NMBPredicate {
+    @objc public class func beginWithMatcher(_ expected: Any) -> NMBPredicate {
+        return NMBPredicate { actualExpression in
+            let actual = try actualExpression.evaluate()
+            let expr = actualExpression.cast { $0 as? NMBOrderedCollection }
+            return try beginWith(expected).satisfies(expr).toObjectiveC()
+        }
+    }
+}
+
+

Migrating from the Old Matcher API

+ +

Previously (<7.0.0), Nimble supported matchers via the following types:

+ +
    +
  • Matcher
  • +
  • NonNilMatcherFunc
  • +
  • MatcherFunc
  • +
+ +

All of those types have been replaced by Predicate. The old API has been +removed completely in Nimble v10.

+

Installing Nimble

+ +
+

Nimble can be used on its own, or in conjunction with its sister + project, Quick. To install both + Quick and Nimble, follow the installation instructions in the Quick + Documentation.

+
+ +

Nimble can currently be installed in one of two ways: using CocoaPods, or with +git submodules.

+

Installing Nimble as a Submodule

+ +

To use Nimble as a submodule to test your macOS, iOS or tvOS applications, follow +these 4 easy steps:

+ +
    +
  1. Clone the Nimble repository
  2. +
  3. Add Nimble.xcodeproj to the Xcode workspace for your project
  4. +
  5. Link Nimble.framework to your test target
  6. +
  7. Start writing expectations!
  8. +
+ +

For more detailed instructions on each of these steps, +read How to Install Quick. +Ignore the steps involving adding Quick to your project in order to +install just Nimble.

+

Installing Nimble via CocoaPods

+ +

To use Nimble in CocoaPods to test your macOS, iOS or tvOS applications, add +Nimble to your podfile and add the use_frameworks! line to enable Swift +support for CocoaPods.

+
platform :ios, '8.0'
+
+source 'https://github.com/CocoaPods/Specs.git'
+
+# Whatever pods you need for your app go here
+
+target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do
+  use_frameworks!
+  pod 'Nimble'
+end
+
+ +

Finally run pod install.

+

Using Nimble without XCTest

+ +

Nimble is integrated with XCTest to allow it work well when used in Xcode test +bundles, however it can also be used in a standalone app. After installing +Nimble using one of the above methods, there are two additional steps required +to make this work.

+ +
    +
  1. Create a custom assertion handler and assign an instance of it to the +global NimbleAssertionHandler variable. For example:
  2. +
+
class MyAssertionHandler : AssertionHandler {
+    func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) {
+        if (!assertion) {
+            print("Expectation failed: \(message.stringValue)")
+        }
+    }
+}
+
+
// Somewhere before you use any assertions
+NimbleAssertionHandler = MyAssertionHandler()
+
+ +
    +
  1. Add a post-build action to fix an issue with the Swift XCTest support +library being unnecessarily copied into your app + +
      +
    • Edit your scheme in Xcode, and navigate to Build -> Post-actions
    • +
    • Click the “+” icon and select “New Run Script Action”
    • +
    • Open the “Provide build settings from” dropdown and select your target
    • +
    • Enter the following script contents: + +rm "${SWIFT_STDLIB_TOOL_DESTINATION_DIR}/libswiftXCTest.dylib" +
    • +
  2. +
+ +

You can now use Nimble assertions in your code and handle failures as you see +fit.

+ +
+
+ +
+
+ + diff --git a/docs/js/jazzy.js b/docs/js/jazzy.js new file mode 100755 index 000000000..198441660 --- /dev/null +++ b/docs/js/jazzy.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +function toggleItem($link, $content) { + var animationDuration = 300; + $link.toggleClass('token-open'); + $content.slideToggle(animationDuration); +} + +function itemLinkToContent($link) { + return $link.parent().parent().next(); +} + +// On doc load + hash-change, open any targetted item +function openCurrentItemIfClosed() { + if (window.jazzy.docset) { + return; + } + var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); + $content = itemLinkToContent($link); + if ($content.is(':hidden')) { + toggleItem($link, $content); + } +} + +$(openCurrentItemIfClosed); +$(window).on('hashchange', openCurrentItemIfClosed); + +// On item link ('token') click, toggle its discussion +$('.token').on('click', function(event) { + if (window.jazzy.docset) { + return; + } + var $link = $(this); + toggleItem($link, itemLinkToContent($link)); + + // Keeps the document from jumping to the hash. + var href = $link.attr('href'); + if (history.pushState) { + history.pushState({}, '', href); + } else { + location.hash = href; + } + event.preventDefault(); +}); + +// Clicks on links to the current, closed, item need to open the item +$("a:not('.token')").on('click', function() { + if (location == this.href) { + openCurrentItemIfClosed(); + } +}); + +// KaTeX rendering +if ("katex" in window) { + $($('.math').each( (_, element) => { + katex.render(element.textContent, element, { + displayMode: $(element).hasClass('m-block'), + throwOnError: false, + trust: true + }); + })) +} diff --git a/docs/js/jazzy.search.js b/docs/js/jazzy.search.js new file mode 100644 index 000000000..359cdbb8b --- /dev/null +++ b/docs/js/jazzy.search.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +$(function(){ + var $typeahead = $('[data-typeahead]'); + var $form = $typeahead.parents('form'); + var searchURL = $form.attr('action'); + + function displayTemplate(result) { + return result.name; + } + + function suggestionTemplate(result) { + var t = '
'; + t += '' + result.name + ''; + if (result.parent_name) { + t += '' + result.parent_name + ''; + } + t += '
'; + return t; + } + + $typeahead.one('focus', function() { + $form.addClass('loading'); + + $.getJSON(searchURL).then(function(searchData) { + const searchIndex = lunr(function() { + this.ref('url'); + this.field('name'); + this.field('abstract'); + for (const [url, doc] of Object.entries(searchData)) { + this.add({url: url, name: doc.name, abstract: doc.abstract}); + } + }); + + $typeahead.typeahead( + { + highlight: true, + minLength: 3, + autoselect: true + }, + { + limit: 10, + display: displayTemplate, + templates: { suggestion: suggestionTemplate }, + source: function(query, sync) { + const lcSearch = query.toLowerCase(); + const results = searchIndex.query(function(q) { + q.term(lcSearch, { boost: 100 }); + q.term(lcSearch, { + boost: 10, + wildcard: lunr.Query.wildcard.TRAILING + }); + }).map(function(result) { + var doc = searchData[result.ref]; + doc.url = result.ref; + return doc; + }); + sync(results); + } + } + ); + $form.removeClass('loading'); + $typeahead.trigger('focus'); + }); + }); + + var baseURL = searchURL.slice(0, -"search.json".length); + + $typeahead.on('typeahead:select', function(e, result) { + window.location = baseURL + result.url; + }); +}); diff --git a/docs/js/jquery.min.js b/docs/js/jquery.min.js new file mode 100644 index 000000000..c4c6022f2 --- /dev/null +++ b/docs/js/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/docs/js/typeahead.jquery.js b/docs/js/typeahead.jquery.js new file mode 100644 index 000000000..3a2d2ab03 --- /dev/null +++ b/docs/js/typeahead.jquery.js @@ -0,0 +1,1694 @@ +/*! + * typeahead.js 1.3.1 + * https://github.com/corejavascript/typeahead.js + * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT + */ + + +(function(root, factory) { + if (typeof define === "function" && define.amd) { + define([ "jquery" ], function(a0) { + return factory(a0); + }); + } else if (typeof module === "object" && module.exports) { + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +})(this, function($) { + var _ = function() { + "use strict"; + return { + isMsie: function() { + return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; + }, + isBlankString: function(str) { + return !str || /^\s*$/.test(str); + }, + escapeRegExChars: function(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }, + isString: function(obj) { + return typeof obj === "string"; + }, + isNumber: function(obj) { + return typeof obj === "number"; + }, + isArray: $.isArray, + isFunction: $.isFunction, + isObject: $.isPlainObject, + isUndefined: function(obj) { + return typeof obj === "undefined"; + }, + isElement: function(obj) { + return !!(obj && obj.nodeType === 1); + }, + isJQuery: function(obj) { + return obj instanceof $; + }, + toStr: function toStr(s) { + return _.isUndefined(s) || s === null ? "" : s + ""; + }, + bind: $.proxy, + each: function(collection, cb) { + $.each(collection, reverseArgs); + function reverseArgs(index, value) { + return cb(value, index); + } + }, + map: $.map, + filter: $.grep, + every: function(obj, test) { + var result = true; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (!(result = test.call(null, val, key, obj))) { + return false; + } + }); + return !!result; + }, + some: function(obj, test) { + var result = false; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (result = test.call(null, val, key, obj)) { + return false; + } + }); + return !!result; + }, + mixin: $.extend, + identity: function(x) { + return x; + }, + clone: function(obj) { + return $.extend(true, {}, obj); + }, + getIdGenerator: function() { + var counter = 0; + return function() { + return counter++; + }; + }, + templatify: function templatify(obj) { + return $.isFunction(obj) ? obj : template; + function template() { + return String(obj); + } + }, + defer: function(fn) { + setTimeout(fn, 0); + }, + debounce: function(func, wait, immediate) { + var timeout, result; + return function() { + var context = this, args = arguments, later, callNow; + later = function() { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + } + }; + callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + } + return result; + }; + }, + throttle: function(func, wait) { + var context, args, timeout, result, previous, later; + previous = 0; + later = function() { + previous = new Date(); + timeout = null; + result = func.apply(context, args); + }; + return function() { + var now = new Date(), remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + } else if (!timeout) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }, + stringify: function(val) { + return _.isString(val) ? val : JSON.stringify(val); + }, + guid: function() { + function _p8(s) { + var p = (Math.random().toString(16) + "000000000").substr(2, 8); + return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; + } + return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); + }, + noop: function() {} + }; + }(); + var WWW = function() { + "use strict"; + var defaultClassNames = { + wrapper: "twitter-typeahead", + input: "tt-input", + hint: "tt-hint", + menu: "tt-menu", + dataset: "tt-dataset", + suggestion: "tt-suggestion", + selectable: "tt-selectable", + empty: "tt-empty", + open: "tt-open", + cursor: "tt-cursor", + highlight: "tt-highlight" + }; + return build; + function build(o) { + var www, classes; + classes = _.mixin({}, defaultClassNames, o); + www = { + css: buildCss(), + classes: classes, + html: buildHtml(classes), + selectors: buildSelectors(classes) + }; + return { + css: www.css, + html: www.html, + classes: www.classes, + selectors: www.selectors, + mixin: function(o) { + _.mixin(o, www); + } + }; + } + function buildHtml(c) { + return { + wrapper: '', + menu: '
' + }; + } + function buildSelectors(classes) { + var selectors = {}; + _.each(classes, function(v, k) { + selectors[k] = "." + v; + }); + return selectors; + } + function buildCss() { + var css = { + wrapper: { + position: "relative", + display: "inline-block" + }, + hint: { + position: "absolute", + top: "0", + left: "0", + borderColor: "transparent", + boxShadow: "none", + opacity: "1" + }, + input: { + position: "relative", + verticalAlign: "top", + backgroundColor: "transparent" + }, + inputWithNoHint: { + position: "relative", + verticalAlign: "top" + }, + menu: { + position: "absolute", + top: "100%", + left: "0", + zIndex: "100", + display: "none" + }, + ltr: { + left: "0", + right: "auto" + }, + rtl: { + left: "auto", + right: " 0" + } + }; + if (_.isMsie()) { + _.mixin(css.input, { + backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" + }); + } + return css; + } + }(); + var EventBus = function() { + "use strict"; + var namespace, deprecationMap; + namespace = "typeahead:"; + deprecationMap = { + render: "rendered", + cursorchange: "cursorchanged", + select: "selected", + autocomplete: "autocompleted" + }; + function EventBus(o) { + if (!o || !o.el) { + $.error("EventBus initialized without el"); + } + this.$el = $(o.el); + } + _.mixin(EventBus.prototype, { + _trigger: function(type, args) { + var $e = $.Event(namespace + type); + this.$el.trigger.call(this.$el, $e, args || []); + return $e; + }, + before: function(type) { + var args, $e; + args = [].slice.call(arguments, 1); + $e = this._trigger("before" + type, args); + return $e.isDefaultPrevented(); + }, + trigger: function(type) { + var deprecatedType; + this._trigger(type, [].slice.call(arguments, 1)); + if (deprecatedType = deprecationMap[type]) { + this._trigger(deprecatedType, [].slice.call(arguments, 1)); + } + } + }); + return EventBus; + }(); + var EventEmitter = function() { + "use strict"; + var splitter = /\s+/, nextTick = getNextTick(); + return { + onSync: onSync, + onAsync: onAsync, + off: off, + trigger: trigger + }; + function on(method, types, cb, context) { + var type; + if (!cb) { + return this; + } + types = types.split(splitter); + cb = context ? bindContext(cb, context) : cb; + this._callbacks = this._callbacks || {}; + while (type = types.shift()) { + this._callbacks[type] = this._callbacks[type] || { + sync: [], + async: [] + }; + this._callbacks[type][method].push(cb); + } + return this; + } + function onAsync(types, cb, context) { + return on.call(this, "async", types, cb, context); + } + function onSync(types, cb, context) { + return on.call(this, "sync", types, cb, context); + } + function off(types) { + var type; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + while (type = types.shift()) { + delete this._callbacks[type]; + } + return this; + } + function trigger(types) { + var type, callbacks, args, syncFlush, asyncFlush; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + args = [].slice.call(arguments, 1); + while ((type = types.shift()) && (callbacks = this._callbacks[type])) { + syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); + asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); + syncFlush() && nextTick(asyncFlush); + } + return this; + } + function getFlush(callbacks, context, args) { + return flush; + function flush() { + var cancelled; + for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { + cancelled = callbacks[i].apply(context, args) === false; + } + return !cancelled; + } + } + function getNextTick() { + var nextTickFn; + if (window.setImmediate) { + nextTickFn = function nextTickSetImmediate(fn) { + setImmediate(function() { + fn(); + }); + }; + } else { + nextTickFn = function nextTickSetTimeout(fn) { + setTimeout(function() { + fn(); + }, 0); + }; + } + return nextTickFn; + } + function bindContext(fn, context) { + return fn.bind ? fn.bind(context) : function() { + fn.apply(context, [].slice.call(arguments, 0)); + }; + } + }(); + var highlight = function(doc) { + "use strict"; + var defaults = { + node: null, + pattern: null, + tagName: "strong", + className: null, + wordsOnly: false, + caseSensitive: false, + diacriticInsensitive: false + }; + var accented = { + A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", + B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", + C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", + D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", + E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", + F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", + G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", + H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", + I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", + J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", + K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", + L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", + M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", + N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", + O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", + P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", + Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", + R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", + S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", + T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", + U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", + V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", + W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", + X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", + Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", + Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" + }; + return function hightlight(o) { + var regex; + o = _.mixin({}, defaults, o); + if (!o.node || !o.pattern) { + return; + } + o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; + regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); + traverse(o.node, hightlightTextNode); + function hightlightTextNode(textNode) { + var match, patternNode, wrapperNode; + if (match = regex.exec(textNode.data)) { + wrapperNode = doc.createElement(o.tagName); + o.className && (wrapperNode.className = o.className); + patternNode = textNode.splitText(match.index); + patternNode.splitText(match[0].length); + wrapperNode.appendChild(patternNode.cloneNode(true)); + textNode.parentNode.replaceChild(wrapperNode, patternNode); + } + return !!match; + } + function traverse(el, hightlightTextNode) { + var childNode, TEXT_NODE_TYPE = 3; + for (var i = 0; i < el.childNodes.length; i++) { + childNode = el.childNodes[i]; + if (childNode.nodeType === TEXT_NODE_TYPE) { + i += hightlightTextNode(childNode) ? 1 : 0; + } else { + traverse(childNode, hightlightTextNode); + } + } + } + }; + function accent_replacer(chr) { + return accented[chr.toUpperCase()] || chr; + } + function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { + var escapedPatterns = [], regexStr; + for (var i = 0, len = patterns.length; i < len; i++) { + var escapedWord = _.escapeRegExChars(patterns[i]); + if (diacriticInsensitive) { + escapedWord = escapedWord.replace(/\S/g, accent_replacer); + } + escapedPatterns.push(escapedWord); + } + regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; + return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); + } + }(window.document); + var Input = function() { + "use strict"; + var specialKeyCodeMap; + specialKeyCodeMap = { + 9: "tab", + 27: "esc", + 37: "left", + 39: "right", + 13: "enter", + 38: "up", + 40: "down" + }; + function Input(o, www) { + var id; + o = o || {}; + if (!o.input) { + $.error("input is missing"); + } + www.mixin(this); + this.$hint = $(o.hint); + this.$input = $(o.input); + this.$menu = $(o.menu); + id = this.$input.attr("id") || _.guid(); + this.$menu.attr("id", id + "_listbox"); + this.$hint.attr({ + "aria-hidden": true + }); + this.$input.attr({ + "aria-owns": id + "_listbox", + role: "combobox", + "aria-autocomplete": "list", + "aria-expanded": false + }); + this.query = this.$input.val(); + this.queryWhenFocused = this.hasFocus() ? this.query : null; + this.$overflowHelper = buildOverflowHelper(this.$input); + this._checkLanguageDirection(); + if (this.$hint.length === 0) { + this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; + } + this.onSync("cursorchange", this._updateDescendent); + } + Input.normalizeQuery = function(str) { + return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); + }; + _.mixin(Input.prototype, EventEmitter, { + _onBlur: function onBlur() { + this.resetInputValue(); + this.trigger("blurred"); + }, + _onFocus: function onFocus() { + this.queryWhenFocused = this.query; + this.trigger("focused"); + }, + _onKeydown: function onKeydown($e) { + var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; + this._managePreventDefault(keyName, $e); + if (keyName && this._shouldTrigger(keyName, $e)) { + this.trigger(keyName + "Keyed", $e); + } + }, + _onInput: function onInput() { + this._setQuery(this.getInputValue()); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + _managePreventDefault: function managePreventDefault(keyName, $e) { + var preventDefault; + switch (keyName) { + case "up": + case "down": + preventDefault = !withModifier($e); + break; + + default: + preventDefault = false; + } + preventDefault && $e.preventDefault(); + }, + _shouldTrigger: function shouldTrigger(keyName, $e) { + var trigger; + switch (keyName) { + case "tab": + trigger = !withModifier($e); + break; + + default: + trigger = true; + } + return trigger; + }, + _checkLanguageDirection: function checkLanguageDirection() { + var dir = (this.$input.css("direction") || "ltr").toLowerCase(); + if (this.dir !== dir) { + this.dir = dir; + this.$hint.attr("dir", dir); + this.trigger("langDirChanged", dir); + } + }, + _setQuery: function setQuery(val, silent) { + var areEquivalent, hasDifferentWhitespace; + areEquivalent = areQueriesEquivalent(val, this.query); + hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; + this.query = val; + if (!silent && !areEquivalent) { + this.trigger("queryChanged", this.query); + } else if (!silent && hasDifferentWhitespace) { + this.trigger("whitespaceChanged", this.query); + } + }, + _updateDescendent: function updateDescendent(event, id) { + this.$input.attr("aria-activedescendant", id); + }, + bind: function() { + var that = this, onBlur, onFocus, onKeydown, onInput; + onBlur = _.bind(this._onBlur, this); + onFocus = _.bind(this._onFocus, this); + onKeydown = _.bind(this._onKeydown, this); + onInput = _.bind(this._onInput, this); + this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); + if (!_.isMsie() || _.isMsie() > 9) { + this.$input.on("input.tt", onInput); + } else { + this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { + if (specialKeyCodeMap[$e.which || $e.keyCode]) { + return; + } + _.defer(_.bind(that._onInput, that, $e)); + }); + } + return this; + }, + focus: function focus() { + this.$input.focus(); + }, + blur: function blur() { + this.$input.blur(); + }, + getLangDir: function getLangDir() { + return this.dir; + }, + getQuery: function getQuery() { + return this.query || ""; + }, + setQuery: function setQuery(val, silent) { + this.setInputValue(val); + this._setQuery(val, silent); + }, + hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { + return this.query !== this.queryWhenFocused; + }, + getInputValue: function getInputValue() { + return this.$input.val(); + }, + setInputValue: function setInputValue(value) { + this.$input.val(value); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + resetInputValue: function resetInputValue() { + this.setInputValue(this.query); + }, + getHint: function getHint() { + return this.$hint.val(); + }, + setHint: function setHint(value) { + this.$hint.val(value); + }, + clearHint: function clearHint() { + this.setHint(""); + }, + clearHintIfInvalid: function clearHintIfInvalid() { + var val, hint, valIsPrefixOfHint, isValid; + val = this.getInputValue(); + hint = this.getHint(); + valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; + isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); + !isValid && this.clearHint(); + }, + hasFocus: function hasFocus() { + return this.$input.is(":focus"); + }, + hasOverflow: function hasOverflow() { + var constraint = this.$input.width() - 2; + this.$overflowHelper.text(this.getInputValue()); + return this.$overflowHelper.width() >= constraint; + }, + isCursorAtEnd: function() { + var valueLength, selectionStart, range; + valueLength = this.$input.val().length; + selectionStart = this.$input[0].selectionStart; + if (_.isNumber(selectionStart)) { + return selectionStart === valueLength; + } else if (document.selection) { + range = document.selection.createRange(); + range.moveStart("character", -valueLength); + return valueLength === range.text.length; + } + return true; + }, + destroy: function destroy() { + this.$hint.off(".tt"); + this.$input.off(".tt"); + this.$overflowHelper.remove(); + this.$hint = this.$input = this.$overflowHelper = $("
"); + }, + setAriaExpanded: function setAriaExpanded(value) { + this.$input.attr("aria-expanded", value); + } + }); + return Input; + function buildOverflowHelper($input) { + return $('').css({ + position: "absolute", + visibility: "hidden", + whiteSpace: "pre", + fontFamily: $input.css("font-family"), + fontSize: $input.css("font-size"), + fontStyle: $input.css("font-style"), + fontVariant: $input.css("font-variant"), + fontWeight: $input.css("font-weight"), + wordSpacing: $input.css("word-spacing"), + letterSpacing: $input.css("letter-spacing"), + textIndent: $input.css("text-indent"), + textRendering: $input.css("text-rendering"), + textTransform: $input.css("text-transform") + }).insertAfter($input); + } + function areQueriesEquivalent(a, b) { + return Input.normalizeQuery(a) === Input.normalizeQuery(b); + } + function withModifier($e) { + return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; + } + }(); + var Dataset = function() { + "use strict"; + var keys, nameGenerator; + keys = { + dataset: "tt-selectable-dataset", + val: "tt-selectable-display", + obj: "tt-selectable-object" + }; + nameGenerator = _.getIdGenerator(); + function Dataset(o, www) { + o = o || {}; + o.templates = o.templates || {}; + o.templates.notFound = o.templates.notFound || o.templates.empty; + if (!o.source) { + $.error("missing source"); + } + if (!o.node) { + $.error("missing node"); + } + if (o.name && !isValidName(o.name)) { + $.error("invalid dataset name: " + o.name); + } + www.mixin(this); + this.highlight = !!o.highlight; + this.name = _.toStr(o.name || nameGenerator()); + this.limit = o.limit || 5; + this.displayFn = getDisplayFn(o.display || o.displayKey); + this.templates = getTemplates(o.templates, this.displayFn); + this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; + this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; + this._resetLastSuggestion(); + this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); + } + Dataset.extractData = function extractData(el) { + var $el = $(el); + if ($el.data(keys.obj)) { + return { + dataset: $el.data(keys.dataset) || "", + val: $el.data(keys.val) || "", + obj: $el.data(keys.obj) || null + }; + } + return null; + }; + _.mixin(Dataset.prototype, EventEmitter, { + _overwrite: function overwrite(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (this.async && this.templates.pending) { + this._renderPending(query); + } else if (!this.async && this.templates.notFound) { + this._renderNotFound(query); + } else { + this._empty(); + } + this.trigger("rendered", suggestions, false, this.name); + }, + _append: function append(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length && this.$lastSuggestion.length) { + this._appendSuggestions(query, suggestions); + } else if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (!this.$lastSuggestion.length && this.templates.notFound) { + this._renderNotFound(query); + } + this.trigger("rendered", suggestions, true, this.name); + }, + _renderSuggestions: function renderSuggestions(query, suggestions) { + var $fragment; + $fragment = this._getSuggestionsFragment(query, suggestions); + this.$lastSuggestion = $fragment.children().last(); + this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); + }, + _appendSuggestions: function appendSuggestions(query, suggestions) { + var $fragment, $lastSuggestion; + $fragment = this._getSuggestionsFragment(query, suggestions); + $lastSuggestion = $fragment.children().last(); + this.$lastSuggestion.after($fragment); + this.$lastSuggestion = $lastSuggestion; + }, + _renderPending: function renderPending(query) { + var template = this.templates.pending; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _renderNotFound: function renderNotFound(query) { + var template = this.templates.notFound; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _empty: function empty() { + this.$el.empty(); + this._resetLastSuggestion(); + }, + _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { + var that = this, fragment; + fragment = document.createDocumentFragment(); + _.each(suggestions, function getSuggestionNode(suggestion) { + var $el, context; + context = that._injectQuery(query, suggestion); + $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); + fragment.appendChild($el[0]); + }); + this.highlight && highlight({ + className: this.classes.highlight, + node: fragment, + pattern: query + }); + return $(fragment); + }, + _getFooter: function getFooter(query, suggestions) { + return this.templates.footer ? this.templates.footer({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _getHeader: function getHeader(query, suggestions) { + return this.templates.header ? this.templates.header({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _resetLastSuggestion: function resetLastSuggestion() { + this.$lastSuggestion = $(); + }, + _injectQuery: function injectQuery(query, obj) { + return _.isObject(obj) ? _.mixin({ + _query: query + }, obj) : obj; + }, + update: function update(query) { + var that = this, canceled = false, syncCalled = false, rendered = 0; + this.cancel(); + this.cancel = function cancel() { + canceled = true; + that.cancel = $.noop; + that.async && that.trigger("asyncCanceled", query, that.name); + }; + this.source(query, sync, async); + !syncCalled && sync([]); + function sync(suggestions) { + if (syncCalled) { + return; + } + syncCalled = true; + suggestions = (suggestions || []).slice(0, that.limit); + rendered = suggestions.length; + that._overwrite(query, suggestions); + if (rendered < that.limit && that.async) { + that.trigger("asyncRequested", query, that.name); + } + } + function async(suggestions) { + suggestions = suggestions || []; + if (!canceled && rendered < that.limit) { + that.cancel = $.noop; + var idx = Math.abs(rendered - that.limit); + rendered += idx; + that._append(query, suggestions.slice(0, idx)); + that.async && that.trigger("asyncReceived", query, that.name); + } + } + }, + cancel: $.noop, + clear: function clear() { + this._empty(); + this.cancel(); + this.trigger("cleared"); + }, + isEmpty: function isEmpty() { + return this.$el.is(":empty"); + }, + destroy: function destroy() { + this.$el = $("
"); + } + }); + return Dataset; + function getDisplayFn(display) { + display = display || _.stringify; + return _.isFunction(display) ? display : displayFn; + function displayFn(obj) { + return obj[display]; + } + } + function getTemplates(templates, displayFn) { + return { + notFound: templates.notFound && _.templatify(templates.notFound), + pending: templates.pending && _.templatify(templates.pending), + header: templates.header && _.templatify(templates.header), + footer: templates.footer && _.templatify(templates.footer), + suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate + }; + function userSuggestionTemplate(context) { + var template = templates.suggestion; + return $(template(context)).attr("id", _.guid()); + } + function suggestionTemplate(context) { + return $('
').attr("id", _.guid()).text(displayFn(context)); + } + } + function isValidName(str) { + return /^[_a-zA-Z0-9-]+$/.test(str); + } + }(); + var Menu = function() { + "use strict"; + function Menu(o, www) { + var that = this; + o = o || {}; + if (!o.node) { + $.error("node is required"); + } + www.mixin(this); + this.$node = $(o.node); + this.query = null; + this.datasets = _.map(o.datasets, initializeDataset); + function initializeDataset(oDataset) { + var node = that.$node.find(oDataset.node).first(); + oDataset.node = node.length ? node : $("
").appendTo(that.$node); + return new Dataset(oDataset, www); + } + } + _.mixin(Menu.prototype, EventEmitter, { + _onSelectableClick: function onSelectableClick($e) { + this.trigger("selectableClicked", $($e.currentTarget)); + }, + _onRendered: function onRendered(type, dataset, suggestions, async) { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetRendered", dataset, suggestions, async); + }, + _onCleared: function onCleared() { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetCleared"); + }, + _propagate: function propagate() { + this.trigger.apply(this, arguments); + }, + _allDatasetsEmpty: function allDatasetsEmpty() { + return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { + var isEmpty = dataset.isEmpty(); + this.$node.attr("aria-expanded", !isEmpty); + return isEmpty; + }, this)); + }, + _getSelectables: function getSelectables() { + return this.$node.find(this.selectors.selectable); + }, + _removeCursor: function _removeCursor() { + var $selectable = this.getActiveSelectable(); + $selectable && $selectable.removeClass(this.classes.cursor); + }, + _ensureVisible: function ensureVisible($el) { + var elTop, elBottom, nodeScrollTop, nodeHeight; + elTop = $el.position().top; + elBottom = elTop + $el.outerHeight(true); + nodeScrollTop = this.$node.scrollTop(); + nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); + if (elTop < 0) { + this.$node.scrollTop(nodeScrollTop + elTop); + } else if (nodeHeight < elBottom) { + this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); + } + }, + bind: function() { + var that = this, onSelectableClick; + onSelectableClick = _.bind(this._onSelectableClick, this); + this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); + this.$node.on("mouseover", this.selectors.selectable, function() { + that.setCursor($(this)); + }); + this.$node.on("mouseleave", function() { + that._removeCursor(); + }); + _.each(this.datasets, function(dataset) { + dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); + }); + return this; + }, + isOpen: function isOpen() { + return this.$node.hasClass(this.classes.open); + }, + open: function open() { + this.$node.scrollTop(0); + this.$node.addClass(this.classes.open); + }, + close: function close() { + this.$node.attr("aria-expanded", false); + this.$node.removeClass(this.classes.open); + this._removeCursor(); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.attr("dir", dir); + }, + selectableRelativeToCursor: function selectableRelativeToCursor(delta) { + var $selectables, $oldCursor, oldIndex, newIndex; + $oldCursor = this.getActiveSelectable(); + $selectables = this._getSelectables(); + oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; + newIndex = oldIndex + delta; + newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; + newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; + return newIndex === -1 ? null : $selectables.eq(newIndex); + }, + setCursor: function setCursor($selectable) { + this._removeCursor(); + if ($selectable = $selectable && $selectable.first()) { + $selectable.addClass(this.classes.cursor); + this._ensureVisible($selectable); + } + }, + getSelectableData: function getSelectableData($el) { + return $el && $el.length ? Dataset.extractData($el) : null; + }, + getActiveSelectable: function getActiveSelectable() { + var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); + return $selectable.length ? $selectable : null; + }, + getTopSelectable: function getTopSelectable() { + var $selectable = this._getSelectables().first(); + return $selectable.length ? $selectable : null; + }, + update: function update(query) { + var isValidUpdate = query !== this.query; + if (isValidUpdate) { + this.query = query; + _.each(this.datasets, updateDataset); + } + return isValidUpdate; + function updateDataset(dataset) { + dataset.update(query); + } + }, + empty: function empty() { + _.each(this.datasets, clearDataset); + this.query = null; + this.$node.addClass(this.classes.empty); + function clearDataset(dataset) { + dataset.clear(); + } + }, + destroy: function destroy() { + this.$node.off(".tt"); + this.$node = $("
"); + _.each(this.datasets, destroyDataset); + function destroyDataset(dataset) { + dataset.destroy(); + } + } + }); + return Menu; + }(); + var Status = function() { + "use strict"; + function Status(options) { + this.$el = $("", { + role: "status", + "aria-live": "polite" + }).css({ + position: "absolute", + padding: "0", + border: "0", + height: "1px", + width: "1px", + "margin-bottom": "-1px", + "margin-right": "-1px", + overflow: "hidden", + clip: "rect(0 0 0 0)", + "white-space": "nowrap" + }); + options.$input.after(this.$el); + _.each(options.menu.datasets, _.bind(function(dataset) { + if (dataset.onSync) { + dataset.onSync("rendered", _.bind(this.update, this)); + dataset.onSync("cleared", _.bind(this.cleared, this)); + } + }, this)); + } + _.mixin(Status.prototype, { + update: function update(event, suggestions) { + var length = suggestions.length; + var words; + if (length === 1) { + words = { + result: "result", + is: "is" + }; + } else { + words = { + result: "results", + is: "are" + }; + } + this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); + }, + cleared: function() { + this.$el.text(""); + } + }); + return Status; + }(); + var DefaultMenu = function() { + "use strict"; + var s = Menu.prototype; + function DefaultMenu() { + Menu.apply(this, [].slice.call(arguments, 0)); + } + _.mixin(DefaultMenu.prototype, Menu.prototype, { + open: function open() { + !this._allDatasetsEmpty() && this._show(); + return s.open.apply(this, [].slice.call(arguments, 0)); + }, + close: function close() { + this._hide(); + return s.close.apply(this, [].slice.call(arguments, 0)); + }, + _onRendered: function onRendered() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onRendered.apply(this, [].slice.call(arguments, 0)); + }, + _onCleared: function onCleared() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onCleared.apply(this, [].slice.call(arguments, 0)); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); + return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); + }, + _hide: function hide() { + this.$node.hide(); + }, + _show: function show() { + this.$node.css("display", "block"); + } + }); + return DefaultMenu; + }(); + var Typeahead = function() { + "use strict"; + function Typeahead(o, www) { + var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; + o = o || {}; + if (!o.input) { + $.error("missing input"); + } + if (!o.menu) { + $.error("missing menu"); + } + if (!o.eventBus) { + $.error("missing event bus"); + } + www.mixin(this); + this.eventBus = o.eventBus; + this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; + this.input = o.input; + this.menu = o.menu; + this.enabled = true; + this.autoselect = !!o.autoselect; + this.active = false; + this.input.hasFocus() && this.activate(); + this.dir = this.input.getLangDir(); + this._hacks(); + this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); + onFocused = c(this, "activate", "open", "_onFocused"); + onBlurred = c(this, "deactivate", "_onBlurred"); + onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); + onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); + onEscKeyed = c(this, "isActive", "_onEscKeyed"); + onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); + onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); + onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); + onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); + onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); + onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); + this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); + } + _.mixin(Typeahead.prototype, { + _hacks: function hacks() { + var $input, $menu; + $input = this.input.$input || $("
"); + $menu = this.menu.$node || $("
"); + $input.on("blur.tt", function($e) { + var active, isActive, hasActive; + active = document.activeElement; + isActive = $menu.is(active); + hasActive = $menu.has(active).length > 0; + if (_.isMsie() && (isActive || hasActive)) { + $e.preventDefault(); + $e.stopImmediatePropagation(); + _.defer(function() { + $input.focus(); + }); + } + }); + $menu.on("mousedown.tt", function($e) { + $e.preventDefault(); + }); + }, + _onSelectableClicked: function onSelectableClicked(type, $el) { + this.select($el); + }, + _onDatasetCleared: function onDatasetCleared() { + this._updateHint(); + }, + _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { + this._updateHint(); + if (this.autoselect) { + var cursorClass = this.selectors.cursor.substr(1); + this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); + } + this.eventBus.trigger("render", suggestions, async, dataset); + }, + _onAsyncRequested: function onAsyncRequested(type, dataset, query) { + this.eventBus.trigger("asyncrequest", query, dataset); + }, + _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { + this.eventBus.trigger("asynccancel", query, dataset); + }, + _onAsyncReceived: function onAsyncReceived(type, dataset, query) { + this.eventBus.trigger("asyncreceive", query, dataset); + }, + _onFocused: function onFocused() { + this._minLengthMet() && this.menu.update(this.input.getQuery()); + }, + _onBlurred: function onBlurred() { + if (this.input.hasQueryChangedSinceLastFocus()) { + this.eventBus.trigger("change", this.input.getQuery()); + } + }, + _onEnterKeyed: function onEnterKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + if (this.select($selectable)) { + $e.preventDefault(); + $e.stopPropagation(); + } + } else if (this.autoselect) { + if (this.select(this.menu.getTopSelectable())) { + $e.preventDefault(); + $e.stopPropagation(); + } + } + }, + _onTabKeyed: function onTabKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + this.select($selectable) && $e.preventDefault(); + } else if (this.autoselect) { + if ($selectable = this.menu.getTopSelectable()) { + this.autocomplete($selectable) && $e.preventDefault(); + } + } + }, + _onEscKeyed: function onEscKeyed() { + this.close(); + }, + _onUpKeyed: function onUpKeyed() { + this.moveCursor(-1); + }, + _onDownKeyed: function onDownKeyed() { + this.moveCursor(+1); + }, + _onLeftKeyed: function onLeftKeyed() { + if (this.dir === "rtl" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onRightKeyed: function onRightKeyed() { + if (this.dir === "ltr" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onQueryChanged: function onQueryChanged(e, query) { + this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); + }, + _onWhitespaceChanged: function onWhitespaceChanged() { + this._updateHint(); + }, + _onLangDirChanged: function onLangDirChanged(e, dir) { + if (this.dir !== dir) { + this.dir = dir; + this.menu.setLanguageDirection(dir); + } + }, + _openIfActive: function openIfActive() { + this.isActive() && this.open(); + }, + _minLengthMet: function minLengthMet(query) { + query = _.isString(query) ? query : this.input.getQuery() || ""; + return query.length >= this.minLength; + }, + _updateHint: function updateHint() { + var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; + $selectable = this.menu.getTopSelectable(); + data = this.menu.getSelectableData($selectable); + val = this.input.getInputValue(); + if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { + query = Input.normalizeQuery(val); + escapedQuery = _.escapeRegExChars(query); + frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); + match = frontMatchRegEx.exec(data.val); + match && this.input.setHint(val + match[1]); + } else { + this.input.clearHint(); + } + }, + isEnabled: function isEnabled() { + return this.enabled; + }, + enable: function enable() { + this.enabled = true; + }, + disable: function disable() { + this.enabled = false; + }, + isActive: function isActive() { + return this.active; + }, + activate: function activate() { + if (this.isActive()) { + return true; + } else if (!this.isEnabled() || this.eventBus.before("active")) { + return false; + } else { + this.active = true; + this.eventBus.trigger("active"); + return true; + } + }, + deactivate: function deactivate() { + if (!this.isActive()) { + return true; + } else if (this.eventBus.before("idle")) { + return false; + } else { + this.active = false; + this.close(); + this.eventBus.trigger("idle"); + return true; + } + }, + isOpen: function isOpen() { + return this.menu.isOpen(); + }, + open: function open() { + if (!this.isOpen() && !this.eventBus.before("open")) { + this.input.setAriaExpanded(true); + this.menu.open(); + this._updateHint(); + this.eventBus.trigger("open"); + } + return this.isOpen(); + }, + close: function close() { + if (this.isOpen() && !this.eventBus.before("close")) { + this.input.setAriaExpanded(false); + this.menu.close(); + this.input.clearHint(); + this.input.resetInputValue(); + this.eventBus.trigger("close"); + } + return !this.isOpen(); + }, + setVal: function setVal(val) { + this.input.setQuery(_.toStr(val)); + }, + getVal: function getVal() { + return this.input.getQuery(); + }, + select: function select($selectable) { + var data = this.menu.getSelectableData($selectable); + if (data && !this.eventBus.before("select", data.obj, data.dataset)) { + this.input.setQuery(data.val, true); + this.eventBus.trigger("select", data.obj, data.dataset); + this.close(); + return true; + } + return false; + }, + autocomplete: function autocomplete($selectable) { + var query, data, isValid; + query = this.input.getQuery(); + data = this.menu.getSelectableData($selectable); + isValid = data && query !== data.val; + if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { + this.input.setQuery(data.val); + this.eventBus.trigger("autocomplete", data.obj, data.dataset); + return true; + } + return false; + }, + moveCursor: function moveCursor(delta) { + var query, $candidate, data, suggestion, datasetName, cancelMove, id; + query = this.input.getQuery(); + $candidate = this.menu.selectableRelativeToCursor(delta); + data = this.menu.getSelectableData($candidate); + suggestion = data ? data.obj : null; + datasetName = data ? data.dataset : null; + id = $candidate ? $candidate.attr("id") : null; + this.input.trigger("cursorchange", id); + cancelMove = this._minLengthMet() && this.menu.update(query); + if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { + this.menu.setCursor($candidate); + if (data) { + if (typeof data.val === "string") { + this.input.setInputValue(data.val); + } + } else { + this.input.resetInputValue(); + this._updateHint(); + } + this.eventBus.trigger("cursorchange", suggestion, datasetName); + return true; + } + return false; + }, + destroy: function destroy() { + this.input.destroy(); + this.menu.destroy(); + } + }); + return Typeahead; + function c(ctx) { + var methods = [].slice.call(arguments, 1); + return function() { + var args = [].slice.call(arguments); + _.each(methods, function(method) { + return ctx[method].apply(ctx, args); + }); + }; + } + }(); + (function() { + "use strict"; + var old, keys, methods; + old = $.fn.typeahead; + keys = { + www: "tt-www", + attrs: "tt-attrs", + typeahead: "tt-typeahead" + }; + methods = { + initialize: function initialize(o, datasets) { + var www; + datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); + o = o || {}; + www = WWW(o.classNames); + return this.each(attach); + function attach() { + var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; + _.each(datasets, function(d) { + d.highlight = !!o.highlight; + }); + $input = $(this); + $wrapper = $(www.html.wrapper); + $hint = $elOrNull(o.hint); + $menu = $elOrNull(o.menu); + defaultHint = o.hint !== false && !$hint; + defaultMenu = o.menu !== false && !$menu; + defaultHint && ($hint = buildHintFromInput($input, www)); + defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); + $hint && $hint.val(""); + $input = prepInput($input, www); + if (defaultHint || defaultMenu) { + $wrapper.css(www.css.wrapper); + $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); + $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); + } + MenuConstructor = defaultMenu ? DefaultMenu : Menu; + eventBus = new EventBus({ + el: $input + }); + input = new Input({ + hint: $hint, + input: $input, + menu: $menu + }, www); + menu = new MenuConstructor({ + node: $menu, + datasets: datasets + }, www); + status = new Status({ + $input: $input, + menu: menu + }); + typeahead = new Typeahead({ + input: input, + menu: menu, + eventBus: eventBus, + minLength: o.minLength, + autoselect: o.autoselect + }, www); + $input.data(keys.www, www); + $input.data(keys.typeahead, typeahead); + } + }, + isEnabled: function isEnabled() { + var enabled; + ttEach(this.first(), function(t) { + enabled = t.isEnabled(); + }); + return enabled; + }, + enable: function enable() { + ttEach(this, function(t) { + t.enable(); + }); + return this; + }, + disable: function disable() { + ttEach(this, function(t) { + t.disable(); + }); + return this; + }, + isActive: function isActive() { + var active; + ttEach(this.first(), function(t) { + active = t.isActive(); + }); + return active; + }, + activate: function activate() { + ttEach(this, function(t) { + t.activate(); + }); + return this; + }, + deactivate: function deactivate() { + ttEach(this, function(t) { + t.deactivate(); + }); + return this; + }, + isOpen: function isOpen() { + var open; + ttEach(this.first(), function(t) { + open = t.isOpen(); + }); + return open; + }, + open: function open() { + ttEach(this, function(t) { + t.open(); + }); + return this; + }, + close: function close() { + ttEach(this, function(t) { + t.close(); + }); + return this; + }, + select: function select(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.select($el); + }); + return success; + }, + autocomplete: function autocomplete(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.autocomplete($el); + }); + return success; + }, + moveCursor: function moveCursoe(delta) { + var success = false; + ttEach(this.first(), function(t) { + success = t.moveCursor(delta); + }); + return success; + }, + val: function val(newVal) { + var query; + if (!arguments.length) { + ttEach(this.first(), function(t) { + query = t.getVal(); + }); + return query; + } else { + ttEach(this, function(t) { + t.setVal(_.toStr(newVal)); + }); + return this; + } + }, + destroy: function destroy() { + ttEach(this, function(typeahead, $input) { + revert($input); + typeahead.destroy(); + }); + return this; + } + }; + $.fn.typeahead = function(method) { + if (methods[method]) { + return methods[method].apply(this, [].slice.call(arguments, 1)); + } else { + return methods.initialize.apply(this, arguments); + } + }; + $.fn.typeahead.noConflict = function noConflict() { + $.fn.typeahead = old; + return this; + }; + function ttEach($els, fn) { + $els.each(function() { + var $input = $(this), typeahead; + (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); + }); + } + function buildHintFromInput($input, www) { + return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ + readonly: true, + required: false + }).removeAttr("id name placeholder").removeClass("required").attr({ + spellcheck: "false", + tabindex: -1 + }); + } + function prepInput($input, www) { + $input.data(keys.attrs, { + dir: $input.attr("dir"), + autocomplete: $input.attr("autocomplete"), + spellcheck: $input.attr("spellcheck"), + style: $input.attr("style") + }); + $input.addClass(www.classes.input).attr({ + spellcheck: false + }); + try { + !$input.attr("dir") && $input.attr("dir", "auto"); + } catch (e) {} + return $input; + } + function getBackgroundStyles($el) { + return { + backgroundAttachment: $el.css("background-attachment"), + backgroundClip: $el.css("background-clip"), + backgroundColor: $el.css("background-color"), + backgroundImage: $el.css("background-image"), + backgroundOrigin: $el.css("background-origin"), + backgroundPosition: $el.css("background-position"), + backgroundRepeat: $el.css("background-repeat"), + backgroundSize: $el.css("background-size") + }; + } + function revert($input) { + var www, $wrapper; + www = $input.data(keys.www); + $wrapper = $input.parent().filter(www.selectors.wrapper); + _.each($input.data(keys.attrs), function(val, key) { + _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); + }); + $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); + if ($wrapper.length) { + $input.detach().insertAfter($wrapper); + $wrapper.remove(); + } + } + function $elOrNull(obj) { + var isValid, $el; + isValid = _.isJQuery(obj) || _.isElement(obj); + $el = isValid ? $(obj).first() : []; + return $el.length ? $el : null; + } + })(); +}); \ No newline at end of file diff --git a/docs/search.json b/docs/search.json new file mode 100644 index 000000000..de8112a41 --- /dev/null +++ b/docs/search.json @@ -0,0 +1 @@ +{"Typealiases.html#/s:6Nimble14PredicateBlocka":{"name":"PredicateBlock","abstract":"

Undocumented

"},"Typealiases.html#/FileString":{"name":"FileString"},"Typealiases.html#/s:6Nimble10FileStringa":{"name":"FileString","abstract":"

Undocumented

"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV6statusAA0B6StatusOvp":{"name":"status","abstract":"

Status indicates if the predicate matches, does not match, or fails.

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV7messageAA18ExpectationMessageOvp":{"name":"message","abstract":"

The error message that can be displayed if it does not match

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV6status7messageAcA0B6StatusO_AA18ExpectationMessageOtcfc":{"name":"init(status:message:)","abstract":"

Constructs a new PredicateResult with a given status and error message

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV4bool7messageACSb_AA18ExpectationMessageOtcfc":{"name":"init(bool:message:)","abstract":"

Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message)

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV9toBoolean11expectationSbAA16ExpectationStyleO_tF":{"name":"toBoolean(expectation:)","abstract":"

Converts the result to a boolean based on what the expectation intended

","parent_name":"PredicateResult"},"Structs/PredicateResult.html#/s:6Nimble15PredicateResultV12toObjectiveCAA012NMBPredicateC0CyF":{"name":"toObjectiveC()","abstract":"

Undocumented

","parent_name":"PredicateResult"},"Structs/Predicate.html#/s:6Nimble9PredicateVyACyxGAA0B6ResultVAA10ExpressionVyxGKccfc":{"name":"init(_:)","abstract":"

Constructs a predicate that knows how take a given value

","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV9satisfiesyAA0B6ResultVAA10ExpressionVyxGKF":{"name":"satisfies(_:)","abstract":"

Uses a predicate on a given value to see if it passes the predicate.

","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV6define7matcherACyxGAA0B6ResultVAA10ExpressionVyxGKc_tFZ":{"name":"define(matcher:)","abstract":"

Like Predicate() constructor, but automatically guard against nil (actual) values

","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV6define_7matcherACyxGSS_AA0B6ResultVAA10ExpressionVyxG_AA18ExpectationMessageOtKctFZ":{"name":"define(_:matcher:)","abstract":"

Defines a predicate with a default message that can be returned in the closure","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV13defineNilable_7matcherACyxGSS_AA0B6ResultVAA10ExpressionVyxG_AA18ExpectationMessageOtKctFZ":{"name":"defineNilable(_:matcher:)","abstract":"

Defines a predicate with a default message that can be returned in the closure","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV6simple_7matcherACyxGSS_AA0B6StatusOAA10ExpressionVyxGKctFZ":{"name":"simple(_:matcher:)","abstract":"

Provides a simple predicate definition that provides no control over the predefined","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV13simpleNilable_7matcherACyxGSS_AA0B6StatusOAA10ExpressionVyxGKctFZ":{"name":"simpleNilable(_:matcher:)","abstract":"

Provides a simple predicate definition that provides no control over the predefined","parent_name":"Predicate"},"Structs/Predicate.html#/s:6Nimble9PredicateV13requireNonNilACyxGvp":{"name":"requireNonNil","abstract":"

Returns a new Predicate based on the current one that always fails if nil is given as","parent_name":"Predicate"},"Structs/AsyncDefaults.html#/s:6Nimble13AsyncDefaultsV7timeout8Dispatch0E12TimeIntervalOvpZ":{"name":"timeout","abstract":"

Undocumented

","parent_name":"AsyncDefaults"},"Structs/AsyncDefaults.html#/s:6Nimble13AsyncDefaultsV12pollInterval8Dispatch0f4TimeE0OvpZ":{"name":"pollInterval","abstract":"

Undocumented

","parent_name":"AsyncDefaults"},"Structs/Expression.html#/s:6Nimble10ExpressionV8locationAA14SourceLocationCvp":{"name":"location","abstract":"

Undocumented

","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV9isClosureSbvp":{"name":"isClosure","abstract":"

Undocumented

","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV10expression8location9isClosureACyxGxSgyKc_AA14SourceLocationCSbtcfc":{"name":"init(expression:location:isClosure:)","abstract":"

Creates a new expression struct. Normally, expect(…) will manage this","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV08memoizedB08location14withoutCaching9isClosureACyxGxSgSbKc_AA14SourceLocationCS2btcfc":{"name":"init(memoizedExpression:location:withoutCaching:isClosure:)","abstract":"

Creates a new expression struct. Normally, expect(…) will manage this","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV4castyACyqd__Gqd__SgxSgKclF":{"name":"cast(_:)","abstract":"

Returns a new Expression from the given expression. Identical to a map()","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV8evaluatexSgyKF":{"name":"evaluate()","abstract":"

Undocumented

","parent_name":"Expression"},"Structs/Expression.html#/s:6Nimble10ExpressionV14withoutCachingACyxGyF":{"name":"withoutCaching()","abstract":"

Undocumented

","parent_name":"Expression"},"Structs/Expectation/Nil.html#/s:s23ExpressibleByNilLiteralP03nilD0xyt_tcfc":{"name":"init(nilLiteral:)","parent_name":"Nil"},"Structs/Expectation.html#/s:6Nimble11ExpectationV10expressionAA10ExpressionVyxGvp":{"name":"expression","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV10expressionACyxGAA10ExpressionVyxG_tcfc":{"name":"init(expression:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV6verifyyySb_AA14FailureMessageCtF":{"name":"verify(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV2to_11descriptionACyxGAA9PredicateVyxG_SSSgtF":{"name":"to(_:description:)","abstract":"

Tests the actual value using a matcher to match.

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV5toNot_11descriptionACyxGAA9PredicateVyxG_SSSgtF":{"name":"toNot(_:description:)","abstract":"

Tests the actual value using a matcher to not match.

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV5notTo_11descriptionACyxGAA9PredicateVyxG_SSSgtF":{"name":"notTo(_:description:)","abstract":"

Tests the actual value using a matcher to not match.

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV12toEventually_7timeout12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"toEventually(_:timeout:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to match by checking continuously","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV15toEventuallyNot_7timeout12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0k4TimeH0OAMSSSgtF":{"name":"toEventuallyNot(_:timeout:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to not match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV15toNotEventually_7timeout12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0k4TimeH0OAMSSSgtF":{"name":"toNotEventually(_:timeout:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to not match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV7toNever_5until12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"toNever(_:until:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to never match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV7neverTo_5until12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"neverTo(_:until:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to never match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV8toAlways_5until12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"toAlways(_:until:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to always match by checking","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV8alwaysTo_5until12pollInterval11descriptionyAA9PredicateVyxG_8Dispatch0j4TimeG0OAMSSSgtF":{"name":"alwaysTo(_:until:pollInterval:description:)","abstract":"

Tests the actual value using a matcher to always match by checking","parent_name":"Expectation"},"Structs/Expectation/Nil.html":{"name":"Nil","abstract":"

Represents nil value to be used with the operator overloads for beNil.

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV2eeoiyyACyxG_AC3NilVyx_GtFZ":{"name":"==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationV2neoiyyACyxG_AC3NilVyx_GtFZ":{"name":"!=(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAASlRzSF7ElementRpzlE003dchoiyyACyxG_xtFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAASFRzlE003dchoiyyACyxG_xtFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAASFRzlE003dchoiyyACyxG_x8expected_x5deltattFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAASFRzlE2eeoiyyACyxG_x8expected_x5deltattFZ":{"name":"==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVA2A20NMBDoubleConvertibleRzlE003dchoiyyACyxG_xtFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVA2A20NMBDoubleConvertibleRzlE003dchoiyyACyxG_x8expected_Sd5deltattFZ":{"name":"≈(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVA2A20NMBDoubleConvertibleRzlE2eeoiyyACyxG_x8expected_Sd5deltattFZ":{"name":"==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAAyXlRszlE3eeeoiyyACyyXlG_yXlSgtFZ":{"name":"===(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAAyXlRszlE3neeoiyyACyyXlG_yXlSgtFZ":{"name":"!==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAAytRszlE2eeoiyyACyytG_yttFZ":{"name":"==(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/Expectation.html#/s:6Nimble11ExpectationVAAytRszlE2neoiyyACyytG_yttFZ":{"name":"!=(_:_:)","abstract":"

Undocumented

","parent_name":"Expectation"},"Structs/AssertionRecord.html#/s:6Nimble15AssertionRecordV7successSbvp":{"name":"success","abstract":"

Whether the assertion succeeded or failed

","parent_name":"AssertionRecord"},"Structs/AssertionRecord.html#/s:6Nimble15AssertionRecordV7messageAA14FailureMessageCvp":{"name":"message","abstract":"

The failure message the assertion would display on failure.

","parent_name":"AssertionRecord"},"Structs/AssertionRecord.html#/s:6Nimble15AssertionRecordV8locationAA14SourceLocationCvp":{"name":"location","abstract":"

The source location the expectation occurred on.

","parent_name":"AssertionRecord"},"Structs/AssertionRecord.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"AssertionRecord"},"Structs/execTypesCountTuple.html#/s:6Nimble19execTypesCountTupleV5valuex_xxxxxxxxxxxxxtvp":{"name":"value","abstract":"

Undocumented

","parent_name":"execTypesCountTuple"},"Structs/execTypesCountTuple.html#/s:6Nimble19execTypesCountTupleVACyxGycfc":{"name":"init()","abstract":"

Undocumented

","parent_name":"execTypesCountTuple"},"Structs/execTypesCountTuple.html":{"name":"execTypesCountTuple","abstract":"

Undocumented

"},"Structs/AssertionRecord.html":{"name":"AssertionRecord","abstract":"

A data structure that stores information about an assertion when"},"Structs/Expectation.html":{"name":"Expectation","abstract":"

Undocumented

"},"Structs/Expression.html":{"name":"Expression","abstract":"

Expression represents the closure of the value inside expect(…)."},"Structs/AsyncDefaults.html":{"name":"AsyncDefaults","abstract":"

If you are running on a slower machine, it could be useful to increase the default timeout value"},"Structs/Predicate.html":{"name":"Predicate","abstract":"

A Predicate is part of the new matcher API that provides assertions to expectations.

"},"Structs/PredicateResult.html":{"name":"PredicateResult","abstract":"

The value that a Predicates return to describe if the given (actual) value matches the"},"Protocols/TestOutputStringConvertible.html#/s:6Nimble27TestOutputStringConvertibleP15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"TestOutputStringConvertible"},"Protocols/NMBComparable.html#/c:@M@Nimble@objc(pl)NMBComparable(im)NMB_compare:":{"name":"NMB_compare(_:)","abstract":"

Undocumented

","parent_name":"NMBComparable"},"Protocols/NMBDoubleConvertible.html#/s:6Nimble20NMBDoubleConvertibleP11doubleValueSdvp":{"name":"doubleValue","abstract":"

Undocumented

","parent_name":"NMBDoubleConvertible"},"Protocols/NMBOrderedCollection.html#/s:6Nimble20NMBOrderedCollectionP6object2atypSi_tF":{"name":"object(at:)","abstract":"

Undocumented

","parent_name":"NMBOrderedCollection"},"Protocols/NMBCollection.html#/s:6Nimble13NMBCollectionP5countSivp":{"name":"count","abstract":"

Undocumented

","parent_name":"NMBCollection"},"Protocols/NMBContainer.html#/s:6Nimble12NMBContainerP8containsySbypF":{"name":"contains(_:)","abstract":"

Undocumented

","parent_name":"NMBContainer"},"Protocols/AssertionHandler.html#/s:6Nimble16AssertionHandlerP6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"AssertionHandler"},"Protocols/AssertionHandler.html":{"name":"AssertionHandler","abstract":"

Protocol for the assertion handler that Nimble uses for all expectations.

"},"Protocols/NMBContainer.html":{"name":"NMBContainer","abstract":"

Protocol for types that support contain() matcher.

"},"Protocols/NMBCollection.html":{"name":"NMBCollection","abstract":"

Protocol for types that support only beEmpty(), haveCount() matchers

"},"Protocols/NMBOrderedCollection.html":{"name":"NMBOrderedCollection","abstract":"

Protocol for types that support beginWith(), endWith(), beEmpty() matchers

"},"Protocols/NMBDoubleConvertible.html":{"name":"NMBDoubleConvertible","abstract":"

Undocumented

"},"Protocols/NMBComparable.html":{"name":"NMBComparable","abstract":"

Protocol for types to support beLessThan(), beLessThanOrEqualTo(),"},"Protocols/TestOutputStringConvertible.html":{"name":"TestOutputStringConvertible","abstract":"

A type with a customized test output text representation.

"},"Functions.html#/s:6Nimble19catchBadInstruction2inAA0cD9ExceptionCSgyyc_tF":{"name":"catchBadInstruction(in:)","abstract":"

Run the provided block. If a mach “BAD_INSTRUCTION” exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil."},"Functions.html#/s:6Nimble21MACH_MSGH_BITS_REMOTEys6UInt32VADF":{"name":"MACH_MSGH_BITS_REMOTE(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble14MACH_MSGH_BITSys6UInt32VAD_ADtF":{"name":"MACH_MSGH_BITS(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble20withAssertionHandler_4file4line7closureyAA0cD0_p_SSSuyyKXEtF":{"name":"withAssertionHandler(_:file:line:closure:)","abstract":"

Allows you to temporarily replace the current Nimble assertion handler with"},"Functions.html#/s:6Nimble18gatherExpectations8silently7closureSayAA15AssertionRecordVGSb_yyXEtF":{"name":"gatherExpectations(silently:closure:)","abstract":"

Captures expectations that occur in the given closure. Note that all"},"Functions.html#/s:6Nimble25gatherFailingExpectations8silently7closureSayAA15AssertionRecordVGSb_yyXEtF":{"name":"gatherFailingExpectations(silently:closure:)","abstract":"

Captures failed expectations that occur in the given closure. Note that all"},"Functions.html#/s:6Nimble13recordFailure_8locationySS_AA14SourceLocationCtF":{"name":"recordFailure(_:location:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble9waitUntil7timeout4file4line6actiony8Dispatch0H12TimeIntervalO_SSSuyyycctF":{"name":"waitUntil(timeout:file:line:action:)","abstract":"

Wait asynchronously until the done closure is called or the timeout has been reached.

"},"Functions.html#/s:6Nimble6expect4file4line_AA11ExpectationVyxGSS_SuxSgyKXAtlF":{"name":"expect(file:line:_:)","abstract":"

Make an expectation on a given actual value. The value given is lazily evaluated.

"},"Functions.html#/s:6Nimble6expect4file4line_AA11ExpectationVyxGSS_SuxyKcyXKtlF":{"name":"expect(file:line:_:)","abstract":"

Make an expectation on a given actual value. The closure is lazily invoked.

"},"Functions.html#/s:6Nimble6expect4file4line_AA11ExpectationVyxGSS_SuxSgyKcyXKtlF":{"name":"expect(file:line:_:)","abstract":"

Make an expectation on a given actual value. The closure is lazily invoked.

"},"Functions.html#/s:6Nimble6expect4file4line_AA11ExpectationVyytGSS_SuyyKcyXKtF":{"name":"expect(file:line:_:)","abstract":"

Make an expectation on a given actual value. The closure is lazily invoked.

"},"Functions.html#/s:6Nimble4fail_8locationySS_AA14SourceLocationCtF":{"name":"fail(_:location:)","abstract":"

Always fails the test with a message and a specified location.

"},"Functions.html#/s:6Nimble4fail_4file4lineySS_SSSutF":{"name":"fail(_:file:line:)","abstract":"

Always fails the test with a message.

"},"Functions.html#/s:6Nimble4fail_4lineySS_SutF":{"name":"fail(_:line:)","abstract":"

Always fails the test.

"},"Functions.html#/s:6Nimble7allPassyAA9PredicateVyxGSb7ElementQzKcSTRzlF":{"name":"allPass(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7allPassyAA9PredicateVyxGSS_Sb7ElementQzKctSTRzlF":{"name":"allPass(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7allPassyAA9PredicateVyxGADy7ElementQzGSTRzlF":{"name":"allPass(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble9beAKindOfyAA9PredicateVyypGxmlF":{"name":"beAKindOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is an instance of the given class.

"},"Functions.html#/s:6Nimble9beAKindOfyAA9PredicateVySo8NSObjectCGyXlXpF":{"name":"beAKindOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is an instance of the given class."},"Functions.html#/s:6Nimble14beAnInstanceOfyAA9PredicateVyypGxmlF":{"name":"beAnInstanceOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is an exact instance of the given class.

"},"Functions.html#/s:6Nimble14beAnInstanceOfyAA9PredicateVySo8NSObjectCGyXlXpF":{"name":"beAnInstanceOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is an instance of the given class."},"Functions.html#/s:6Nimble12defaultDeltaxySFRzlF":{"name":"defaultDelta()","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble9beCloseTo_6withinAA9PredicateVyxGx_xtSFRzlF":{"name":"beCloseTo(_:within:)","abstract":"

A Nimble matcher that succeeds when a value is close to another. This is used for floating"},"Functions.html#/s:6Nimble9beCloseTo_6withinAA9PredicateVyxGx_SdtAA20NMBDoubleConvertibleRzlF":{"name":"beCloseTo(_:within:)","abstract":"

A Nimble matcher that succeeds when a value is close to another. This is used for floating"},"Functions.html#/s:6Nimble9beCloseTo_6withinAA9PredicateVyq_Gq__xtSFRz7ElementQy_RszSlR_r0_lF":{"name":"beCloseTo(_:within:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble003obaoiyx8expected_x5deltatx_xtSFRzlF":{"name":"±(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble003obaoiyx8expected_Sd5deltatx_SdtAA20NMBDoubleConvertibleRzlF":{"name":"±(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVyxGySTRzlF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVyxGys10SetAlgebraRzlF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVyxGySTRzs10SetAlgebraRzlF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVySSGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVySo8NSStringCGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVySo12NSDictionaryCGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVySo7NSArrayCGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble7beEmptyAA9PredicateVyAA13NMBCollection_pGyF":{"name":"beEmpty()","abstract":"

A Nimble matcher that succeeds when a value is “empty”. For collections, this"},"Functions.html#/s:6Nimble13beGreaterThanyAA9PredicateVyxGxSgSLRzlF":{"name":"beGreaterThan(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is greater than the expected value.

"},"Functions.html#/s:6Nimble1goiyyAA11ExpectationVyxG_xtSLRzlF":{"name":">(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble13beGreaterThanyAA9PredicateVyAA13NMBComparable_pGAaE_pSgF":{"name":"beGreaterThan(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is greater than the expected value.

"},"Functions.html#/s:6Nimble1goiyyAA11ExpectationVyAA13NMBComparable_pG_AaE_pSgtF":{"name":">(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble22beGreaterThanOrEqualToyAA9PredicateVyxGxSgSLRzlF":{"name":"beGreaterThanOrEqualTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is greater than"},"Functions.html#/s:6Nimble2geoiyyAA11ExpectationVyxG_xtSLRzlF":{"name":">=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble22beGreaterThanOrEqualToyAA9PredicateVyxGxSgAA13NMBComparableRzlF":{"name":"beGreaterThanOrEqualTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is greater than"},"Functions.html#/s:6Nimble2geoiyyAA11ExpectationVyxG_xtAA13NMBComparableRzlF":{"name":">=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble13beIdenticalToyAA9PredicateVyyXlGyXlSgF":{"name":"beIdenticalTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is the same instance"},"Functions.html#/s:6Nimble2beyAA9PredicateVyyXlGyXlSgF":{"name":"be(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is the same instance"},"Functions.html#/s:6Nimble10beLessThanyAA9PredicateVyxGxSgSLRzlF":{"name":"beLessThan(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is less than the expected value.

"},"Functions.html#/s:6Nimble1loiyyAA11ExpectationVyxG_xtSLRzlF":{"name":"<(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble10beLessThanyAA9PredicateVyAA13NMBComparable_pGAaE_pSgF":{"name":"beLessThan(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is less than the expected value.

"},"Functions.html#/s:6Nimble1loiyyAA11ExpectationVyAA13NMBComparable_pG_AaE_pSgtF":{"name":"<(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble19beLessThanOrEqualToyAA9PredicateVyxGxSgSLRzlF":{"name":"beLessThanOrEqualTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is less than"},"Functions.html#/s:6Nimble2leoiyyAA11ExpectationVyxG_xtSLRzlF":{"name":"<=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble19beLessThanOrEqualToyAA9PredicateVyxGxSgAA13NMBComparableRzlF":{"name":"beLessThanOrEqualTo(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is less than"},"Functions.html#/s:6Nimble2leoiyyAA11ExpectationVyxG_xtAA13NMBComparableRzlF":{"name":"<=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble6beTrueAA9PredicateVySbGyF":{"name":"beTrue()","abstract":"

A Nimble matcher that succeeds when the actual value is exactly true."},"Functions.html#/s:6Nimble7beFalseAA9PredicateVySbGyF":{"name":"beFalse()","abstract":"

A Nimble matcher that succeeds when the actual value is exactly false."},"Functions.html#/s:6Nimble8beTruthyAA9PredicateVyxGySQRzs27ExpressibleByBooleanLiteralRzlF":{"name":"beTruthy()","abstract":"

A Nimble matcher that succeeds when the actual value is not logically false.

"},"Functions.html#/s:6Nimble7beFalsyAA9PredicateVyxGySQRzs27ExpressibleByBooleanLiteralRzlF":{"name":"beFalsy()","abstract":"

A Nimble matcher that succeeds when the actual value is logically false."},"Functions.html#/s:6Nimble5beNilAA9PredicateVyxGylF":{"name":"beNil()","abstract":"

A Nimble matcher that succeeds when the actual value is nil.

"},"Functions.html#/s:6Nimble9beSuccess4testAA9PredicateVys6ResultOyxq_GGyxcSg_ts5ErrorR_r0_lF":{"name":"beSuccess(test:)","abstract":"

A Nimble matcher for Result that succeeds when the actual value is success.

"},"Functions.html#/s:6Nimble9beFailure4testAA9PredicateVys6ResultOyxq_GGyq_cSg_ts5ErrorR_r0_lF":{"name":"beFailure(test:)","abstract":"

A Nimble matcher for Result that succeeds when the actual value is failure.

"},"Functions.html#/s:6Nimble6beVoidAA9PredicateVyytGyF":{"name":"beVoid()","abstract":"

A Nimble matcher that succeeds when the actual value is Void.

"},"Functions.html#/s:6Nimble8beWithinyAA9PredicateVyxGSnyxGSLRzlF":{"name":"beWithin(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is within given range.

"},"Functions.html#/s:6Nimble8beWithinyAA9PredicateVyxGSNyxGSLRzlF":{"name":"beWithin(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is within given range.

"},"Functions.html#/s:6Nimble9beginWithyAA9PredicateVyxG7ElementQzSTRzSQAGRQlF":{"name":"beginWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence’s first element"},"Functions.html#/s:6Nimble9beginWithyAA9PredicateVyAA20NMBOrderedCollection_pGypF":{"name":"beginWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual collection’s first element"},"Functions.html#/s:6Nimble9beginWithyAA9PredicateVySSGSSF":{"name":"beginWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual string contains expected substring"},"Functions.html#/s:6Nimble9beginWith6prefixAA9PredicateVyxGq_Sg_tSTRzSTR_SQ7ElementRpzAHQy_AIRSr0_lF":{"name":"beginWith(prefix:)","abstract":"

A Nimble matcher that succeeds when the exepected sequence is a prefix of the actual sequence.

"},"Functions.html#/s:6Nimble9beginWith6prefix2byAA9PredicateVyxGq_Sg_Sb7ElementQz_AIQy_tctSTRzSTR_r0_lF":{"name":"beginWith(prefix:by:)","abstract":"

A Nimble matcher that succeeds when the expected sequence is the prefix of the actual sequence, using the given predicate as the equivalence test.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxG7ElementQzd_tSTRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxGSay7ElementQzGSTRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxG7ElementQzd_ts10SetAlgebraRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual set contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxGSay7ElementQzGs10SetAlgebraRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual set contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxG7ElementSTQzd_tSTRzs10SetAlgebraRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual set contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyxGSay7ElementSTQzGSTRzs10SetAlgebraRzSQAGRQlF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual set contains the expected values.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVySSGSSd_tF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual string contains the expected substring.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVySSGSaySSGF":{"name":"contain(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7containyAA9PredicateVySo8NSStringCGAFd_tF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual string contains the expected substring.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVySo8NSStringCGSayAFGF":{"name":"contain(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyAA12NMBContainer_pGypSgd_tF":{"name":"contain(_:)","abstract":"

A Nimble matcher that succeeds when the actual collection contains the expected object.

"},"Functions.html#/s:6Nimble7containyAA9PredicateVyAA12NMBContainer_pGSayypSgGF":{"name":"contain(_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble24containElementSatisfyingyAA9PredicateVyxGSb0C0Qzc_SStSTRzlF":{"name":"containElementSatisfying(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble13elementsEqualyAA9PredicateVyxGq_SgSTRzSTR_SQ7ElementRpzAGQy_AHRSr0_lF":{"name":"elementsEqual(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain the same elements in"},"Functions.html#/s:6Nimble13elementsEqual_2byAA9PredicateVyxGq_Sg_Sb7ElementQz_AHQy_tctSTRzSTR_r0_lF":{"name":"elementsEqual(_:by:)","abstract":"

A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain equivalent elements in"},"Functions.html#/s:6Nimble7endWithyAA9PredicateVyxG7ElementQzSTRzSQAGRQlF":{"name":"endWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual sequence’s last element"},"Functions.html#/s:6Nimble7endWithyAA9PredicateVyAA20NMBOrderedCollection_pGypF":{"name":"endWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual collection’s last element"},"Functions.html#/s:6Nimble7endWithyAA9PredicateVySSGSSF":{"name":"endWith(_:)","abstract":"

A Nimble matcher that succeeds when the actual string contains the expected substring"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_tGx_q_tSgSQRzSQR_r0_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_tG_x_q_tSgtSQRzSQR_r0_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_tG_x_q_tSgtSQRzSQR_r0_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_q0_tGx_q_q0_tSgSQRzSQR_SQR0_r1_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_q0_tG_x_q_q0_tSgtSQRzSQR_SQR0_r1_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_q0_tG_x_q_q0_tSgtSQRzSQR_SQR0_r1_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_q0_q1_tGx_q_q0_q1_tSgSQRzSQR_SQR0_SQR1_r2_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_q0_q1_tG_x_q_q0_q1_tSgtSQRzSQR_SQR0_SQR1_r2_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_q0_q1_tG_x_q_q0_q1_tSgtSQRzSQR_SQR0_SQR1_r2_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_q0_q1_q2_tGx_q_q0_q1_q2_tSgSQRzSQR_SQR0_SQR1_SQR2_r3_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_q0_q1_q2_tG_x_q_q0_q1_q2_tSgtSQRzSQR_SQR0_SQR1_SQR2_r3_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_q0_q1_q2_tG_x_q_q0_q1_q2_tSgtSQRzSQR_SQR0_SQR1_SQR2_r3_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyx_q_q0_q1_q2_q3_tGx_q_q0_q1_q2_q3_tSgSQRzSQR_SQR0_SQR1_SQR2_SQR3_r4_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple."},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyx_q_q0_q1_q2_q3_tG_x_q_q0_q1_q2_q3_tSgtSQRzSQR_SQR0_SQR1_SQR2_SQR3_r4_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyx_q_q0_q1_q2_q3_tG_x_q_q0_q1_q2_q3_tSgtSQRzSQR_SQR0_SQR1_SQR2_SQR3_r4_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyxGxSQRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is equal to the expected value."},"Functions.html#/s:6Nimble5equalyAA9PredicateVySayxSgGGAFSQRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher allowing comparison of collection with optional type

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyxGxSgSQRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual value is equal to the expected value."},"Functions.html#/s:6Nimble5equalyAA9PredicateVyShyxGGAESHRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual set is equal to the expected set.

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyShyxGGAESgSHRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual set is equal to the expected set.

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyShyxGGAESLRzSHRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual set is equal to the expected set.

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVyShyxGGAESgSLRzSHRzlF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual set is equal to the expected set.

"},"Functions.html#/s:6Nimble5equalyAA9PredicateVySDyxq_GGSDyxq_SgGSHRzSQR_r0_lF":{"name":"equal(_:)","abstract":"

A Nimble matcher that succeeds when the actual dictionary is equal to the expected dictionary

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyxG_xtSQRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyxG_xSgtSQRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyxG_xtSQRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyxG_xSgtSQRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVySayxGG_AESgtSQRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVySayxGG_AESgtSQRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyShyxGG_AEtSHRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyShyxGG_AESgtSHRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyShyxGG_AEtSHRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyShyxGG_AESgtSHRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyShyxGG_AEtSLRzSHRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVyShyxGG_AESgtSLRzSHRzlF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyShyxGG_AEtSLRzSHRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVyShyxGG_AESgtSLRzSHRzlF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2eeoiyyAA11ExpectationVySDyxq_GG_AESgtSHRzSQR_r0_lF":{"name":"==(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble2neoiyyAA11ExpectationVySDyxq_GG_AESgtSHRzSQR_r0_lF":{"name":"!=(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble9haveCountyAA9PredicateVyxGSiSlRzlF":{"name":"haveCount(_:)","abstract":"

A Nimble matcher that succeeds when the actual Collection’s count equals"},"Functions.html#/s:6Nimble9haveCountyAA9PredicateVyAA13NMBCollection_pGSiF":{"name":"haveCount(_:)","abstract":"

A Nimble matcher that succeeds when the actual collection’s count equals"},"Functions.html#/s:6Nimble5matchyAA9PredicateVySSGSSSgF":{"name":"match(_:)","abstract":"

A Nimble matcher that succeeds when the actual string satisfies the regular expression"},"Functions.html#/s:6Nimble10matchErroryAA9PredicateVys0C0_pGxsAERzlF":{"name":"matchError(_:)","abstract":"

A Nimble matcher that succeeds when the actual expression evaluates to an"},"Functions.html#/s:6Nimble10matchErroryAA9PredicateVys0C0_pGxSQRzsAERzlF":{"name":"matchError(_:)","abstract":"

A Nimble matcher that succeeds when the actual expression evaluates to an"},"Functions.html#/s:6Nimble10matchErroryAA9PredicateVys0C0_pGxmsAERzlF":{"name":"matchError(_:)","abstract":"

A Nimble matcher that succeeds when the actual expression evaluates to an"},"Functions.html#/s:6Nimble17postNotifications_4fromAA9PredicateVyxGAEySay10Foundation12NotificationVGG_So20NSNotificationCenterCtlF":{"name":"postNotifications(_:from:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble28postDistributedNotifications_4from5namesAA9PredicateVyxGAFySay10Foundation12NotificationVGG_So013NSDistributedI6CenterCShySo18NSNotificationNameaGtlF":{"name":"postDistributedNotifications(_:from:names:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble14raiseException5named6reason8userInfo7closureAA9PredicateVyxGSo15NSExceptionNameaSg_SSSgSo12NSDictionaryCSgySo0J0CcSgtlF":{"name":"raiseException(named:reason:userInfo:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression raises an"},"Functions.html#/s:6Nimble14raiseException5named6reason8userInfo7closureAA9PredicateVyxGSSSg_AJSo12NSDictionaryCSgySo11NSExceptionCcSgtlF":{"name":"raiseException(named:reason:userInfo:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression raises an"},"Functions.html#/s:6Nimble12satisfyAllOfyAA9PredicateVyxGAEd_tlF":{"name":"satisfyAllOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value matches with all of the matchers"},"Functions.html#/s:6Nimble12satisfyAllOfyAA9PredicateVyxGSayAEGlF":{"name":"satisfyAllOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value matches with all of the matchers"},"Functions.html#/s:6Nimble2aaoiyAA9PredicateVyxGAE_AEtlF":{"name":"&&(_:_:)","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble12satisfyAnyOfyAA9PredicateVyxGAEd_tlF":{"name":"satisfyAnyOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value matches with any of the matchers"},"Functions.html#/s:6Nimble12satisfyAnyOfyAA9PredicateVyxGSayAEGlF":{"name":"satisfyAnyOf(_:)","abstract":"

A Nimble matcher that succeeds when the actual value matches with any of the matchers"},"Functions.html#/s:6Nimble2oooiyAA9PredicateVyxGAE_AEtlF":{"name":"||(_:_:)","abstract":"

Undocumented

"},"Functions.html#/catchBadInstruction(block:)":{"name":"catchBadInstruction(block:)","abstract":"

Run the provided block. If a POSIX SIGILL is received, handle it and return a BadInstructionException (which is just an empty object in this POSIX signal version). Otherwise return nil."},"Functions.html#/s:6Nimble14throwAssertionAA9PredicateVyxGylF":{"name":"throwAssertion()","abstract":"

Undocumented

"},"Functions.html#/s:6Nimble10throwErrorAA9PredicateVyxGylF":{"name":"throwError()","abstract":"

A Nimble matcher that succeeds when the actual expression throws an"},"Functions.html#/s:6Nimble10throwError_7closureAA9PredicateVyq_Gx_ys0C0_pcSgtsAGRzr0_lF":{"name":"throwError(_:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws an"},"Functions.html#/s:6Nimble10throwError_7closureAA9PredicateVyq_Gx_yxcSgtSQRzs0C0Rzr0_lF":{"name":"throwError(_:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws an"},"Functions.html#/s:6Nimble10throwError9errorType7closureAA9PredicateVyq_Gxm_yxcSgts0C0Rzr0_lF":{"name":"throwError(errorType:closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws an"},"Functions.html#/s:6Nimble10throwError7closureAA9PredicateVyxGys0C0_pc_tlF":{"name":"throwError(closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws any"},"Functions.html#/s:6Nimble10throwError7closureAA9PredicateVyq_Gyxc_ts0C0Rzr0_lF":{"name":"throwError(closure:)","abstract":"

A Nimble matcher that succeeds when the actual expression throws any"},"Functions.html#/s:6Nimble7succeedAA9PredicateVyAA15ToSucceedResultOGyF":{"name":"succeed()","abstract":"

A Nimble matcher that takes in a closure for validation.

"},"Functions.html#/s:6Nimble9stringifyySSxSglF":{"name":"stringify(_:)","abstract":"

Returns a string appropriate for displaying in test output"},"Functions.html#/s:6Nimble20prettyCollectionTypeySSxlF":{"name":"prettyCollectionType(_:)","abstract":"

Attempts to generate a pretty type string for a given value. If the value is of a Objective-C"},"Functions.html#/s:6Nimble20prettyCollectionTypeySSxSlRzlF":{"name":"prettyCollectionType(_:)","abstract":"

Returns the type name for a given collection type. This overload is used by Swift"},"Extensions/Data.html#/s:10Foundation4DataV6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Data"},"Extensions/String.html#/s:SS6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"String"},"Extensions/AnySequence.html#/s:s11AnySequenceV6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"AnySequence"},"Extensions/Array.html#/s:Sa6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Array"},"Extensions/NSString.html#/c:@CM@Nimble@@objc(cs)NSString(im)NMB_compare:":{"name":"NMB_compare(_:)","abstract":"

Undocumented

","parent_name":"NSString"},"Extensions/NSDate.html#/s:So6NSDateC6NimbleE11doubleValueSdvp":{"name":"doubleValue","abstract":"

Undocumented

","parent_name":"NSDate"},"Extensions/NSDate.html#/s:So6NSDateC6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"NSDate"},"Extensions/Date.html#/s:10Foundation4DateV6NimbleE11doubleValueSdvp":{"name":"doubleValue","abstract":"

Undocumented

","parent_name":"Date"},"Extensions/Date.html#/s:10Foundation4DateV6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Date"},"Extensions/NSNumber.html#/c:@CM@Nimble@@objc(cs)NSNumber(im)NMB_compare:":{"name":"NMB_compare(_:)","abstract":"

Undocumented

","parent_name":"NSNumber"},"Extensions/NSNumber.html#/s:So8NSNumberC6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"NSNumber"},"Extensions/NSIndexSet.html#/s:So10NSIndexSetC6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"NSIndexSet"},"Extensions/NSArray.html#/s:So7NSArrayC6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"NSArray"},"Extensions/UInt.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt"},"Extensions/Int.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int"},"Extensions/Double.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Double"},"Extensions/Double.html#/s:Sd6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Double"},"Extensions/Float.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Float"},"Extensions/Float.html#/s:Sf6NimbleE15testDescriptionSSvp":{"name":"testDescription","abstract":"

Undocumented

","parent_name":"Float"},"Extensions/UInt64.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt64"},"Extensions/Int64.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int64"},"Extensions/UInt32.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt32"},"Extensions/Int32.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int32"},"Extensions/UInt16.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt16"},"Extensions/Int16.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int16"},"Extensions/UInt8.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"UInt8"},"Extensions/Int8.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"Int8"},"Extensions/NSException.html#/s:So11NSExceptionC6NimbleE14catchException2inABXDSgyyc_tFZ":{"name":"catchException(in:)","abstract":"

Undocumented

","parent_name":"NSException"},"Extensions/NSException.html":{"name":"NSException"},"Extensions/Int8.html":{"name":"Int8"},"Extensions/UInt8.html":{"name":"UInt8"},"Extensions/Int16.html":{"name":"Int16"},"Extensions/UInt16.html":{"name":"UInt16"},"Extensions/Int32.html":{"name":"Int32"},"Extensions/UInt32.html":{"name":"UInt32"},"Extensions/Int64.html":{"name":"Int64"},"Extensions/UInt64.html":{"name":"UInt64"},"Extensions/Float.html":{"name":"Float"},"Extensions/Double.html":{"name":"Double"},"Extensions/Int.html":{"name":"Int"},"Extensions/UInt.html":{"name":"UInt"},"Extensions/NSArray.html":{"name":"NSArray"},"Extensions.html#/c:objc(cs)NSSet":{"name":"NSSet"},"Extensions.html#/c:objc(cs)NSHashTable":{"name":"NSHashTable"},"Extensions.html#/c:objc(cs)NSMapTable":{"name":"NSMapTable"},"Extensions/NSIndexSet.html":{"name":"NSIndexSet"},"Extensions.html#/c:objc(cs)NSDictionary":{"name":"NSDictionary"},"Extensions/NSNumber.html":{"name":"NSNumber"},"Extensions/Date.html":{"name":"Date"},"Extensions/NSDate.html":{"name":"NSDate"},"Extensions/NSString.html":{"name":"NSString"},"Extensions/Array.html":{"name":"Array"},"Extensions/AnySequence.html":{"name":"AnySequence"},"Extensions/String.html":{"name":"String"},"Extensions/Data.html":{"name":"Data"},"Enums/ToSucceedResult.html#/s:6Nimble15ToSucceedResultO9succeededyA2CmF":{"name":"succeeded","abstract":"

Undocumented

","parent_name":"ToSucceedResult"},"Enums/ToSucceedResult.html#/s:6Nimble15ToSucceedResultO6failedyACSS_tcACmF":{"name":"failed(reason:)","abstract":"

Undocumented

","parent_name":"ToSucceedResult"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO7matchesyA2CmF":{"name":"matches","abstract":"

Matches indicates if the predicate / matcher passes with the given value

","parent_name":"PredicateStatus"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO12doesNotMatchyA2CmF":{"name":"doesNotMatch","abstract":"

DoesNotMatch indicates if the predicate / matcher fails with the given value, but would","parent_name":"PredicateStatus"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO4failyA2CmF":{"name":"fail","abstract":"

Fail indicates the predicate will never satisfy with the given value in any case.","parent_name":"PredicateStatus"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO4boolACSb_tcfc":{"name":"init(bool:)","abstract":"

Converts a boolean to either .matches (if true) or .doesNotMatch (if false).

","parent_name":"PredicateStatus"},"Enums/PredicateStatus.html#/s:6Nimble15PredicateStatusO12toObjectiveCAA012NMBPredicateC0CyF":{"name":"toObjectiveC()","abstract":"

Undocumented

","parent_name":"PredicateStatus"},"Enums/ExpectationStyle.html#/s:6Nimble16ExpectationStyleO7toMatchyA2CmF":{"name":"toMatch","abstract":"

Undocumented

","parent_name":"ExpectationStyle"},"Enums/ExpectationStyle.html#/s:6Nimble16ExpectationStyleO10toNotMatchyA2CmF":{"name":"toNotMatch","abstract":"

Undocumented

","parent_name":"ExpectationStyle"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO21expectedActualValueToyACSScACmF":{"name":"expectedActualValueTo(_:)","abstract":"

includes actual value in output (“expected to , got ”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO21expectedCustomValueToyACSS_SStcACmF":{"name":"expectedCustomValueTo(_:actual:)","abstract":"

uses a custom actual value string in output (“expected to , got ”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO10expectedToyACSScACmF":{"name":"expectedTo(_:)","abstract":"

excludes actual value in output (“expected to ”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO4failyACSScACmF":{"name":"fail(_:)","abstract":"

allows any free-form message (“”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO8prependsyACSS_ACtcACmF":{"name":"prepends(_:_:)","abstract":"

Not Fully Implemented Yet.

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO7appendsyA2C_SStcACmF":{"name":"appends(_:_:)","abstract":"

appends after an existing message (“ (use beNil() to match nils)”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO7detailsyA2C_SStcACmF":{"name":"details(_:_:)","abstract":"

provides long-form multi-line explainations (“\\n\\n”)

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO08expectedC0SSvp":{"name":"expectedMessage","abstract":"

Returns the smallest message after the “expected to” string that summarizes the error.

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO8appended7messageACSS_tF":{"name":"appended(message:)","abstract":"

Appends a message after the primary expectation message

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO17appendedBeNilHintACyF":{"name":"appendedBeNilHint()","abstract":"

Appends a message hinting to use beNil() for when the actual value given was nil.

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO8appended7detailsACSS_tF":{"name":"appended(details:)","abstract":"

Appends a detailed (aka - multiline) message after the primary expectation message","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO08replacedB0yA3CcF":{"name":"replacedExpectation(_:)","abstract":"

Replaces a primary expectation with one returned by f. Preserves all composite expectations","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO07wrappedB06before5afterACSS_SStF":{"name":"wrappedExpectation(before:after:)","abstract":"

Wraps a primary expectation with text before and after it.","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO9prepended11expectationACSS_tF":{"name":"prepended(expectation:)","abstract":"

Prepends a message by modifying the primary expectation

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html#/s:6Nimble18ExpectationMessageO8toString6actual8expected0D0S2S_S2StF":{"name":"toString(actual:expected:to:)","abstract":"

Converts the tree of ExpectationMessages into a final built string.

","parent_name":"ExpectationMessage"},"Enums/ExpectationMessage.html":{"name":"ExpectationMessage","abstract":"

Undocumented

"},"Enums/ExpectationStyle.html":{"name":"ExpectationStyle","abstract":"

Undocumented

"},"Enums/PredicateStatus.html":{"name":"PredicateStatus","abstract":"

PredicateStatus is a trinary that indicates if a Predicate matches a given value or not

"},"Enums/ToSucceedResult.html":{"name":"ToSucceedResult","abstract":"

Used by the succeed matcher.

"},"Global%20Variables.html#/s:6Nimble23MACH_MSG_TYPE_MAKE_SENDs6UInt32Vvp":{"name":"MACH_MSG_TYPE_MAKE_SEND","abstract":"

Undocumented

"},"Global%20Variables.html#/nativeThreadState":{"name":"nativeThreadState"},"Global%20Variables.html#/nativeThreadStateCount":{"name":"nativeThreadStateCount"},"Global%20Variables.html#/nativeMachExceptionMask":{"name":"nativeMachExceptionMask"},"Global%20Variables.html#/s:6Nimble17nativeThreadStates5Int32Vvp":{"name":"nativeThreadState","abstract":"

Undocumented

"},"Global%20Variables.html#/s:6Nimble22nativeThreadStateCounts6UInt32Vvp":{"name":"nativeThreadStateCount","abstract":"

Undocumented

"},"Global%20Variables.html#/s:6Nimble23nativeMachExceptionMasks6UInt32Vvp":{"name":"nativeMachExceptionMask","abstract":"

Undocumented

"},"Global%20Variables.html#/s:6Nimble15EXC_TYPES_COUNTSivp":{"name":"EXC_TYPES_COUNT","abstract":"

Undocumented

"},"Global%20Variables.html#/s:6Nimble0A16AssertionHandlerAA0bC0_pvp":{"name":"NimbleAssertionHandler","abstract":"

Global backing interface for assertions that Nimble creates."},"Global%20Variables.html#/s:6Nimble12DefaultDeltaSdvp":{"name":"DefaultDelta","abstract":"

Undocumented

"},"Classes/NMBStringer.html#/c:@M@Nimble@objc(cs)NMBStringer(cm)stringify:":{"name":"stringify(_:)","abstract":"

Undocumented

","parent_name":"NMBStringer"},"Classes/SourceLocation.html#/s:6Nimble14SourceLocationC4fileSSvp":{"name":"file","abstract":"

Undocumented

","parent_name":"SourceLocation"},"Classes/SourceLocation.html#/s:6Nimble14SourceLocationC4lineSuvp":{"name":"line","abstract":"

Undocumented

","parent_name":"SourceLocation"},"Classes/SourceLocation.html#/c:@M@Nimble@objc(cs)SourceLocation(py)description":{"name":"description","abstract":"

Undocumented

","parent_name":"SourceLocation"},"Classes/NMBObjCRaiseExceptionPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCRaiseExceptionPredicate(py)named":{"name":"named","abstract":"

Undocumented

","parent_name":"NMBObjCRaiseExceptionPredicate"},"Classes/NMBObjCRaiseExceptionPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCRaiseExceptionPredicate(py)reason":{"name":"reason","abstract":"

Undocumented

","parent_name":"NMBObjCRaiseExceptionPredicate"},"Classes/NMBObjCRaiseExceptionPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCRaiseExceptionPredicate(py)userInfo":{"name":"userInfo","abstract":"

Undocumented

","parent_name":"NMBObjCRaiseExceptionPredicate"},"Classes/NMBObjCRaiseExceptionPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCRaiseExceptionPredicate(py)satisfyingBlock":{"name":"satisfyingBlock","abstract":"

Undocumented

","parent_name":"NMBObjCRaiseExceptionPredicate"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC7matchesACvpZ":{"name":"matches","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC12doesNotMatchACvpZ":{"name":"doesNotMatch","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC4failACvpZ":{"name":"fail","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/c:@M@Nimble@objc(cs)NMBPredicateStatus(py)hash":{"name":"hash","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/c:@M@Nimble@objc(cs)NMBPredicateStatus(im)isEqual:":{"name":"isEqual(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC4from6statusAcA09PredicateC0O_tFZ":{"name":"from(status:)","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC4from4boolACSb_tFZ":{"name":"from(bool:)","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateStatus.html#/s:6Nimble18NMBPredicateStatusC7toSwiftAA09PredicateC0OyF":{"name":"toSwift()","abstract":"

Undocumented

","parent_name":"NMBPredicateStatus"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC6statusAA0B6StatusCvp":{"name":"status","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC7messageAA21NMBExpectationMessageCvp":{"name":"message","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC6status7messageAcA0B6StatusC_AA21NMBExpectationMessageCtcfc":{"name":"init(status:message:)","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC4bool7messageACSb_AA21NMBExpectationMessageCtcfc":{"name":"init(bool:message:)","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBPredicateResult.html#/s:6Nimble18NMBPredicateResultC7toSwiftAA09PredicateC0VyF":{"name":"toSwift()","abstract":"

Undocumented

","parent_name":"NMBPredicateResult"},"Classes/NMBObjCBeCloseToPredicate.html#/c:@M@Nimble@objc(cs)NMBObjCBeCloseToPredicate(py)within":{"name":"within","abstract":"

Undocumented

","parent_name":"NMBObjCBeCloseToPredicate"},"Classes/NMBPredicate.html#/s:6Nimble12NMBPredicateC9predicateAcA0B6ResultCAA10ExpressionVySo8NSObjectCGKc_tcfc":{"name":"init(predicate:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)allPassMatcher:":{"name":"allPassMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beAKindOfMatcher:":{"name":"beAKindOfMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beAnInstanceOfMatcher:":{"name":"beAnInstanceOfMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beCloseToMatcher:within:":{"name":"beCloseToMatcher(_:within:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beEmptyMatcher":{"name":"beEmptyMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beGreaterThanMatcher:":{"name":"beGreaterThanMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beGreaterThanOrEqualToMatcher:":{"name":"beGreaterThanOrEqualToMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beIdenticalToMatcher:":{"name":"beIdenticalToMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beLessThanMatcher:":{"name":"beLessThanMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beLessThanOrEqualToMatcher:":{"name":"beLessThanOrEqualToMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beTruthyMatcher":{"name":"beTruthyMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beFalsyMatcher":{"name":"beFalsyMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beTrueMatcher":{"name":"beTrueMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beFalseMatcher":{"name":"beFalseMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beNilMatcher":{"name":"beNilMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)beginWithMatcher:":{"name":"beginWithMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)containMatcher:":{"name":"containMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)containElementSatisfyingMatcher:":{"name":"containElementSatisfyingMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)endWithMatcher:":{"name":"endWithMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)equalMatcher:":{"name":"equalMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)haveCountMatcher:":{"name":"haveCountMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)matchMatcher:":{"name":"matchMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)raiseExceptionMatcher":{"name":"raiseExceptionMatcher()","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)satisfyAllOfMatcher:":{"name":"satisfyAllOfMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/NMBPredicate.html#/c:@CM@Nimble@objc(cs)NMBPredicate(cm)satisfyAnyOfMatcher:":{"name":"satisfyAnyOfMatcher(_:)","abstract":"

Undocumented

","parent_name":"NMBPredicate"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC8expectedSSvp":{"name":"expected","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC11actualValueSSSgvp":{"name":"actualValue","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC2toSSvp":{"name":"to","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC07postfixC0SSvp":{"name":"postfixMessage","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC13postfixActualSSvp":{"name":"postfixActual","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC08extendedC0SSSgvp":{"name":"extendedMessage","abstract":"

An optional message that will be appended as a new line and provides additional details","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC15userDescriptionSSSgvp":{"name":"userDescription","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC11stringValueSSvp":{"name":"stringValue","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/c:@M@Nimble@objc(cs)FailureMessage(im)init":{"name":"init()","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/FailureMessage.html#/s:6Nimble14FailureMessageC11stringValueACSS_tcfc":{"name":"init(stringValue:)","abstract":"

Undocumented

","parent_name":"FailureMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC10expectedToACSS_tcfc":{"name":"init(expectedTo:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC21expectedActualValueToACSS_tcfc":{"name":"init(expectedActualValueTo:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC21expectedActualValueTo06customeF0ACSS_SStcfc":{"name":"init(expectedActualValueTo:customActualValue:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC4failACSS_tcfc":{"name":"init(fail:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC7prepend5childACSS_ACtcfc":{"name":"init(prepend:child:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC08appendedC05childACSS_ACtcfc":{"name":"init(appendedMessage:child:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC09prependedC05childACSS_ACtcfc":{"name":"init(prependedMessage:child:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC7details5childACSS_ACtcfc":{"name":"init(details:child:)","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC17appendedBeNilHintACyF":{"name":"appendedBeNilHint()","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NMBExpectationMessage.html#/s:6Nimble21NMBExpectationMessageC7toSwiftAA011ExpectationC0OyF":{"name":"toSwift()","abstract":"

Undocumented

","parent_name":"NMBExpectationMessage"},"Classes/NimbleShortXCTestHandler.html#/s:6Nimble0A18ShortXCTestHandlerC6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"NimbleShortXCTestHandler"},"Classes/NimbleXCTestHandler.html#/s:6Nimble0A13XCTestHandlerC6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"NimbleXCTestHandler"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(im)initWithActualBlock:negative:file:line:":{"name":"init(actualBlock:negative:file:line:)","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)withTimeout":{"name":"withTimeout","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)to":{"name":"to","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toWithDescription":{"name":"toWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNot":{"name":"toNot","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNotWithDescription":{"name":"toNotWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)notTo":{"name":"notTo","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)notToWithDescription":{"name":"notToWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toEventually":{"name":"toEventually","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toEventuallyWithDescription":{"name":"toEventuallyWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toEventuallyNot":{"name":"toEventuallyNot","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toEventuallyNotWithDescription":{"name":"toEventuallyNotWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNotEventually":{"name":"toNotEventually","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNotEventuallyWithDescription":{"name":"toNotEventuallyWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNever":{"name":"toNever","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toNeverWithDescription":{"name":"toNeverWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)neverTo":{"name":"neverTo","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)neverToWithDescription":{"name":"neverToWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toAlways":{"name":"toAlways","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)toAlwaysWithDescription":{"name":"toAlwaysWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)alwaysTo":{"name":"alwaysTo","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(py)alwaysToWithDescription":{"name":"alwaysToWithDescription","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/NMBExpectation.html#/c:@M@Nimble@objc(cs)NMBExpectation(cm)failWithMessage:file:line:":{"name":"failWithMessage(_:file:line:)","abstract":"

Undocumented

","parent_name":"NMBExpectation"},"Classes/AssertionRecorder.html#/s:6Nimble17AssertionRecorderC10assertionsSayAA0B6RecordVGvp":{"name":"assertions","abstract":"

All the assertions that were captured by this recorder

","parent_name":"AssertionRecorder"},"Classes/AssertionRecorder.html#/s:6Nimble17AssertionRecorderCACycfc":{"name":"init()","abstract":"

Undocumented

","parent_name":"AssertionRecorder"},"Classes/AssertionRecorder.html#/s:6Nimble17AssertionRecorderC6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"AssertionRecorder"},"Classes/AssertionDispatcher.html#/s:6Nimble19AssertionDispatcherC8handlersACSayAA0B7Handler_pG_tcfc":{"name":"init(handlers:)","abstract":"

Undocumented

","parent_name":"AssertionDispatcher"},"Classes/AssertionDispatcher.html#/s:6Nimble19AssertionDispatcherC6assert_7message8locationySb_AA14FailureMessageCAA14SourceLocationCtF":{"name":"assert(_:message:location:)","abstract":"

Undocumented

","parent_name":"AssertionDispatcher"},"Classes/BadInstructionException.html#/c:@M@Nimble@objc(cs)BadInstructionException(im)initWithCoder:":{"name":"init(coder:)","abstract":"

Undocumented

","parent_name":"BadInstructionException"},"Classes/BadInstructionException.html#/c:@M@Nimble@objc(cs)BadInstructionException(cm)receiveReply:":{"name":"receiveReply(_:)","abstract":"

An Objective-C callable function, invoked from the mach_exc_server callback function catch_mach_exception_raise_state to push the raiseBadInstructionException function onto the stack.

","parent_name":"BadInstructionException"},"Classes/BadInstructionException.html":{"name":"BadInstructionException","abstract":"

A simple NSException subclass. It’s not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type.

"},"Classes/AssertionDispatcher.html":{"name":"AssertionDispatcher","abstract":"

AssertionDispatcher allows multiple AssertionHandlers to receive"},"Classes/AssertionRecorder.html":{"name":"AssertionRecorder","abstract":"

An AssertionHandler that silently records assertions that Nimble makes."},"Classes/NMBExpectation.html":{"name":"NMBExpectation","abstract":"

Undocumented

"},"Classes/NimbleXCTestHandler.html":{"name":"NimbleXCTestHandler","abstract":"

Default handler for Nimble. This assertion handler passes failures along to"},"Classes/NimbleShortXCTestHandler.html":{"name":"NimbleShortXCTestHandler","abstract":"

Alternative handler for Nimble. This assertion handler passes failures along"},"Classes/NMBExpectationMessage.html":{"name":"NMBExpectationMessage","abstract":"

Undocumented

"},"Classes/FailureMessage.html":{"name":"FailureMessage","abstract":"

Encapsulates the failure message that matchers can report to the end user.

"},"Classes/NMBPredicate.html":{"name":"NMBPredicate","abstract":"

Undocumented

"},"Classes/NMBObjCBeCloseToPredicate.html":{"name":"NMBObjCBeCloseToPredicate","abstract":"

Undocumented

"},"Classes/NMBPredicateResult.html":{"name":"NMBPredicateResult","abstract":"

Undocumented

"},"Classes/NMBPredicateStatus.html":{"name":"NMBPredicateStatus","abstract":"

Undocumented

"},"Classes/NMBObjCRaiseExceptionPredicate.html":{"name":"NMBObjCRaiseExceptionPredicate","abstract":"

Undocumented

"},"Classes.html#/BadInstructionException":{"name":"BadInstructionException","abstract":"

Without Mach exceptions or the Objective-C runtime, there’s nothing to put in the exception object. It’s really just a boolean – either a SIGILL was caught or not.

"},"Classes/SourceLocation.html":{"name":"SourceLocation","abstract":"

Undocumented

"},"Classes/NMBStringer.html":{"name":"NMBStringer","abstract":"

Undocumented

"},"Classes.html":{"name":"Classes","abstract":"

The following classes are available globally.

"},"Global%20Variables.html":{"name":"Global Variables","abstract":"

The following global variables are available globally.

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Extensions.html":{"name":"Extensions","abstract":"

The following extensions are available globally.

"},"Functions.html":{"name":"Functions","abstract":"

The following functions are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"},"Typealiases.html":{"name":"Type Aliases","abstract":"

The following type aliases are available globally.

"}} \ No newline at end of file diff --git a/docs/undocumented.json b/docs/undocumented.json new file mode 100644 index 000000000..41c6a004e --- /dev/null +++ b/docs/undocumented.json @@ -0,0 +1,1783 @@ +{ + "warnings": [ + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift", + "line": 32, + "symbol": "NSException.catchException(in:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift", + "line": 42, + "symbol": "BadInstructionException.init(coder:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 31, + "symbol": "MACH_MSG_TYPE_MAKE_SEND", + "symbol_kind": "source.lang.swift.decl.var.global", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 32, + "symbol": "MACH_MSGH_BITS_REMOTE(_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 33, + "symbol": "MACH_MSGH_BITS(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 49, + "symbol": "nativeThreadState", + "symbol_kind": "source.lang.swift.decl.var.global", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 50, + "symbol": "nativeThreadStateCount", + "symbol_kind": "source.lang.swift.decl.var.global", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 52, + "symbol": "nativeMachExceptionMask", + "symbol_kind": "source.lang.swift.decl.var.global", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 55, + "symbol": "EXC_TYPES_COUNT", + "symbol_kind": "source.lang.swift.decl.var.global", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 56, + "symbol": "execTypesCountTuple", + "symbol_kind": "source.lang.swift.decl.struct", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 59, + "symbol": "execTypesCountTuple.value", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift", + "line": 60, + "symbol": "execTypesCountTuple.init()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift", + "line": 3, + "symbol": "AssertionHandler.assert(_:message:location:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift", + "line": 10, + "symbol": "AssertionDispatcher.init(handlers:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift", + "line": 14, + "symbol": "AssertionDispatcher.assert(_:message:location:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift", + "line": 27, + "symbol": "AssertionRecorder.init()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift", + "line": 29, + "symbol": "AssertionRecorder.assert(_:message:location:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 17, + "symbol": "NMBExpectation", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 24, + "symbol": "NMBExpectation.init(actualBlock:negative:file:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 35, + "symbol": "NMBExpectation.withTimeout", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 41, + "symbol": "NMBExpectation.to", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 48, + "symbol": "NMBExpectation.toWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 55, + "symbol": "NMBExpectation.toNot", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 62, + "symbol": "NMBExpectation.toNotWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 69, + "symbol": "NMBExpectation.notTo", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 71, + "symbol": "NMBExpectation.notToWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 73, + "symbol": "NMBExpectation.toEventually", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 83, + "symbol": "NMBExpectation.toEventuallyWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 93, + "symbol": "NMBExpectation.toEventuallyNot", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 103, + "symbol": "NMBExpectation.toEventuallyNotWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 113, + "symbol": "NMBExpectation.toNotEventually", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 117, + "symbol": "NMBExpectation.toNotEventuallyWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 121, + "symbol": "NMBExpectation.toNever", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 131, + "symbol": "NMBExpectation.toNeverWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 141, + "symbol": "NMBExpectation.neverTo", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 145, + "symbol": "NMBExpectation.neverToWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 149, + "symbol": "NMBExpectation.toAlways", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 159, + "symbol": "NMBExpectation.toAlwaysWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 169, + "symbol": "NMBExpectation.alwaysTo", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 173, + "symbol": "NMBExpectation.alwaysToWithDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift", + "line": 177, + "symbol": "NMBExpectation.failWithMessage(_:file:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift", + "line": 7, + "symbol": "NimbleXCTestHandler.assert(_:message:location:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift", + "line": 17, + "symbol": "NimbleShortXCTestHandler.assert(_:message:location:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift", + "line": 75, + "symbol": "recordFailure(_:location:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 9, + "symbol": "Expectation", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 18, + "symbol": "Expectation", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 21, + "symbol": "Expectation", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 36, + "symbol": "Expectation", + "symbol_kind": "source.lang.swift.decl.struct", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 38, + "symbol": "Expectation.expression", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 40, + "symbol": "Expectation.init(expression:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 44, + "symbol": "Expectation.verify(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 86, + "symbol": "Expectation", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 126, + "symbol": "Expectation", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 133, + "symbol": "Expectation", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expectation.swift", + "line": 149, + "symbol": "Expectation", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 1, + "symbol": "ExpectationMessage", + "symbol_kind": "source.lang.swift.decl.enum", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 207, + "symbol": "NMBExpectationMessage", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 214, + "symbol": "NMBExpectationMessage.init(expectedTo:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 217, + "symbol": "NMBExpectationMessage.init(expectedActualValueTo:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 221, + "symbol": "NMBExpectationMessage.init(expectedActualValueTo:customActualValue:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 225, + "symbol": "NMBExpectationMessage.init(fail:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 229, + "symbol": "NMBExpectationMessage.init(prepend:child:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 233, + "symbol": "NMBExpectationMessage.init(appendedMessage:child:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 237, + "symbol": "NMBExpectationMessage.init(prependedMessage:child:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 241, + "symbol": "NMBExpectationMessage.init(details:child:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 245, + "symbol": "NMBExpectationMessage.appendedBeNilHint()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/ExpectationMessage.swift", + "line": 249, + "symbol": "NMBExpectationMessage.toSwift()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expression.swift", + "line": 27, + "symbol": "Expression.location", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expression.swift", + "line": 28, + "symbol": "Expression.isClosure", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expression.swift", + "line": 85, + "symbol": "Expression.evaluate()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Expression.swift", + "line": 89, + "symbol": "Expression.withoutCaching()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 7, + "symbol": "FailureMessage.expected", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 8, + "symbol": "FailureMessage.actualValue", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 9, + "symbol": "FailureMessage.to", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 10, + "symbol": "FailureMessage.postfixMessage", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 11, + "symbol": "FailureMessage.postfixActual", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 16, + "symbol": "FailureMessage.userDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 18, + "symbol": "FailureMessage.stringValue", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 36, + "symbol": "FailureMessage.init()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/FailureMessage.swift", + "line": 39, + "symbol": "FailureMessage.init(stringValue:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/AllPass.swift", + "line": 1, + "symbol": "allPass(_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/AllPass.swift", + "line": 13, + "symbol": "allPass(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/AllPass.swift", + "line": 26, + "symbol": "allPass(_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/AllPass.swift", + "line": 72, + "symbol": "NMBPredicate.allPassMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Async.swift", + "line": 9, + "symbol": "AsyncDefaults.timeout", + "symbol_kind": "source.lang.swift.decl.var.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Async.swift", + "line": 10, + "symbol": "AsyncDefaults.pollInterval", + "symbol_kind": "source.lang.swift.decl.var.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift", + "line": 60, + "symbol": "NMBPredicate.beAKindOfMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift", + "line": 50, + "symbol": "NMBPredicate.beAnInstanceOfMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 4, + "symbol": "DefaultDelta", + "symbol_kind": "source.lang.swift.decl.var.global", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 6, + "symbol": "defaultDelta()", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 70, + "symbol": "NMBObjCBeCloseToPredicate", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 84, + "symbol": "NMBObjCBeCloseToPredicate.within", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 93, + "symbol": "NMBPredicate.beCloseToMatcher(_:within:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 99, + "symbol": "beCloseTo(_:within:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 128, + "symbol": "Expectation.≈(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 135, + "symbol": "Expectation.≈(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 140, + "symbol": "Expectation.≈(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 144, + "symbol": "Expectation.==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 151, + "symbol": "Expectation.≈(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 156, + "symbol": "Expectation.≈(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 160, + "symbol": "Expectation.==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 173, + "symbol": "±(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift", + "line": 177, + "symbol": "±(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeEmpty.swift", + "line": 82, + "symbol": "NMBPredicate.beEmptyMatcher()", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift", + "line": 11, + "symbol": ">(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift", + "line": 29, + "symbol": ">(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift", + "line": 34, + "symbol": "NMBPredicate.beGreaterThanMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift", + "line": 12, + "symbol": ">=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift", + "line": 30, + "symbol": ">=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift", + "line": 35, + "symbol": "NMBPredicate.beGreaterThanOrEqualToMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift", + "line": 19, + "symbol": "Expectation.===(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift", + "line": 23, + "symbol": "Expectation.!==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift", + "line": 40, + "symbol": "NMBPredicate.beIdenticalToMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLessThan.swift", + "line": 11, + "symbol": "<(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLessThan.swift", + "line": 28, + "symbol": "<(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLessThan.swift", + "line": 33, + "symbol": "NMBPredicate.beLessThanMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift", + "line": 11, + "symbol": "<=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift", + "line": 28, + "symbol": "<=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift", + "line": 33, + "symbol": "NMBPredicate.beLessThanOrEqualToMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLogical.swift", + "line": 117, + "symbol": "NMBPredicate.beTruthyMatcher()", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLogical.swift", + "line": 124, + "symbol": "NMBPredicate.beFalsyMatcher()", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLogical.swift", + "line": 131, + "symbol": "NMBPredicate.beTrueMatcher()", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeLogical.swift", + "line": 138, + "symbol": "NMBPredicate.beFalseMatcher()", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeNil.swift", + "line": 27, + "symbol": "Expectation.==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeNil.swift", + "line": 31, + "symbol": "Expectation.!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeNil.swift", + "line": 40, + "symbol": "NMBPredicate.beNilMatcher()", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeVoid.swift", + "line": 10, + "symbol": "Expectation.==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeVoid.swift", + "line": 14, + "symbol": "Expectation.!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/BeginWith.swift", + "line": 43, + "symbol": "NMBPredicate.beginWithMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Contain.swift", + "line": 61, + "symbol": "contain(_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Contain.swift", + "line": 79, + "symbol": "contain(_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Contain.swift", + "line": 94, + "symbol": "contain(_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Contain.swift", + "line": 107, + "symbol": "NMBPredicate.containMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift", + "line": 1, + "symbol": "containElementSatisfying(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift", + "line": 32, + "symbol": "NMBPredicate.containElementSatisfyingMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/EndWith.swift", + "line": 53, + "symbol": "NMBPredicate.endWithMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 13, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 20, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 38, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 45, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 63, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 70, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 88, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 95, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 113, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift", + "line": 120, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 134, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 138, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 142, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 146, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 150, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 154, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 158, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 162, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 166, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 170, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 174, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 178, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 182, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 186, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 190, + "symbol": "==(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 194, + "symbol": "!=(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Equal.swift", + "line": 202, + "symbol": "NMBPredicate.equalMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/HaveCount.swift", + "line": 50, + "symbol": "NMBPredicate.haveCountMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Match.swift", + "line": 16, + "symbol": "NMBPredicate.matchMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 9, + "symbol": "NMBContainer.contains(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 23, + "symbol": "NMBCollection.count", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 37, + "symbol": "NMBOrderedCollection.object(at:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 42, + "symbol": "NMBDoubleConvertible", + "symbol_kind": "source.lang.swift.decl.protocol", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 43, + "symbol": "NMBDoubleConvertible.doubleValue", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 60, + "symbol": "Date.doubleValue", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 66, + "symbol": "NSDate.doubleValue", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 73, + "symbol": "Date.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 79, + "symbol": "NSDate.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 91, + "symbol": "NMBComparable.NMB_compare(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 95, + "symbol": "NSNumber.NMB_compare(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift", + "line": 101, + "symbol": "NSString.NMB_compare(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/PostNotification.swift", + "line": 85, + "symbol": "postNotifications(_:from:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/PostNotification.swift", + "line": 93, + "symbol": "postDistributedNotifications(_:from:names:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 15, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 31, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 32, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 32, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 33, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 34, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 39, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 39, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 42, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 46, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 46, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 49, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 49, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 52, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 59, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 71, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 81, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 85, + "symbol": "ExpectationStyle", + "symbol_kind": "source.lang.swift.decl.enum", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 86, + "symbol": "ExpectationStyle.toMatch", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 86, + "symbol": "ExpectationStyle.toNotMatch", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 92, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 106, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 116, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 196, + "symbol": "PredicateBlock", + "symbol_kind": "source.lang.swift.decl.typealias", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 198, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 201, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 201, + "symbol": "NMBPredicate.init(predicate:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 215, + "symbol": "NMBPredicateResult", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 216, + "symbol": "NMBPredicateResult.status", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 217, + "symbol": "NMBPredicate", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 217, + "symbol": "NMBPredicateResult.message", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 219, + "symbol": "NMBPredicateResult.init(status:message:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 224, + "symbol": "NMBPredicateResult.init(bool:message:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 229, + "symbol": "NMBPredicateResult.toSwift()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 236, + "symbol": "PredicateResult.toObjectiveC()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 241, + "symbol": "NMBPredicateStatus", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 247, + "symbol": "NMBPredicateStatus.matches", + "symbol_kind": "source.lang.swift.decl.var.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 248, + "symbol": "NMBPredicateStatus.doesNotMatch", + "symbol_kind": "source.lang.swift.decl.var.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 249, + "symbol": "NMBPredicateStatus.fail", + "symbol_kind": "source.lang.swift.decl.var.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 251, + "symbol": "NMBPredicateStatus.hash", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 253, + "symbol": "NMBPredicateStatus.isEqual(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 260, + "symbol": "NMBPredicateStatus.from(status:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 268, + "symbol": "NMBPredicateStatus.from(bool:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 272, + "symbol": "NMBPredicateStatus.toSwift()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/Predicate.swift", + "line": 284, + "symbol": "PredicateStatus.toObjectiveC()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/RaisesException.swift", + "line": 144, + "symbol": "NMBObjCRaiseExceptionPredicate", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/RaisesException.swift", + "line": 168, + "symbol": "NMBObjCRaiseExceptionPredicate.named", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/RaisesException.swift", + "line": 180, + "symbol": "NMBObjCRaiseExceptionPredicate.reason", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/RaisesException.swift", + "line": 192, + "symbol": "NMBObjCRaiseExceptionPredicate.userInfo", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/RaisesException.swift", + "line": 204, + "symbol": "NMBObjCRaiseExceptionPredicate.satisfyingBlock", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/RaisesException.swift", + "line": 218, + "symbol": "NMBPredicate.raiseExceptionMatcher()", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift", + "line": 39, + "symbol": "&&(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift", + "line": 47, + "symbol": "NMBPredicate.satisfyAllOfMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift", + "line": 39, + "symbol": "||(_:_:)", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift", + "line": 47, + "symbol": "NMBPredicate.satisfyAnyOfMatcher(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift", + "line": 85, + "symbol": "throwAssertion()", + "symbol_kind": "source.lang.swift.decl.function.free", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/ToSucceed.swift", + "line": 7, + "symbol": "ToSucceedResult.succeeded", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Matchers/ToSucceed.swift", + "line": 8, + "symbol": "ToSucceedResult.failed(reason:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/SourceLocation.swift", + "line": 11, + "symbol": "FileString", + "symbol_kind": "source.lang.swift.decl.typealias", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/SourceLocation.swift", + "line": 14, + "symbol": "SourceLocation", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/SourceLocation.swift", + "line": 15, + "symbol": "SourceLocation.file", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/SourceLocation.swift", + "line": 16, + "symbol": "SourceLocation.line", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/SourceLocation.swift", + "line": 28, + "symbol": "SourceLocation.description", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 27, + "symbol": "TestOutputStringConvertible.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 31, + "symbol": "Double.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 37, + "symbol": "Float.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 43, + "symbol": "NSNumber.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 65, + "symbol": "Array.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 72, + "symbol": "AnySequence.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 90, + "symbol": "NSArray.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 97, + "symbol": "NSIndexSet.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 104, + "symbol": "String.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 110, + "symbol": "Data.testDescription", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 144, + "symbol": "NMBStringer", + "symbol_kind": "source.lang.swift.decl.class", + "warning": "undocumented" + }, + { + "file": "/Users/jsq/Developer/GitHub/Nimble/Sources/Nimble/Utils/Stringers.swift", + "line": 145, + "symbol": "NMBStringer.stringify(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.class", + "warning": "undocumented" + } + ], + "source_directory": "/Users/jsq/Developer/GitHub/Nimble" +} \ No newline at end of file diff --git a/script/build_docs.zsh b/script/build_docs.zsh new file mode 100755 index 000000000..c35b3898a --- /dev/null +++ b/script/build_docs.zsh @@ -0,0 +1,48 @@ +#!/bin/zsh + +# Created by Jesse Squires +# https://www.jessesquires.com +# +# Copyright © 2020-present Jesse Squires +# +# Jazzy: https://github.com/realm/jazzy/releases/latest +# Generates documentation using jazzy and checks for installation. + +VERSION="0.14.2" + +FOUND=$(jazzy --version) +LINK="https://github.com/realm/jazzy" +INSTALL="gem install jazzy" + +if which jazzy >/dev/null; then + jazzy \ + --clean \ + --author "Nimble Contributors" \ + --author_url "https://github.com/Quick/Nimble" \ + --github_url "https://github.com/Quick/Nimble" \ + --module "Nimble" \ + --source-directory . \ + --readme "README.md" \ + --output docs/ +else + echo " + Error: Jazzy not installed! + + Download: $LINK + Install: $INSTALL + " + exit 1 +fi + +if [ "$FOUND" != "jazzy version: $VERSION" ]; then + echo " + Warning: incorrect Jazzy installed! Please upgrade. + Expected: $VERSION + Found: $FOUND + + Download: $LINK + Install: $INSTALL + " +fi + +exit