The yarp::robottestingframework::TestAsserter class is used to throw exception or to report messages/failures to a TestResult.
More...
#include <yarp/robottestingframework/TestAsserter.h>
|
static bool | isApproxEqual (const double *left, const double *right, const double *l_thresholds, const double *h_thresholds, int length) |
| Element-wise compare two vectors to determine if they are approximately equal, according to asymmetric thresholds that specify lower and upper bound. More...
|
|
static bool | isApproxEqual (const double *left, const double *right, const double *thresholds, int length) |
| Element-wise compare two vectors to determine if they are approximately equal, according to a threshold. More...
|
|
static bool | isApproxEqual (const yarp::sig::Vector &left, const yarp::sig::Vector &right, const yarp::sig::Vector &thresholds) |
| Element-wise compare two vectors to determine if they are approximately equal, according to a threshold. More...
|
|
static bool | isApproxEqual (double left, double right, double l_th, double h_th) |
| Compare two scalars to determine if they are approximately equal, according to asymmetric thresholds that specify upper and lower bound. More...
|
|
The yarp::robottestingframework::TestAsserter class is used to throw exception or to report messages/failures to a TestResult.
Definition at line 22 of file TestAsserter.h.
◆ TestAsserter()
yarp::robottestingframework::TestAsserter::TestAsserter |
( |
| ) |
|
|
explicit |
◆ ~TestAsserter()
yarp::robottestingframework::TestAsserter::~TestAsserter |
( |
| ) |
|
|
virtual |
◆ isApproxEqual() [1/4]
bool yarp::robottestingframework::TestAsserter::isApproxEqual |
( |
const double * |
left, |
|
|
const double * |
right, |
|
|
const double * |
l_thresholds, |
|
|
const double * |
h_thresholds, |
|
|
int |
length |
|
) |
| |
|
static |
Element-wise compare two vectors to determine if they are approximately equal, according to asymmetric thresholds that specify lower and upper bound.
Both thresholds are assumed to be positive.
- Parameters
-
left | left operand |
right | right operand |
l_thresholds | a vector of thresholds whose elements are used when checking equality of corresponding elements of the left and right vectors. It specifies the low bound of the interval. |
h_thresholds | a vector of thresholds whose elements are used when checking equality of corresponding elements of the left and right vectors. It specifies the upper bound of the interval. |
length | specifies the lengths of all vectors |
- Returns
- : the result of the comparison
Definition at line 37 of file TestAsserter.cpp.
◆ isApproxEqual() [2/4]
bool yarp::robottestingframework::TestAsserter::isApproxEqual |
( |
const double * |
left, |
|
|
const double * |
right, |
|
|
const double * |
thresholds, |
|
|
int |
length |
|
) |
| |
|
static |
Element-wise compare two vectors to determine if they are approximately equal, according to a threshold.
The threshold is assumed to be positive.
- Parameters
-
left | left operand |
right | right operand |
thresholds | a vector of thresholds whose elements are used when checking equality of corresponding elements of the left and right vectors |
length | specifies the lengths of all vectors |
- Returns
- : the result of comparison
Definition at line 29 of file TestAsserter.cpp.
◆ isApproxEqual() [3/4]
Element-wise compare two vectors to determine if they are approximately equal, according to a threshold.
The threshold is assumed to be positive.
- Parameters
-
left | left operand |
right | right operand |
thresholds | a vector of thresholds whose elements are used when checking equality of corresponding elements of the left and right vectors |
- Returns
- : the result of comparison
Definition at line 54 of file TestAsserter.cpp.
◆ isApproxEqual() [4/4]
bool yarp::robottestingframework::TestAsserter::isApproxEqual |
( |
double |
left, |
|
|
double |
right, |
|
|
double |
l_th, |
|
|
double |
h_th |
|
) |
| |
|
static |
Compare two scalars to determine if they are approximately equal, according to asymmetric thresholds that specify upper and lower bound.
- Parameters
-
left | left operand |
right | right operand |
l_th | lower bound of interval for comparison |
h_th | upper bound of interval for comparison |
- Returns
- : the result of comparison
Definition at line 65 of file TestAsserter.cpp.
The documentation for this class was generated from the following files:
- src/libYARP_robottestingframework/src/yarp/robottestingframework/TestAsserter.h
- src/libYARP_robottestingframework/src/yarp/robottestingframework/TestAsserter.cpp