|
Firmware
|
Base class to be used for unit tests. More...
#include <unit_test.h>
Public Member Functions | |
| virtual bool | run_tests (void)=0 |
| Override to run your unit tests. More... | |
| void | print_results () |
| Prints results from running of unit tests. | |
Protected Member Functions | |
| virtual void | _init (void) |
| Run before each unit test. Override to provide custom behavior. | |
| virtual void | _cleanup (void) |
| Run after each unit test. Override to provide custom behavior. | |
| 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 | |
| int | _tests_run {0} |
| The number of individual unit tests run. | |
| int | _tests_failed {0} |
| The number of unit tests which failed. | |
| int | _tests_passed {0} |
| The number of unit tests which passed. | |
| int | _assertions {0} |
| Total number of assertions tested by all unit tests. | |
Base class to be used for unit tests.
|
pure virtual |
Override to run your unit tests.
Unit tests should be called using ut_run_test macro.
Implemented in MixerTest, MicroBenchORB::MicroBenchORB, MicroBenchMatrix::MicroBenchMatrix, MicroBenchMath::MicroBenchMath, MicroBenchHRT::MicroBenchHRT, MathlibTest, SearchMinTest, IntTest, AutoDeclinationTest, FloatTest, ListTest, StateMachineHelperTest, MatrixTest, ParameterTest, MavlinkFtpTest, BezierQuadTest, ControlMathTest, IntrusiveQueueTest, HysteresisTest, SmoothZTest, VersioningTest, RCTest, and SF0XTest.
1.8.12