Contents

AttachableWrapper

A protocol describing a type whose instances can be recorded and saved as part of a test run and which contains another value that it stands in for.

Declaration

protocol AttachableWrapper<Wrapped> : Attachable, ~Copyable

Overview

To attach an attachable value to a test, pass it to record(_:named:sourceLocation:). To further configure an attachable value before you attach it, use it to initialize an instance of Attachment and set its properties before passing it to record(_:sourceLocation:). An attachable value can only be attached to a test once.

A type can conform to this protocol if it represents another type that cannot directly conform to Attachable, such as a non-final class or a type declared in a third-party module.

Topics

Associated Types

Instance Properties

See Also

Attaching values to tests