Skip to content

Commit

Permalink
Relocate the Vector64/128/256/512 assert extensions to avoid Mono LLV…
Browse files Browse the repository at this point in the history
…M trimming issues
  • Loading branch information
tannergooding committed Jan 11, 2024
1 parent 84a25fa commit 95622ff
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1122,98 +1122,6 @@ static string ToStringPadded(Half value)
}
}
}

/// <summary>Verifies that two <see cref="Vector64{Single}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void Equal(Vector64<float> expected, Vector64<float> actual, Vector64<float> variance)
{
for (int i = 0; i < Vector64<float>.Count; i++)
{
Equal(expected.GetElement(i), actual.GetElement(i), variance.GetElement(i));
}
}

/// <summary>Verifies that two <see cref="Vector128{Single}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void Equal(Vector128<float> expected, Vector128<float> actual, Vector128<float> variance)
{
Equal(expected.GetLower(), actual.GetLower(), variance.GetLower());
Equal(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

/// <summary>Verifies that two <see cref="Vector256{Single}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void Equal(Vector256<float> expected, Vector256<float> actual, Vector256<float> variance)
{
Equal(expected.GetLower(), actual.GetLower(), variance.GetLower());
Equal(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

/// <summary>Verifies that two <see cref="Vector512{Single}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void Equal(Vector512<float> expected, Vector512<float> actual, Vector512<float> variance)
{
Equal(expected.GetLower(), actual.GetLower(), variance.GetLower());
Equal(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

/// <summary>Verifies that two <see cref="Vector64{Double}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void Equal(Vector64<double> expected, Vector64<double> actual, Vector64<double> variance)
{
for (int i = 0; i < Vector64<double>.Count; i++)
{
Equal(expected.GetElement(i), actual.GetElement(i), variance.GetElement(i));
}
}

/// <summary>Verifies that two <see cref="Vector128{Double}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void Equal(Vector128<double> expected, Vector128<double> actual, Vector128<double> variance)
{
Equal(expected.GetLower(), actual.GetLower(), variance.GetLower());
Equal(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

/// <summary>Verifies that two <see cref="Vector256{Double}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void Equal(Vector256<double> expected, Vector256<double> actual, Vector256<double> variance)
{
Equal(expected.GetLower(), actual.GetLower(), variance.GetLower());
Equal(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

/// <summary>Verifies that two <see cref="Vector512{Double}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void Equal(Vector512<double> expected, Vector512<double> actual, Vector512<double> variance)
{
Equal(expected.GetLower(), actual.GetLower(), variance.GetLower());
Equal(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
{
public sealed class Vector128Tests
{
/// <summary>Verifies that two <see cref="Vector128{Single}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void AssertEqual(Vector128<float> expected, Vector128<float> actual, Vector128<float> variance)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build osx x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build freebsd x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 19 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L19

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(19,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
Vector64Tests.AssertEqual(expected.GetLower(), actual.GetLower(), variance.GetLower());
Vector64Tests.AssertEqual(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

/// <summary>Verifies that two <see cref="Vector128{Double}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void AssertEqual(Vector128<double> expected, Vector128<double> actual, Vector128<double> variance)

Check failure on line 30 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build osx x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L30

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(30,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 30 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L30

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(30,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 30 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L30

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(30,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 30 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L30

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(30,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 30 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L30

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(30,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 30 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L30

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(30,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 30 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L30

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(30,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 30 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs#L30

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(30,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector128Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
Vector64Tests.AssertEqual(expected.GetLower(), actual.GetLower(), variance.GetLower());
Vector64Tests.AssertEqual(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

[Fact]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(Vector128))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/81785", TestPlatforms.Browser)]
Expand Down Expand Up @@ -4670,15 +4692,15 @@ private static void TestGetOne<T>()
public void Log2DoubleTest(double value, double expectedResult, double variance)
{
Vector128<double> actualResult = Vector128.Log2(Vector128.Create(value));
AssertExtensions.Equal(Vector128.Create(expectedResult), actualResult, Vector128.Create(variance));
AssertEqual(Vector128.Create(expectedResult), actualResult, Vector128.Create(variance));
}

[Theory]
[MemberData(nameof(VectorTestMemberData.Log2Single), MemberType = typeof(VectorTestMemberData))]
public void Log2SingleTest(float value, float expectedResult, float variance)
{
Vector128<float> actualResult = Vector128.Log2(Vector128.Create(value));
AssertExtensions.Equal(Vector128.Create(expectedResult), actualResult, Vector128.Create(variance));
AssertEqual(Vector128.Create(expectedResult), actualResult, Vector128.Create(variance));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
{
public sealed class Vector256Tests
{
/// <summary>Verifies that two <see cref="Vector256{Single}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void AssertEqual(Vector256<float> expected, Vector256<float> actual, Vector256<float> variance)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build osx x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
Vector128Tests.AssertEqual(expected.GetLower(), actual.GetLower(), variance.GetLower());
Vector128Tests.AssertEqual(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

/// <summary>Verifies that two <see cref="Vector256{Double}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void AssertEqual(Vector256<double> expected, Vector256<double> actual, Vector256<double> variance)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build osx x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 29 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs#L29

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs(29,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector256Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
Vector128Tests.AssertEqual(expected.GetLower(), actual.GetLower(), variance.GetLower());
Vector128Tests.AssertEqual(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

[Fact]
public unsafe void Vector256IsHardwareAcceleratedTest()
{
Expand Down Expand Up @@ -5685,15 +5707,15 @@ private static void TestGetOne<T>()
public void Log2DoubleTest(double value, double expectedResult, double variance)
{
Vector256<double> actualResult = Vector256.Log2(Vector256.Create(value));
AssertExtensions.Equal(Vector256.Create(expectedResult), actualResult, Vector256.Create(variance));
AssertEqual(Vector256.Create(expectedResult), actualResult, Vector256.Create(variance));
}

[Theory]
[MemberData(nameof(VectorTestMemberData.Log2Single), MemberType = typeof(VectorTestMemberData))]
public void Log2SingleTest(float value, float expectedResult, float variance)
{
Vector256<float> actualResult = Vector256.Log2(Vector256.Create(value));
AssertExtensions.Equal(Vector256.Create(expectedResult), actualResult, Vector256.Create(variance));
AssertEqual(Vector256.Create(expectedResult), actualResult, Vector256.Create(variance));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
{
public sealed class Vector512Tests
{
/// <summary>Verifies that two <see cref="Vector512{Single}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void AssertEqual(Vector512<float> expected, Vector512<float> actual, Vector512<float> variance)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build osx x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build freebsd x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 17 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L17

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(17,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
Vector256Tests.AssertEqual(expected.GetLower(), actual.GetLower(), variance.GetLower());
Vector256Tests.AssertEqual(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

/// <summary>Verifies that two <see cref="Vector512{Double}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void AssertEqual(Vector512<double> expected, Vector512<double> actual, Vector512<double> variance)

Check failure on line 28 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build freebsd x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L28

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(28,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 28 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L28

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(28,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 28 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L28

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(28,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 28 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L28

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(28,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 28 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs#L28

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs(28,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector512Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
Vector256Tests.AssertEqual(expected.GetLower(), actual.GetLower(), variance.GetLower());
Vector256Tests.AssertEqual(expected.GetUpper(), actual.GetUpper(), variance.GetUpper());
}

[Fact]
public unsafe void Vector512IsHardwareAcceleratedTest()
{
Expand Down Expand Up @@ -5117,15 +5139,15 @@ private static void TestIsNotSupported<T>()
public void Log2DoubleTest(double value, double expectedResult, double variance)
{
Vector512<double> actualResult = Vector512.Log2(Vector512.Create(value));
AssertExtensions.Equal(Vector512.Create(expectedResult), actualResult, Vector512.Create(variance));
AssertEqual(Vector512.Create(expectedResult), actualResult, Vector512.Create(variance));
}

[Theory]
[MemberData(nameof(VectorTestMemberData.Log2Single), MemberType = typeof(VectorTestMemberData))]
public void Log2SingleTest(float value, float expectedResult, float variance)
{
Vector512<float> actualResult = Vector512.Log2(Vector512.Create(value));
AssertExtensions.Equal(Vector512.Create(expectedResult), actualResult, Vector512.Create(variance));
AssertEqual(Vector512.Create(expectedResult), actualResult, Vector512.Create(variance));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,32 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
{
public sealed class Vector64Tests
{
/// <summary>Verifies that two <see cref="Vector64{Single}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void AssertEqual(Vector64<float> expected, Vector64<float> actual, Vector64<float> variance)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build freebsd x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector64Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux_musl arm64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector64Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux x64 Release)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector64Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build linux arm64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector64Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 18 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs#L18

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs(18,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector64Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
for (int i = 0; i < Vector64<float>.Count; i++)
{
AssertExtensions.Equal(expected.GetElement(i), actual.GetElement(i), variance.GetElement(i));
}
}

/// <summary>Verifies that two <see cref="Vector64{Double}" /> values are equal, within the <paramref name="variance" />.</summary>
/// <param name="expected">The expected value</param>
/// <param name="actual">The value to be compared against</param>
/// <param name="variance">The total variance allowed between the expected and actual results.</param>
/// <exception cref="EqualException">Thrown when the values are not equal</exception>
public static void AssertEqual(Vector64<double> expected, Vector64<double> actual, Vector64<double> variance)

Check failure on line 31 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build Libraries Build freebsd x64 Debug)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs#L31

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs(31,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector64Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check failure on line 31 in src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs#L31

src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs(31,28): error xUnit1013: (NETCORE_ENGINEERING_TELEMETRY=Build) Public method 'AssertEqual' on test class 'Vector64Tests' should be marked as a Theory. Reduce the visibility of the method, or add a Theory attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
for (int i = 0; i < Vector64<double>.Count; i++)
{
AssertExtensions.Equal(expected.GetElement(i), actual.GetElement(i), variance.GetElement(i));
}
}

[Fact]
public unsafe void Vector64IsHardwareAcceleratedTest()
{
Expand Down Expand Up @@ -4083,7 +4109,7 @@ private static void TestGetOne<T>()
public void Log2DoubleTest(double value, double expectedResult, double variance)
{
Vector64<double> actualResult = Vector64.Log2(Vector64.Create(value));
AssertExtensions.Equal(Vector64.Create(expectedResult), actualResult, Vector64.Create(variance));
AssertEqual(Vector64.Create(expectedResult), actualResult, Vector64.Create(variance));
}

[Theory]
Expand All @@ -4093,7 +4119,7 @@ public void Log2SingleTest(float value, float expectedResult, float variance)
AssertExtensions.Equal(0.0f, 0.0f, 0.0f);

Vector64<float> actualResult = Vector64.Log2(Vector64.Create(value));
AssertExtensions.Equal(Vector64.Create(expectedResult), actualResult, Vector64.Create(variance));
AssertEqual(Vector64.Create(expectedResult), actualResult, Vector64.Create(variance));
}
}
}

0 comments on commit 95622ff

Please sign in to comment.