diff options
| author | Bond_009 <bond.009@outlook.com> | 2026-06-15 21:20:06 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2026-06-15 21:20:06 +0200 |
| commit | 0022508889adb8b60bde8bc5e69640d3ff8dd346 (patch) | |
| tree | e4aec840753f2e58bedd95c0bedd5b42fde4d57f | |
| parent | a9a02719abd0faefbd90550f6ba576d2f63db436 (diff) | |
Add regression test
| -rw-r--r-- | MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.cs | 2 | ||||
| -rw-r--r-- | tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.cs b/MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.cs index 14a628e226..8cae6a238d 100644 --- a/MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.cs +++ b/MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.cs @@ -18,7 +18,7 @@ public static partial class ApplePlatformHelper { private static readonly string[] _av1DecodeBlacklistedCpuClass = ["M1", "M2"]; - private static string GetSysctlValue(string name) + internal static string GetSysctlValue(string name) { nuint length = 0; // Get length of the value diff --git a/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs b/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs new file mode 100644 index 0000000000..586a382485 --- /dev/null +++ b/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs @@ -0,0 +1,18 @@ +using System; +using System.Runtime.Versioning; +using MediaBrowser.MediaEncoding.Encoder; +using Xunit; + +namespace Jellyfin.MediaEncoding.Tests; + +[SupportedOSPlatform("macos")] +public class ApplePlatformHelperTests +{ + [Fact] + public void GetSysctlValue_CpuBrand_NotEmpty() + { + Assert.SkipUnless(OperatingSystem.IsMacOS(), "macOS-only test"); + + Assert.NotEmpty(ApplePlatformHelper.GetSysctlValue("machdep.cpu.brand_string")); + } +} |
