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

◆ are_equal() [7/16]

static void xtd::tunit::valid::are_equal ( float  expected,
float &  actual,
float  tolerance,
const xtd::string message 
)
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.
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
Examples
float f = 0.00007999999999f;
xtd::tunit::valid::are_equal_(0.00008f, f, 0.0000000000001f, "User message..."); // test ok.
xtd::tunit::valid::are_equal_(0.00008f, f, 0.00000000000001f, "User message..."); // test fails.
@ f
The F key.