PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
StateMachineHelperTest ()=default | |
~StateMachineHelperTest () override=default | |
bool | run_tests () override |
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 | armingStateTransitionTest () |
bool | mainStateTransitionTest () |
bool | isSafeTest () |
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 47 of file state_machine_helper_test.cpp.
|
default |
|
overridedefault |
|
private |
Definition at line 61 of file state_machine_helper_test.cpp.
References PreFlightCheck::ARM_REQ_GPS_BIT, actuator_armed_s::armed, armed, vehicle_status_s::arming_state, arming_state_transition(), ATT_ARMED, ATT_DISARMED, ATT_NOT_READY_TO_ARM, ATT_READY_TO_ARM, ATT_SAFETY_AVAILABLE, ATT_SAFETY_NOT_AVAILABLE, ATT_SAFETY_OFF, ATT_SAFETY_ON, ATT_SENSORS_INITIALIZED, vehicle_status_flags_s::circuit_breaker_engaged_power_check, vehicle_status_flags_s::condition_system_sensors_initialized, vehicle_status_s::hil_state, actuator_armed_s::ready_to_arm, safety_s::safety_off, safety_s::safety_switch_available, lps25h::test(), TRANSITION_CHANGED, TRANSITION_DENIED, TRANSITION_NOT_CHANGED, and ut_compare.
Referenced by run_tests().
|
private |
Definition at line 539 of file state_machine_helper_test.cpp.
References actuator_armed_s::armed, is_safe(), actuator_armed_s::lockdown, safety_s::safety_off, safety_s::safety_switch_available, and ut_compare.
Referenced by run_tests().
|
private |
Definition at line 322 of file state_machine_helper_test.cpp.
References vehicle_status_flags_s::condition_auto_mission_available, vehicle_status_flags_s::condition_global_position_valid, vehicle_status_flags_s::condition_home_position_valid, vehicle_status_flags_s::condition_local_altitude_valid, vehicle_status_flags_s::condition_local_position_valid, commander_state_s::main_state, main_state_transition(), MTT_ALL_NOT_VALID, MTT_GLOBAL_POS_VALID, MTT_HOME_POS_VALID, MTT_LOC_ALT_VALID, MTT_LOC_POS_VALID, MTT_ROTARY_WING, lps25h::test(), TRANSITION_CHANGED, TRANSITION_DENIED, TRANSITION_NOT_CHANGED, ut_compare, vehicle_status_s::vehicle_type, and VEHICLE_TYPE_FIXED_WING.
Referenced by run_tests().
|
overridevirtual |
Override to run your unit tests.
Unit tests should be called using ut_run_test macro.
Implements UnitTest.
Definition at line 577 of file state_machine_helper_test.cpp.
References UnitTest::_tests_failed, armingStateTransitionTest(), isSafeTest(), mainStateTransitionTest(), stateMachineHelperTest(), ut_declare_test, and ut_run_test.