Contents

encodeTestArgument(to:)

Encode this test argument.

Declaration

func encodeTestArgument(to encoder: some Encoder) throws

Parameters

  • encoder:

    The encoder to write data to.

Discussion

The encoded form of a test argument should be stable and unique to allow re-running specific test cases of a parameterized test function. For optimal performance, large values which are not necessary to uniquely identify the test argument later should be omitted. Encoded values do not need to be human-readable.

For more information on how to implement this function, see the documentation for Encodable.