Table of Contents

Method FormatIndexedMismatch

Namespace
Xunit.Sdk
Assembly
xunit.v3.assert.dll

FormatIndexedMismatch(int?, out int?, int)

Formats the collection when you have a mismatched index. The formatted result will be the section of the collection surrounded by the mismatched item.

public override string FormatIndexedMismatch(int? mismatchedIndex, out int? pointerIndent, int depth = 1)

Parameters

mismatchedIndex int?

The index of the mismatched item

pointerIndent int?

How many spaces into the output value the pointed-to item begins at

depth int

The optional printing depth (1 indicates a top-level value)

Returns

string

The formatted collection

FormatIndexedMismatch(int, int, int?, out int?, int)

Formats the collection when you have a mismatched index. The formatted result will be the section of the collection from startIndex to endIndex. These indices are usually obtained by calling GetMismatchExtents(int?, out int, out int).

public override string FormatIndexedMismatch(int startIndex, int endIndex, int? mismatchedIndex, out int? pointerIndent, int depth = 1)

Parameters

startIndex int

The start index of the collection to print

endIndex int

The end index of the collection to print

mismatchedIndex int?

The mismatched item index

pointerIndent int?

How many spaces into the output value the pointed-to item begins at

depth int

The optional printing depth (1 indicates a top-level value)

Returns

string

The formatted collection

FormatIndexedMismatch(ReadOnlySpan<T>, int?, out int?, int)

Formats a span with a mismatched index.

public static string FormatIndexedMismatch(ReadOnlySpan<T> span, int? mismatchedIndex, out int? pointerIndent, int depth = 1)

Parameters

span ReadOnlySpan<T>

The span to be formatted

mismatchedIndex int?

The mismatched index point

pointerIndent int?

How many spaces into the output value the pointed-to item begins at

depth int

The optional printing depth (1 indicates a top-level value)

Returns

string

The formatted span