Go to the source code of this file.
Macros | |
#define | QPOASES_TEST_FOR_EQUAL(x, y) if ( REFER_NAMESPACE_QPOASES isEqual( (x),(y) ) == BT_FALSE ) { return TEST_FAILED; } |
#define | QPOASES_TEST_FOR_NEAR(x, y) if ( REFER_NAMESPACE_QPOASES getAbs((x)-(y)) / REFER_NAMESPACE_QPOASES getMax( 1.0,REFER_NAMESPACE_QPOASES getAbs(x) ) >= 1e-10 ) { return TEST_FAILED; } |
#define | QPOASES_TEST_FOR_TOL(x, tol) if ( (x) > (tol)*(TEST_TOL_FACTOR) ) { return TEST_FAILED; } |
#define | QPOASES_TEST_FOR_TRUE(x) if ( (x) == 0 ) { return TEST_FAILED; } |
#define | TEST_DATA_NOT_FOUND 99 |
#define | TEST_FAILED 1 |
#define | TEST_PASSED 0 |
#define | TEST_TOL_FACTOR 1 |
Definition of auxiliary functions/macros for unit testing.
Definition in file UnitTesting.h.
#define QPOASES_TEST_FOR_EQUAL | ( | x, | |
y | |||
) | if ( REFER_NAMESPACE_QPOASES isEqual( (x),(y) ) == BT_FALSE ) { return TEST_FAILED; } |
Macro verifying that two numerical values are equal in order to pass unit test.
Definition at line 55 of file UnitTesting.h.
#define QPOASES_TEST_FOR_NEAR | ( | x, | |
y | |||
) | if ( REFER_NAMESPACE_QPOASES getAbs((x)-(y)) / REFER_NAMESPACE_QPOASES getMax( 1.0,REFER_NAMESPACE_QPOASES getAbs(x) ) >= 1e-10 ) { return TEST_FAILED; } |
Macro verifying that two numerical values are close to each other in order to pass unit test.
Definition at line 58 of file UnitTesting.h.
#define QPOASES_TEST_FOR_TOL | ( | x, | |
tol | |||
) | if ( (x) > (tol)*(TEST_TOL_FACTOR) ) { return TEST_FAILED; } |
Macro verifying that first quantity is lower or equal than second one in order to pass unit test.
Definition at line 61 of file UnitTesting.h.
#define QPOASES_TEST_FOR_TRUE | ( | x | ) | if ( (x) == 0 ) { return TEST_FAILED; } |
Macro verifying that a logical expression holds in order to pass unit test.
Definition at line 64 of file UnitTesting.h.
#define TEST_DATA_NOT_FOUND 99 |
Return value for tests that could not run due to missing external data.
Definition at line 51 of file UnitTesting.h.
#define TEST_FAILED 1 |
Return value for tests that failed.
Definition at line 48 of file UnitTesting.h.
#define TEST_PASSED 0 |
Return value for tests that passed.
Definition at line 45 of file UnitTesting.h.
#define TEST_TOL_FACTOR 1 |
Definition at line 40 of file UnitTesting.h.