Structureswift-testing 6.0.2Testing
Duration
A type representing the duration of a time limit applied to a test.
TimeLimitTrait.swift:24- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
struct Duration
This type is intended for use specifically for specifying test timeouts with TimeLimitTrait
. It is used instead of Swift’s built-in Duration
type because test timeouts do not support high-precision, arbitrarily short durations. The smallest allowed unit of time is minutes.
Other members in extension
Instance members
var isRecursive: Bool
var timeLimit: Swift.Duration
The maximum amount of time a test may run for before timing out.
Citizens in Testing
Conformances
Type members
static func minutes(some BinaryInteger
) -> TimeLimitTrait.Duration Construct a time limit duration given a number of minutes.