Example

public class Example : _ExampleBase

Undocumented

  • A boolean indicating whether the example is a shared example; i.e.: whether it is an example defined with itBehavesLike.

    Declaration

    Swift

    public var isSharedExample: Bool
  • The site at which the example is defined. This must be set correctly in order for Xcode to highlight the correct line in red when reporting a failure.

    Declaration

    Swift

    public var callsite: Callsite
  • Undocumented

    Declaration

    Swift

    public override var description: String { get }
  • The example name. A name is a concatenation of the name of the example group the example belongs to, followed by the description of the example itself.

    The example name is used to generate a test method selector to be displayed in Xcode’s test navigator.

    Declaration

    Swift

    public var name: String { get }
  • run() Asynchronous

    Undocumented

    Declaration

    Swift

    public func run() async
  • Returns a boolean indicating whether two Example objects are equal. If two examples are defined at the exact same callsite, they must be equal.

    Declaration

    Swift

    @nonobjc
    public static func == (lhs: Example, rhs: Example) -> Bool