Skip to content

Commit 1be1242

Browse files
committed
Add extra test
1 parent 69faef1 commit 1be1242

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/libraries/System.Memory/tests/Span/StringSearchValues.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
using System.Diagnostics;
66
using System.Globalization;
77
using System.Linq;
8+
using System.Runtime.CompilerServices;
89
using System.Runtime.ExceptionServices;
910
using System.Runtime.InteropServices;
11+
using System.Runtime.Intrinsics;
12+
using System.Runtime.Intrinsics.X86;
1013
using System.Threading;
1114
using System.Threading.Tasks;
1215
using Microsoft.DotNet.RemoteExecutor;
@@ -19,6 +22,25 @@ public static class StringSearchValuesTests
1922
public static bool CanTestInvariantCulture => RemoteExecutor.IsSupported;
2023
public static bool CanTestNls => RemoteExecutor.IsSupported && OperatingSystem.IsWindows();
2124

25+
[Fact]
26+
public static void SanityCheck()
27+
{
28+
if (Vector512.IsHardwareAccelerated && Avx512BW.IsSupported)
29+
{
30+
throw new Exception("Yay?");
31+
}
32+
}
33+
34+
[Fact]
35+
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
36+
public static void SanityCheckAO()
37+
{
38+
if (Vector512.IsHardwareAccelerated && Avx512BW.IsSupported)
39+
{
40+
throw new Exception("Yay?");
41+
}
42+
}
43+
2244
[Theory]
2345
[InlineData(StringComparison.Ordinal, "a", "ab", "abc", "bc")]
2446
[InlineData(StringComparison.Ordinal, "A", "ab", "aBc", "Bc")]

0 commit comments

Comments
 (0)