ICSharpCode.SharpUnit an Unit Testing Framework for .NET

Assertion.AssertEquals Method (Single, Single, Single)

Asserts that two singles are equal concerning a delta. If the expected value is infinity then the delta value is ignored.

public static void AssertEquals(
   float expected,
   float current,
   float delta
);

Parameters

expected
The expected value
current
The current value
delta
The maximum acceptable difference between the the expected and the current

Exceptions

Exception TypeCondition
AssertionFailedException thrown if |excepted - current| > delta

See Also

Assertion Class | Assertion Members | ICSharpCode.SharpUnit Namespace | Assertion.AssertEquals Overload List