未验证 提交 91ac6b35 编写于 作者: T Tom Deseyn 提交者: GitHub

Microsoft.Bcl.Numerics.Tests: fix restore failure when DotNetBuildFromSource. (#91402)

* Microsoft.Bcl.Numerics.Tests: fix restore failure when DotNetBuildFromSource.

* Use NetCoreAppCurrent.

* Try fix CI test failures.
上级 f64dac2b
......@@ -297,6 +297,7 @@ public static void Atan2(float y, float x, float expectedResult, float allowedVa
[InlineData(-1.41421356f, -1.0f, 0.0f)] // value: -(sqrt(2))
[InlineData(-1.12837917f, -1.0f, 0.0f)] // value: -(2 / sqrt(pi))
[InlineData(-1.0f, -1.0f, 0.0f)]
#if NETFRAMEWORK
[InlineData(-0.785398163f, 0.0f, 0.0f)] // value: (pi / 4)
[InlineData(-0.707106781f, 0.0f, 0.0f)] // value: (1 / sqrt(2))
[InlineData(-0.693147181f, 0.0f, 0.0f)] // value: (ln(2))
......@@ -304,6 +305,15 @@ public static void Atan2(float y, float x, float expectedResult, float allowedVa
[InlineData(-0.434294482f, 0.0f, 0.0f)] // value: (log10(e))
[InlineData(-0.318309886f, 0.0f, 0.0f)] // value: (1 / pi)
[InlineData(-0.0f, -0.0f, 0.0f)]
#else
[InlineData(-0.785398163f, -0.0f, 0.0f)] // value: (pi / 4)
[InlineData(-0.707106781f, -0.0f, 0.0f)] // value: (1 / sqrt(2))
[InlineData(-0.693147181f, -0.0f, 0.0f)] // value: (ln(2))
[InlineData(-0.636619772f, -0.0f, 0.0f)] // value: (2 / pi)
[InlineData(-0.434294482f, -0.0f, 0.0f)] // value: (log10(e))
[InlineData(-0.318309886f, -0.0f, 0.0f)] // value: (1 / pi)
[InlineData(-0.0f, -0.0f, 0.0f)]
#endif
[InlineData(float.NaN, float.NaN, 0.0f)]
[InlineData(0.0f, 0.0f, 0.0f)]
[InlineData(0.318309886f, 1.0f, 0.0f)] // value: (1 / pi)
......@@ -614,7 +624,11 @@ public static void Log10(float value, float expectedResult, float allowedVarianc
[InlineData(float.NaN, float.PositiveInfinity, float.NaN)]
[InlineData(float.NaN, float.NegativeInfinity, float.NaN)]
[InlineData(-0.0f, 0.0f, 0.0f)]
#if NETFRAMEWORK
[InlineData(0.0f, -0.0f, -0.0f)]
#else
[InlineData(0.0f, -0.0f, 0.0f)]
#endif
[InlineData(2.0f, -3.0f, 2.0f)]
[InlineData(-3.0f, 2.0f, 2.0f)]
[InlineData(3.0f, -2.0f, 3.0f)]
......@@ -636,7 +650,11 @@ public static void Max(float x, float y, float expectedResult)
[InlineData(float.NegativeInfinity, float.NaN, float.NaN)]
[InlineData(float.NaN, float.PositiveInfinity, float.NaN)]
[InlineData(float.NaN, float.NegativeInfinity, float.NaN)]
#if NETFRAMEWORK
[InlineData(-0.0f, 0.0f, 0.0f)]
#else
[InlineData(-0.0f, 0.0f, -0.0f)]
#endif
[InlineData(0.0f, -0.0f, -0.0f)]
[InlineData(2.0f, -3.0f, -3.0f)]
[InlineData(-3.0f, 2.0f, -3.0f)]
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(NetFrameworkMinimum)</TargetFramework>
<TargetFrameworks>$(NetFrameworkMinimum);$(NetCoreAppCurrent)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册