-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add RuntimeInformation.FrameworkDescription test to validate version #93913
Add RuntimeInformation.FrameworkDescription test to validate version #93913
Conversation
We need to make sure the string contains only the stabilized version in servicing, or a non-stabilized one otherwise. This prevents issues like dotnet#45812 and what we hit in dotnet#93807. Closes dotnet#45812
Tagging subscribers to this area: @dotnet/area-system-runtime |
src/libraries/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
Outdated
Show resolved
Hide resolved
…n/tests/DescriptionNameTests.cs Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
if (string.IsNullOrEmpty(version)) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be an assert instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code explicitly handles the case where there is no version information so the test should too:
Line 29 in 08903c0
s_frameworkDescription = !versionString.Trim().IsEmpty ? $"{FrameworkName} {versionString}" : FrameworkName; |
…otnet#93913) We need to make sure the string contains only the stabilized version in servicing, or a non-stabilized one otherwise. This prevents issues like dotnet#45812 and what we hit in dotnet#93807. Closes dotnet#45812
We need to make sure the string contains only the stabilized version in servicing, or a non-stabilized one otherwise. This prevents issues like #45812 and what we hit in #93807.
Closes #45812