PX4 Firmware
PX4 Autopilot Software http://px4.io
IntrusiveQueueTest Class Reference
Inheritance diagram for IntrusiveQueueTest:
Collaboration diagram for IntrusiveQueueTest:

Public Member Functions

virtual bool run_tests ()
 Override to run your unit tests. More...
 
bool test_push ()
 
bool test_pop ()
 
bool test_push_duplicate ()
 
bool test_remove ()
 
- Public Member Functions inherited from UnitTest
 UnitTest ()=default
 
virtual ~UnitTest ()=default
 
void print_results ()
 Prints results from running of unit tests. More...
 

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...
 

Detailed Description

Definition at line 45 of file test_IntrusiveQueue.cpp.

Member Function Documentation

◆ run_tests()

bool IntrusiveQueueTest::run_tests ( )
virtual

Override to run your unit tests.

Unit tests should be called using ut_run_test macro.

Returns
true: all unit tests succeeded, false: one or more unit tests failed

Implements UnitTest.

Definition at line 57 of file test_IntrusiveQueue.cpp.

References ut_run_test.

◆ test_pop()

bool IntrusiveQueueTest::test_pop ( )

Definition at line 104 of file test_IntrusiveQueue.cpp.

References IntrusiveQueue< T >::empty(), IntrusiveQueue< T >::front(), testContainer::i, IntrusiveQueue< T >::pop(), IntrusiveQueue< T >::push(), IntrusiveQueue< T >::size(), ut_assert_true, and ut_compare.

Here is the call graph for this function:

◆ test_push()

bool IntrusiveQueueTest::test_push ( )

Definition at line 67 of file test_IntrusiveQueue.cpp.

References IntrusiveQueue< T >::empty(), IntrusiveQueue< T >::front(), testContainer::i, IntrusiveQueue< T >::pop(), IntrusiveQueue< T >::push(), IntrusiveQueue< T >::size(), ut_assert_true, and ut_compare.

Here is the call graph for this function:

◆ test_push_duplicate()

bool IntrusiveQueueTest::test_push_duplicate ( )

Definition at line 148 of file test_IntrusiveQueue.cpp.

References IntrusiveQueue< T >::back(), IntrusiveQueue< T >::empty(), IntrusiveQueue< T >::front(), testContainer::i, IntrusiveQueue< T >::pop(), IntrusiveQueue< T >::push(), IntrusiveQueue< T >::size(), ut_assert_true, and ut_compare.

Here is the call graph for this function:

◆ test_remove()

bool IntrusiveQueueTest::test_remove ( )

Definition at line 216 of file test_IntrusiveQueue.cpp.

References IntrusiveQueue< T >::empty(), testContainer::i, IntrusiveQueue< T >::pop(), IntrusiveQueue< T >::push(), IntrusiveQueue< T >::size(), test_IntrusiveQueue(), ut_assert_true, ut_compare, and ut_declare_test_c.

Here is the call graph for this function:

The documentation for this class was generated from the following file: