Skip to content

Commit 5675627

Browse files
Fix local DisassemblyDiagnoserTests run on macOS
1 parent 775ad43 commit 5675627

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/BenchmarkDotNet.IntegrationTests/DisassemblyDiagnoserTests.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ public static IEnumerable<object[]> GetAllJits()
4141
yield return new object[] { Jit.RyuJit, Platform.Arm64, CoreRuntime.Core70 }; // .NET Core arm64
4242
}
4343
}
44+
if (RuntimeInformation.IsMacOS())
45+
{
46+
// This scope of tests is not supported on macOS
47+
// However, when the MemberData method provides no data, xUnit throws an "No data found" InvalidOperationException
48+
// In order to fix the problem, we should provide at least one input data set
49+
// All the tests check the OS on the first line and stop the test if it's macOS
50+
yield return new object[] { Jit.Default, Platform.AnyCpu, CoreRuntime.Latest };
51+
}
52+
4453
// we could add new object[] { Jit.Llvm, Platform.X64, new MonoRuntime() } here but our CI would need to have Mono installed..
4554
}
4655

0 commit comments

Comments
 (0)