Skip to content

Commit

Permalink
Microsoft.Bcl.Numerics.Tests: fix restore failure when DotNetBuildFro…
Browse files Browse the repository at this point in the history
…mSource. (#91402)

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

* Use NetCoreAppCurrent.

* Try fix CI test failures.
  • Loading branch information
tmds committed Sep 1, 2023
1 parent f64dac2 commit 91ac6b3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/libraries/Microsoft.Bcl.Numerics/tests/MathF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,23 @@ 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))
[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)]
#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)
Expand Down Expand Up @@ -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)]
Expand All @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetFrameworkMinimum)</TargetFramework>
<TargetFrameworks>$(NetFrameworkMinimum);$(NetCoreAppCurrent)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 91ac6b3

Please sign in to comment.