Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ public static bool IsDataConsideredSingleArgumentValue(object?[]? data, Paramete
&& GetDataParameterCount(parameters) == 1
&& parameters[0].ParameterType == typeof(object[])
&& !IsDataWithExplicitCancellationToken(data, parameters)
&& !(parameters.Length == 2 && data.Length == 1
&& TryHandleTupleDataSource(data[0], parameters, out object?[] tupleArguments)
&& IsDataWithExplicitCancellationToken(tupleArguments, parameters));
&& !IsSingleTupleArgumentWithExplicitCancellationToken(data, parameters);

public static bool TryHandleITestDataRow(
object?[] d,
Expand Down Expand Up @@ -95,6 +93,12 @@ public static bool TryHandleTupleDataSource(object? data, ParameterInfo[] testMe
return true;
}

// A tuple supplying the data argument and its token is a full row, not an object[] value to wrap.
private static bool IsSingleTupleArgumentWithExplicitCancellationToken(object?[] data, ParameterInfo[] parameters)
=> parameters.Length == 2 && data.Length == 1
&& TryHandleTupleDataSource(data[0], parameters, out object?[] tupleArguments)
&& IsDataWithExplicitCancellationToken(tupleArguments, parameters);

private static bool IsDataWithExplicitCancellationToken(object?[] data, ParameterInfo[] parameters)
=> TestDataSourceUtilities.IsDataWithExplicitCancellationToken(data, parameters);

Expand Down
Loading