Back to Quick

TestState

docs/Structs/TestState.html

7.6.21.2 KB
Original Source

TestState

@propertyWrapper
public struct TestState<T>

A property wrapper that will automatically reset the contained value after each test.

`

                wrappedValue
                `

Undocumented

Declaration

Swift

public var wrappedValue: T! { get set }

`

                init()
                `

Resets the property to nil after each test.

Declaration

Swift

public init()

`

                init(wrappedValue:)
                `

Undocumented

Declaration

Swift

public init(wrappedValue: @escaping @autoclosure () -> T?)

`

                init(_:)
                `

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

| initialValue |

An autoclosure to return the initial value to use before the test.

|

© 2025 Quick Contributors. All rights reserved. (Last updated: 2025-06-26)

Generated by jazzy ♪♫ v0.15.3, a Realm project.