PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
virtual bool | run_tests () |
Override to run your unit tests. More... | |
Public Member Functions inherited from UnitTest | |
UnitTest ()=default | |
virtual | ~UnitTest ()=default |
void | print_results () |
Prints results from running of unit tests. More... | |
Private Member Functions | |
bool | attitudeTests () |
bool | filterTests () |
bool | helperTests () |
bool | integrationTests () |
bool | inverseTests () |
bool | matrixAssignmentTests () |
bool | matrixMultTests () |
bool | matrixScalarMultTests () |
bool | setIdentityTests () |
bool | sliceTests () |
bool | squareMatrixTests () |
bool | transposeTests () |
bool | vectorTests () |
bool | vector2Tests () |
bool | vector3Tests () |
bool | vectorAssignmentTests () |
bool | dcmRenormTests () |
bool | pseudoInverseTests () |
Additional Inherited Members | |
Protected Member Functions inherited from UnitTest | |
virtual void | _init (void) |
Run before each unit test. Override to provide custom behavior. More... | |
virtual void | _cleanup (void) |
Run after each unit test. Override to provide custom behavior. More... | |
void | _print_assert (const char *msg, const char *test, const char *file, int line) |
void | _print_compare (const char *msg, const char *v1_text, int v1, const char *v2_text, int v2, const char *file, int line) |
Protected Attributes inherited from UnitTest | |
int | _tests_run {0} |
The number of individual unit tests run. More... | |
int | _tests_failed {0} |
The number of unit tests which failed. More... | |
int | _tests_passed {0} |
The number of unit tests which passed. More... | |
int | _assertions {0} |
Total number of assertions tested by all unit tests. More... | |
Definition at line 48 of file test_matrix.cpp.
|
private |
|
private |
Definition at line 720 of file test_matrix.cpp.
References err, f(), matrix::Vector< Type, M >::length(), matrix::Dcm< Type >::renormalize(), matrix::Matrix< Type, M, N >::row(), and ut_test.
|
private |
Definition at line 332 of file test_matrix.cpp.
References data, matrix::isEqual(), P, matrix::Matrix< Type, M, N >::setIdentity(), and ut_test.
|
private |
Definition at line 355 of file test_matrix.cpp.
References f(), matrix::isEqual(), M_PI, ut_test, and matrix::wrap_pi().
|
private |
Definition at line 378 of file test_matrix.cpp.
References matrix::integrate_rk4(), matrix::isEqual(), and ut_test.
|
private |
Definition at line 392 of file test_matrix.cpp.
References matrix::abs(), data, matrix::inv(), matrix::max(), and ut_test.
|
private |
Definition at line 417 of file test_matrix.cpp.
References matrix::Matrix< Type, M, N >::col(), data, f(), matrix::isEqual(), matrix::Matrix< Type, M, N >::min(), matrix::Matrix< Type, M, N >::row(), matrix::Matrix< Type, M, N >::setZero(), matrix::Matrix< Type, M, N >::swapCols(), matrix::Matrix< Type, M, N >::swapRows(), and ut_test.
|
private |
Definition at line 499 of file test_matrix.cpp.
References data, matrix::Matrix< Type, M, N >::emult(), matrix::isEqual(), matrix::Matrix< Type, M, N >::setIdentity(), and ut_test.
|
private |
Definition at line 523 of file test_matrix.cpp.
References data, matrix::isEqual(), and ut_test.
|
private |
Definition at line 763 of file test_matrix.cpp.
References A0, matrix::abs(), matrix::geninv(), matrix::inv(), matrix::max(), and ut_test.
|
virtual |
Override to run your unit tests.
Unit tests should be called using ut_run_test macro.
Implements UnitTest.
Definition at line 74 of file test_matrix.cpp.
References attitudeTests(), matrix::Quaternion< Type >::derivative1(), f(), matrix::Quaternion< Type >::from_axis_angle(), matrix::Quaternion< Type >::inversed(), matrix::Quaternion< Type >::invert(), matrix::isEqual(), M_PI, matrix::Vector< Type, M >::normalize(), matrix::Quaternion< Type >::rotate(), test_matrix(), matrix::Quaternion< Type >::to_axis_angle(), matrix::Vector< Type, M >::unit(), ut_declare_test_c, ut_run_test, and ut_test.
|
private |
Definition at line 538 of file test_matrix.cpp.
References matrix::Matrix< Type, M, N >::setIdentity(), and ut_test.
|
private |
Definition at line 557 of file test_matrix.cpp.
References data, matrix::isEqual(), matrix::Matrix< Type, M, M >::slice(), and ut_test.
|
private |
Definition at line 592 of file test_matrix.cpp.
References matrix::abs(), data, matrix::SquareMatrix< Type, M >::diag(), dt, matrix::expm(), matrix::isEqual(), matrix::max(), and ut_test.
|
private |
Definition at line 619 of file test_matrix.cpp.
References data, matrix::isEqual(), matrix::Matrix< Type, M, N >::transpose(), and ut_test.
|
private |
Definition at line 649 of file test_matrix.cpp.
References data, f(), and ut_test.
|
private |
Definition at line 676 of file test_matrix.cpp.
References matrix::Vector3< Type >::cross(), data, f(), matrix::isEqual(), and ut_test.
|
private |
Definition at line 693 of file test_matrix.cpp.
References matrix::diag(), f(), and ut_test.
|
private |
Definition at line 631 of file test_matrix.cpp.
References matrix::Vector< Type, M >::dot(), matrix::isEqual(), matrix::Vector< Type, M >::norm(), matrix::Vector< Type, M >::normalize(), matrix::Vector< Type, M >::sqrt(), and ut_test.