IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Constraints.Numerics Class Reference

The Numerics class contains common operations on numeric _values. More...

Static Public Member Functions

static bool IsNumericType (Object obj)
 Checks the type of the object, returning true if the object is a numeric type. More...
 
static bool IsFloatingPointNumeric (Object obj)
 Checks the type of the object, returning true if the object is a floating point numeric type. More...
 
static bool IsFixedPointNumeric (Object obj)
 Checks the type of the object, returning true if the object is a fixed point numeric type. More...
 
static bool AreEqual (object expected, object actual, ref Tolerance tolerance)
 Test two numeric _values for equality, performing the usual numeric conversions and using a provided or default tolerance. If the tolerance provided is Empty, this method may set it to a default tolerance. More...
 
static int Compare (object expected, object actual)
 Compare two numeric _values, performing the usual numeric conversions. More...
 

Private Member Functions

 Numerics ()
 

Static Private Member Functions

static bool AreEqual (double expected, double actual, ref Tolerance tolerance)
 
static bool AreEqual (float expected, float actual, ref Tolerance tolerance)
 
static bool AreEqual (decimal expected, decimal actual, Tolerance tolerance)
 
static bool AreEqual (ulong expected, ulong actual, Tolerance tolerance)
 
static bool AreEqual (long expected, long actual, Tolerance tolerance)
 
static bool AreEqual (uint expected, uint actual, Tolerance tolerance)
 
static bool AreEqual (int expected, int actual, Tolerance tolerance)
 

Detailed Description

The Numerics class contains common operations on numeric _values.

Constructor & Destructor Documentation

NUnit.Framework.Constraints.Numerics.Numerics ( )
inlineprivate

Member Function Documentation

static bool NUnit.Framework.Constraints.Numerics.IsNumericType ( Object  obj)
inlinestatic

Checks the type of the object, returning true if the object is a numeric type.

Parameters
objThe object to check
Returns
true if the object is a numeric type

Referenced by NUnit.Framework.Constraints.Tolerance.CheckLinearAndNumeric(), and NUnit.Framework.Constraints.NUnitComparer.Compare().

static bool NUnit.Framework.Constraints.Numerics.IsFloatingPointNumeric ( Object  obj)
inlinestatic

Checks the type of the object, returning true if the object is a floating point numeric type.

Parameters
objThe object to check
Returns
true if the object is a floating point numeric type
static bool NUnit.Framework.Constraints.Numerics.IsFixedPointNumeric ( Object  obj)
inlinestatic

Checks the type of the object, returning true if the object is a fixed point numeric type.

Parameters
objThe object to check
Returns
true if the object is a fixed point numeric type
static bool NUnit.Framework.Constraints.Numerics.AreEqual ( object  expected,
object  actual,
ref Tolerance  tolerance 
)
inlinestatic

Test two numeric _values for equality, performing the usual numeric conversions and using a provided or default tolerance. If the tolerance provided is Empty, this method may set it to a default tolerance.

Parameters
expectedThe expected value
actualThe actual value
toleranceA reference to the tolerance in effect
Returns
True if the _values are equal

Referenced by NUnit.Framework.Constraints.NumericsTests.CanMatchDecimalWithoutToleranceMode(), NUnit.Framework.Constraints.NumericsTests.CanMatchDecimalWithPercentage(), NUnit.Framework.Constraints.NumericsTests.CanMatchIntegralsWithPercentage(), NUnit.Framework.Constraints.NumericsTests.CanMatchWithoutToleranceMode(), NUnit.Framework.Constraints.NumericsTests.FailsOnDecimalAbovePercentage(), NUnit.Framework.Constraints.NumericsTests.FailsOnDecimalBelowPercentage(), and NUnit.Framework.Constraints.NumericsTests.FailsOnIntegralsOutsideOfPercentage().

static bool NUnit.Framework.Constraints.Numerics.AreEqual ( double  expected,
double  actual,
ref Tolerance  tolerance 
)
inlinestaticprivate
static bool NUnit.Framework.Constraints.Numerics.AreEqual ( float  expected,
float  actual,
ref Tolerance  tolerance 
)
inlinestaticprivate
static bool NUnit.Framework.Constraints.Numerics.AreEqual ( decimal  expected,
decimal  actual,
Tolerance  tolerance 
)
inlinestaticprivate
static bool NUnit.Framework.Constraints.Numerics.AreEqual ( ulong  expected,
ulong  actual,
Tolerance  tolerance 
)
inlinestaticprivate
static bool NUnit.Framework.Constraints.Numerics.AreEqual ( long  expected,
long  actual,
Tolerance  tolerance 
)
inlinestaticprivate
static bool NUnit.Framework.Constraints.Numerics.AreEqual ( uint  expected,
uint  actual,
Tolerance  tolerance 
)
inlinestaticprivate
static bool NUnit.Framework.Constraints.Numerics.AreEqual ( int  expected,
int  actual,
Tolerance  tolerance 
)
inlinestaticprivate
static int NUnit.Framework.Constraints.Numerics.Compare ( object  expected,
object  actual 
)
inlinestatic

Compare two numeric _values, performing the usual numeric conversions.

Parameters
expectedThe expected value
actualThe actual value
Returns
The relationship of the _values to each other

Referenced by NUnit.Framework.Constraints.NUnitComparer.Compare().


The documentation for this class was generated from the following file: