Skip to content

Commit 09afe7a

Browse files
Windows 21H1 support in OsBrandStringHelper
1 parent b0683fc commit 09afe7a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/BenchmarkDotNet/Environments/OsBrandStringHelper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ public class OsBrandStringHelper
9797
{ "10.0.18362", "10 19H1 [1903, May 2019 Update]" },
9898
{ "10.0.18363", "10 19H2 [1909, November 2019 Update]" },
9999
{ "10.0.19041", "10 20H1 [2004, May 2020 Update]" },
100-
{ "10.0.19042", "10 20H2 [20H2, October 2020 Update]" }
100+
{ "10.0.19042", "10 20H2 [20H2, October 2020 Update]" },
101+
{ "10.0.19043", "10 21H1 [21H1, May 2021 Update]" }
101102
};
102103

103104
private class Windows10Version
@@ -143,6 +144,7 @@ public string ToPrettifiedString([CanBeNull] int? ubr)
143144
new Windows10Version("1909", "19H2", "November 2019 Update", 18363),
144145
new Windows10Version("2004", "20H1", "May 2020 Update", 19041),
145146
new Windows10Version("20H2", "20H2", "October 2020 Update", 19042),
147+
new Windows10Version("21H1", "21H1", "May 2021 Update", 19043),
146148
};
147149

148150
[CanBeNull]

tests/BenchmarkDotNet.Tests/Environments/OsBrandStringTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public void WindowsIsPrettified(string originalVersion, string prettifiedName)
4343
[InlineData("10.0.18363", 657, "Windows 10.0.18363.657 (1909/November2019Update/19H2)")]
4444
[InlineData("10.0.19041", 1, "Windows 10.0.19041.1 (2004/May2020Update/20H1)")]
4545
[InlineData("10.0.19042", 746, "Windows 10.0.19042.746 (20H2/October2020Update)")]
46+
[InlineData("10.0.19043", 964, "Windows 10.0.19043.964 (21H1/May2021Update)")]
4647
public void WindowsWithUbrIsPrettified(string originalVersion, int ubr, string prettifiedName)
4748
=> Check(OsBrandStringHelper.Prettify("Windows", originalVersion, ubr), prettifiedName);
4849

@@ -51,6 +52,7 @@ public void WindowsWithUbrIsPrettified(string originalVersion, int ubr, string p
5152
[InlineData("macOS 10.13.4 (17E199)", "Darwin 17.5.0", "macOS High Sierra 10.13.4 (17E199) [Darwin 17.5.0]")]
5253
[InlineData("macOS 10.15.4 (19E266)", "Darwin 19.4.0", "macOS Catalina 10.15.4 (19E266) [Darwin 19.4.0]")]
5354
[InlineData("macOS 11.1 (20C69)", "Darwin 20.2.0", "macOS Big Sur 11.1 (20C69) [Darwin 20.2.0]")]
55+
[InlineData("macOS 11.3.1 (20E241)", "Darwin 20.4.0", "macOS Big Sur 11.3.1 (20E241) [Darwin 20.4.0]")]
5456
public void MacOSXIsPrettified(string systemVersion, string kernelVersion, string prettifiedName)
5557
=> Check(OsBrandStringHelper.PrettifyMacOSX(systemVersion, kernelVersion), prettifiedName);
5658
}

0 commit comments

Comments
 (0)