Add regression test

This commit is contained in:
Bond_009
2026-06-15 21:20:06 +02:00
parent a9a02719ab
commit 0022508889
2 changed files with 19 additions and 1 deletions

View File

@@ -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

View File

@@ -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"));
}
}