TestState
@propertyWrapper
public struct TestState<T>
A property wrapper that will automatically reset the contained value after each test.
-
Undocumented
Declaration
Swift
public var wrappedValue: T! { get set } -
Resets the property to nil after each test.
Declaration
Swift
public init() -
Undocumented
Declaration
Swift
public init(wrappedValue: @escaping @autoclosure () -> T?) -
Sets the property to an initial value before each test and resets it to nil after each test.
Declaration
Swift
public init(_ initialValue: @escaping @autoclosure () -> T)Parameters
initialValueAn autoclosure to return the initial value to use before the test.
View on GitHub