Skip to content

Extend use of tolerance to ComparisonConstraints #2095

Closed
@NUnitTester

Description

@NUnitTester

The WithIn Option is available for Is.EqualTo. That's fine, but it is missing for the other ones:
double x = ...; Assert.That(x, Is.GreaterThan(1.0).WithIn(1.0e-12));

The interpretation is:
if (x <= 1.0 - 1.0e-12) Assert.Fail(...);
It is expected to have this for:
GreaterThan
GreaterThanOrEqualTo
LessThan
LessThanOrEqualTo
AtLeast
AtMost

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions