Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/9.0-staging] Fix
IsOSVersionAtLeast
when build or revision…
… are not provided (#109332) * Default build and revision numbers to 0 if they are -1 on MacCatalyst * Update src/libraries/System.Private.CoreLib/src/System/Environment.OSVersion.MacCatalyst.cs Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> * Add three-parameter and two-parameter overloads for IsOSPlatformVersionAtLeast * Update IsOSVersionAtLeast to handle not provided values * Check only build and revision * Update src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Update src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com> * New line * Update tests to pass when build or revision are -1 * Add isCurrentOS to the Assert.Equal * Unspecified build/revision components are to be treated as zeros * Unspecified build component is to be treated as zero * Unspecified build or revision component is to be treated as zero * Update src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> * Update src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> * Normalize build component to 0 if undefined * Add comments * Revert normalizing build component to 0 --------- Co-authored-by: Milos Kotlar <kotlarmilos@gmail.com> Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
- Loading branch information