2019-11-19 02:31:06 +01:00
|
|
|
|
using LibHac.Crypto;
|
2019-11-09 08:32:13 +01:00
|
|
|
|
using Xunit;
|
|
|
|
|
|
2021-11-14 20:08:57 +01:00
|
|
|
|
namespace LibHac.Tests.CryptoTests;
|
|
|
|
|
|
|
|
|
|
public sealed class AesIntrinsicsRequiredTheoryAttribute : TheoryAttribute
|
2019-11-09 08:32:13 +01:00
|
|
|
|
{
|
2021-11-14 20:08:57 +01:00
|
|
|
|
public AesIntrinsicsRequiredTheoryAttribute()
|
2019-11-09 08:32:13 +01:00
|
|
|
|
{
|
2021-11-14 20:08:57 +01:00
|
|
|
|
if (!Aes.IsAesNiSupported())
|
2019-11-09 08:32:13 +01:00
|
|
|
|
{
|
2021-11-14 20:08:57 +01:00
|
|
|
|
Skip = "AES intrinsics required";
|
2019-11-09 08:32:13 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-11-14 20:08:57 +01:00
|
|
|
|
}
|
2021-07-14 08:53:33 +02:00
|
|
|
|
|
2021-11-14 20:08:57 +01:00
|
|
|
|
public sealed class AesIntrinsicsRequiredFactAttribute : FactAttribute
|
|
|
|
|
{
|
|
|
|
|
public AesIntrinsicsRequiredFactAttribute()
|
2021-07-14 08:53:33 +02:00
|
|
|
|
{
|
2021-11-14 20:08:57 +01:00
|
|
|
|
if (!Aes.IsAesNiSupported())
|
2021-07-14 08:53:33 +02:00
|
|
|
|
{
|
2021-11-14 20:08:57 +01:00
|
|
|
|
Skip = "AES intrinsics required";
|
2021-07-14 08:53:33 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-11-14 20:08:57 +01:00
|
|
|
|
}
|