Fix creating OperatingSystem with PlatformID.Other (#39130)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Sat, 11 Jul 2020 01:49:23 +0000 (03:49 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2020 01:49:23 +0000 (03:49 +0200)
commit9bd7dd7c6200f5a942858d558088d84f74a5732e
tree64cb7fae6ddd86fe123876bf403f4812760345cd
parent379496a38f7324de1fd72fdf878f4647fe40f344
Fix creating OperatingSystem with PlatformID.Other (#39130)

Creating an OperatingSystem with PlatformID.Other would result in an exception about an unexpected enum value.
https://github.com/dotnet/runtime/pull/38790 was missing some tests that verified this behavior.
src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs
src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs
src/libraries/System.Runtime.Extensions/tests/System/OperatingSystemTests.cs