Contents

Suite(_:_:)

Declare a test suite.

Declaration

@attached(peer) macro Suite(_ displayName: String? = nil, _ traits: any SuiteTrait...)

Parameters

  • displayName:

    The customized display name of this test suite. If the value of this argument is nil, the display name of the test is derived from the associated type’s name.

  • traits:

    Zero or more traits to apply to this test suite.

Overview

A test suite is a type that contains one or more test functions. Any type may be a test suite.

The use of the @Suite attribute is optional; types are recognized as test suites even if they do not have the @Suite attribute applied to them.

When adding test functions to a type extension, do not use the @Suite attribute. Only a type’s primary declaration may have the @Suite attribute applied to it.

See Also

Related Documentation

Essentials