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
mismatchedIndexint?The index of the mismatched item
pointerIndentint?How many spaces into the output value the pointed-to item begins at
depthintThe 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
startIndexintThe start index of the collection to print
endIndexintThe end index of the collection to print
mismatchedIndexint?The mismatched item index
pointerIndentint?How many spaces into the output value the pointed-to item begins at
depthintThe 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
spanReadOnlySpan<T>The span to be formatted
mismatchedIndexint?The mismatched index point
pointerIndentint?How many spaces into the output value the pointed-to item begins at
depthintThe optional printing depth (1 indicates a top-level value)
Returns
- string
The formatted span