Skip to content

Commit e4f9727

Browse files
committed
In .net8 there is no grouping
1 parent 330ca36 commit e4f9727

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

tests/ImageSharp.Tests/TestUtilities/Tests/FeatureTestRunnerTests.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,14 @@ static void AssertHwIntrinsicsFeatureDisabled(string intrinsic)
115115
Assert.False(Pclmulqdq.IsSupported);
116116
break;
117117
case HwIntrinsics.DisableSSE42:
118+
#if NET10_0_OR_GREATER
118119
Assert.False(Sse3.IsSupported, "Sse3 should be disabled.");
119120
Assert.False(Ssse3.IsSupported, "Ssse3 should be disabled.");
120121
Assert.False(Sse41.IsSupported, "Sse41 should be disabled.");
121-
Assert.False(Sse42.IsSupported, "Sse42 should be disabled.");
122122
Assert.False(Popcnt.IsSupported, "Popcnt should be disabled.");
123+
#else
124+
Assert.False(Sse42.IsSupported, "Sse42 should be disabled.");
125+
#endif
123126
break;
124127
case HwIntrinsics.DisableAVX:
125128
Assert.False(Avx.IsSupported);
@@ -206,23 +209,30 @@ static void AssertHwIntrinsicsFeatureDisabled(string serializable, string intrin
206209
break;
207210
case HwIntrinsics.DisableAES:
208211
Assert.False(Aes.IsSupported);
212+
#if NET10_0_OR_GREATER
209213
Assert.False(Pclmulqdq.IsSupported);
214+
#endif
210215
break;
211216
case HwIntrinsics.DisableSSE42:
212-
Assert.False(Ssse3.IsSupported);
213-
Assert.False(Sse41.IsSupported);
214-
Assert.False(Sse42.IsSupported);
215-
Assert.False(Popcnt.IsSupported);
217+
#if NET10_0_OR_GREATER
218+
Assert.False(Sse3.IsSupported, "Sse3 should be disabled.");
219+
Assert.False(Ssse3.IsSupported, "Ssse3 should be disabled.");
220+
Assert.False(Sse41.IsSupported, "Sse41 should be disabled.");
221+
Assert.False(Popcnt.IsSupported, "Popcnt should be disabled.");
222+
#endif
223+
Assert.False(Sse42.IsSupported, "Sse42 should be disabled.");
216224
break;
217225
case HwIntrinsics.DisableAVX:
218226
Assert.False(Avx.IsSupported);
219227
break;
220228
case HwIntrinsics.DisableAVX2:
221229
Assert.False(Avx2.IsSupported);
230+
#if NET10_0_OR_GREATER
222231
Assert.False(Fma.IsSupported);
223232
Assert.False(Bmi1.IsSupported);
224233
Assert.False(Bmi2.IsSupported);
225234
Assert.False(Lzcnt.IsSupported);
235+
#endif
226236
break;
227237
case HwIntrinsics.DisableArm64Aes:
228238
Assert.False(System.Runtime.Intrinsics.Arm.Aes.IsSupported);

0 commit comments

Comments
 (0)