-
Notifications
You must be signed in to change notification settings - Fork 748
Closed
Labels
Milestone
Description
Similar to #1046, the following assertion:
Assert.That(-0d, Is.EqualTo(0d).Within(1).Ulps);
Results in:
System.OverflowException : Negating the minimum value of a twos complement number is invalid.
at NUnit.Framework.Constraints.FloatingPointNumerics.AreAlmostEqualUlps(Double left, Double right, Int64 maxUlps)
at NUnit.Framework.Constraints.Numerics.AreEqual(Double expected, Double actual, Tolerance& tolerance)
at NUnit.Framework.Constraints.Numerics.AreEqual(Object expected, Object actual, Tolerance& tolerance)
at NUnit.Framework.Constraints.Comparers.NumericsComparer.Equal(Object x, Object y, Tolerance& tolerance, Boolean topLevelComparison)
at NUnit.Framework.Constraints.NUnitEqualityComparer.AreEqual(Object x, Object y, Tolerance& tolerance, Boolean topLevelComparison)
at NUnit.Framework.Constraints.EqualConstraint.ApplyTo[TActual](TActual actual)
at NUnit.Framework.Assert.That[TActual](TActual actual, IResolveConstraint expression, String message, Object[] args)
at NUnit.Framework.Assert.That[TActual](TActual actual, IResolveConstraint expression)
Tested against NUnit 3.12.0.
sjwarner and aolszowka