-
Notifications
You must be signed in to change notification settings - Fork 759
Closed
Labels
Milestone
Description
I'm trying to upgrade from v3 to the latest v4, but I'm facing an issue with TestCaseData and DefaultFloatingPointTolerance.
I've a test
[TestCaseSource(nameof(MyDataSet))]
[DefaultFloatingPointTolerance(1E-6)]
public (double, bool) DeadTimeCorrection(double parameter1, int parameter2)
{
return MyClass.Calculation(parameter1, parameter2);
}
public static TestCaseData[] MyDataSet =
{
new TestCaseData(367879441.1714423d, 1).Returns((980833173.431083d, false))
};
In v3, everything works fine, but with NUnit 4.1.0 the test is failing
Message:
Assert.That(result, Is.EqualTo(_testMethod.ExpectedResult))
Expected: (980833173.43108296d, False)
But was: (980833173.43108344d, False)
Stack Trace:
TestMethodCommand.Execute(TestExecutionContext context)
<>c__DisplayClass1_0.b__0()
DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
- at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
<>c__DisplayClass1_0.b__0()
DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
BeforeAndAfterTestCommand.Execute(TestExecutionContext context)
BeforeTestCommand.Execute(TestExecutionContext context)
<>c__DisplayClass3_0.b__0()
<>c__DisplayClass1_0`1.b__0(Object _)
Obviously, DefaultFloatingPointTolerance is ignored