編集

次の方法で共有


TestUtilities.AssertLessOrEqual Method

Definition

Overloads

AssertLessOrEqual(Single, Single, Single)

Equivalent to NUnit.Framework.Assert.LessOrEqual, except this also applies a slight tolerance on the equality check.

AssertLessOrEqual(Single, Single, String, Single)

Equivalent to NUnit.Framework.Assert.LessOrEqual, except this also applies a slight tolerance on the equality check.

AssertLessOrEqual(Single, Single, Single)

Equivalent to NUnit.Framework.Assert.LessOrEqual, except this also applies a slight tolerance on the equality check.

public static void AssertLessOrEqual (float observed, float expected, float tolerance = 0.01);
static member AssertLessOrEqual : single * single * single -> unit
Public Shared Sub AssertLessOrEqual (observed As Single, expected As Single, Optional tolerance As Single = 0.01)

Parameters

observed
Single
expected
Single
tolerance
Single

Remarks

This allows for things like LessThanOrEqual(2.00000024, 2.0) to still pass.

Applies to

AssertLessOrEqual(Single, Single, String, Single)

Equivalent to NUnit.Framework.Assert.LessOrEqual, except this also applies a slight tolerance on the equality check.

public static void AssertLessOrEqual (float observed, float expected, string message, float tolerance = 0.01);
static member AssertLessOrEqual : single * single * string * single -> unit
Public Shared Sub AssertLessOrEqual (observed As Single, expected As Single, message As String, Optional tolerance As Single = 0.01)

Parameters

observed
Single
expected
Single
message
String
tolerance
Single

Remarks

This allows for things like LessThanOrEqual(2.00000024, 2.0) to still pass.

Applies to