I suggest you ...

Assert.AreEqual <double, double, int>

As a developer I want to test for equality of doubles, using a relative precision indicator (as opposed to an absolute delta).

Assert(double, double, int)

E.g.
Assert.AreEqual(1.0, 1.000000001, 8) // will not fail
Assert.AreEqual(100000.0, 100000.0001, 8) // will not fail

In both cases the first 8 significant digits are the same.

Another method signature that go with this is of course:
Assert(double, double, int, string, params object[])

1 vote
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base