@@ -279,7 +279,9 @@ public sealed class GenericConversionTests
|
||||
Should.Throw<OverflowException>(() => decimal.CreateChecked(new DoubleDouble(double.PositiveInfinity)));
|
||||
decimal.CreateSaturating(new DoubleDouble(double.PositiveInfinity)).ShouldBe(decimal.MaxValue);
|
||||
decimal.CreateTruncating(DoubleDouble.NaN).ShouldBe(0m);
|
||||
int.CreateSaturating(DoubleDouble.NaN).ShouldBe(0);
|
||||
// Nonfinite integer conversions follow the destination's binary64 policy,
|
||||
// which can differ between runtimes (for example, .NET 8 and .NET 10).
|
||||
int.CreateSaturating(DoubleDouble.NaN).ShouldBe(int.CreateSaturating(double.NaN));
|
||||
int.CreateTruncating(new DoubleDouble(double.PositiveInfinity)).ShouldBe(int.MaxValue);
|
||||
Should.Throw<OverflowException>(() => int.CreateChecked(DoubleDouble.NaN));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user