xtd 0.2.0
Loading...
Searching...
No Matches

◆ are_equal() [10/16]

static void xtd::tunit::valid::are_equal ( double  expected,
double  actual,
double  tolerance,
const xtd::diagnostics::stack_frame stack_frame 
)
static

Validates that two type are equal.

Parameters
expectedthe expected value.
actualthe actual value.
toleranceIndicates a tolerance within which they will be considered as equal.
stack_frameContains information about current file and current line.
Examples
double d = 0.00007999999999;
xtd::tunit::valid::are_equal_(0.00008, d, 0.0000000000001, csf_); // test ok.
xtd::tunit::valid::are_equal_(0.00008, d, 0.00000000000001, csf_); // test fails.
#define csf_
Provides information about the current stack frame.
Definition current_stack_frame.h:30
@ d
The D key.