ExampleBase

public class ExampleBase : _ExampleBase

The common superclass of both Example and AsyncExample. This is mostly used for determining filtering (focusing or pending) and other cases where we want to apply something to any kind of example.

  • 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
  • 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 }