Skip to content

Commit

Permalink
Exclude simulated tests on .NET Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
vbreuss committed Apr 20, 2024
1 parent 9f53f66 commit bf4424b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,28 @@ public static TheoryData<string, TestOS> TestData()
"/", TestOS.All
},
{
@"\", TestOS.Windows
@"\", TestOS.Windows | TestOS.Framework
},
{
"/foo", TestOS.All
},
{
@"\foo", TestOS.Windows
@"\foo", TestOS.Windows | TestOS.Framework
},
{
"foo/bar", TestOS.None
},
{
"a:", TestOS.Windows
"a:", TestOS.Windows | TestOS.Framework
},
{
"z:", TestOS.Windows
"z:", TestOS.Windows | TestOS.Framework
},
{
"A:", TestOS.Windows
"A:", TestOS.Windows | TestOS.Framework
},
{
"Z:", TestOS.Windows
"Z:", TestOS.Windows | TestOS.Framework
},
{
"@:", TestOS.Framework
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public static T DependsOnOS<T>(this Test test, T windows, T macOS, T linux)
public static bool RunsOn(this Test test, TestOS operatingSystem)
=> (operatingSystem.HasFlag(TestOS.Linux) && test.RunsOnLinux) ||
(operatingSystem.HasFlag(TestOS.Mac) && test.RunsOnMac) ||
(operatingSystem.HasFlag(TestOS.Windows) && test.RunsOnWindows) ||
(operatingSystem.HasFlag(TestOS.Windows) && test is { RunsOnWindows: true, IsNetFramework: false }) ||
(operatingSystem.HasFlag(TestOS.Framework) && test.IsNetFramework);
}

0 comments on commit bf4424b

Please sign in to comment.