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 | _init_inputs () |
bool | _init_inputs_flipped () |
bool | _init_inputs_negative () |
bool | _init_tol_larger_than_range () |
bool | _init_tol_larger_than_range_flipped () |
bool | _no_extremum () |
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 65 of file test_search_min.cpp.
|
private |
Definition at line 93 of file test_search_min.cpp.
References _linear_function(), _quadratic_function(), f(), math::goldensection(), and ut_assert.
Referenced by run_tests().
|
private |
Definition at line 112 of file test_search_min.cpp.
References _linear_function(), _quadratic_function(), f(), math::goldensection(), and ut_assert.
Referenced by run_tests().
|
private |
Definition at line 132 of file test_search_min.cpp.
References _linear_function(), _quadratic_function(), f(), math::goldensection(), and ut_assert.
Referenced by run_tests().
|
private |
Definition at line 152 of file test_search_min.cpp.
References _linear_function(), _quadratic_function(), f(), math::goldensection(), and ut_assert.
Referenced by run_tests().
|
private |
Definition at line 172 of file test_search_min.cpp.
References _linear_function(), _quadratic_function(), f(), math::goldensection(), and ut_assert.
Referenced by run_tests().
|
private |
Definition at line 192 of file test_search_min.cpp.
References _linear_function_flat(), math::goldensection(), test_search_min(), ut_assert, and ut_declare_test_c.
Referenced by run_tests().
|
virtual |
Override to run your unit tests.
Unit tests should be called using ut_run_test macro.
Implements UnitTest.
Definition at line 81 of file test_search_min.cpp.
References _init_inputs(), _init_inputs_flipped(), _init_inputs_negative(), _init_tol_larger_than_range(), _init_tol_larger_than_range_flipped(), _no_extremum(), UnitTest::_tests_failed, and ut_run_test.