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 creating OperatingSystem with PlatformID.Other #39130

Merged
merged 2 commits into from
Jul 11, 2020

Conversation

akoeplinger
Copy link
Member

Creating an OperatingSystem with PlatformID.Other would result in an exception about an unexpected enum value.
#38790 was missing some tests that verified this behavior.

Creating an OperatingSystem with PlatformID.Other would result in an exception about an unexpected enum value.
dotnet#38790 was missing some tests that verified this behavior.
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test validating that other is returned on browser?

@akoeplinger
Copy link
Member Author

@stephentoub there was one in System.Runtime.Extensions and it was actually failing but we're not running it on CI until #38996 is merged. I fixed it to verify the expected value and tested locally.

@akoeplinger akoeplinger force-pushed the fix-platformid-other branch from 1e101d6 to a92304e Compare July 11, 2020 00:18
@akoeplinger akoeplinger merged commit 9bd7dd7 into dotnet:master Jul 11, 2020
@akoeplinger akoeplinger deleted the fix-platformid-other branch July 11, 2020 01:49
@@ -65,6 +65,7 @@ public string VersionString
case PlatformID.Unix: os = "Unix "; break;
case PlatformID.Xbox: os = "Xbox "; break;
case PlatformID.MacOSX: os = "Mac OS X "; break;
case PlatformID.Other: os = "Other"; break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need a space after it? The others have a space before the version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this, opened #39180.

akoeplinger added a commit to akoeplinger/runtime that referenced this pull request Jul 13, 2020
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants