Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix string conversion of Microsoft.TestPlatform.Extensions.TrxLogger.ObjectMode.TestOutcome #4243

Merged
merged 7 commits into from Jan 4, 2023
Merged
Expand Up @@ -88,13 +88,20 @@ internal enum TestOutcome
/// </summary>
Pending,

// NOTE: OLD CODE WAS Min = Error and Max = Pending
MarcoRossignoli marked this conversation as resolved.
Show resolved Hide resolved
// This doesn't work well with the coversion to string for the reason explained here:
MarcoRossignoli marked this conversation as resolved.
Show resolved Hide resolved
// https://learn.microsoft.com/en-us/dotnet/api/system.enum.tostring?view=net-7.0
MarcoRossignoli marked this conversation as resolved.
Show resolved Hide resolved
// Notes to Callers: If multiple enumeration members have the same underlying value and you attempt to retrieve the
// string representation of an enumeration member's name based on its underlying value
// We fixed removing the equality above to break less as possible. But the returned value won't be the expected Min/Max
MarcoRossignoli marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// The min value of this enum
/// </summary>
Min = Error,
Min,

/// <summary>
/// The max value of this enum
/// </summary>
Max = Pending
Max
}