distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
distortos::test::MessageQueuePriorityTestCase Class Reference

Tests priority scheduling of message queue (raw and non-raw). More...

#include <MessageQueuePriorityTestCase.hpp>

Inheritance diagram for distortos::test::MessageQueuePriorityTestCase:
[legend]
Collaboration diagram for distortos::test::MessageQueuePriorityTestCase:
[legend]

Public Member Functions

constexpr MessageQueuePriorityTestCase ()
 MessageQueuePriorityTestCase's constructor. More...
 
- Public Member Functions inherited from distortos::test::PrioritizedTestCase
constexpr PrioritizedTestCase (const uint8_t priority)
 PrioritizedTestCase's constructor. More...
 
- Public Member Functions inherited from distortos::test::TestCase
bool run () const
 Public function to start the test case. More...
 

Private Member Functions

bool run_ () const override
 Runs the test case. More...
 

Static Private Attributes

static constexpr uint8_t testCasePriority_ {1}
 priority at which this test case should be executed More...
 

Additional Inherited Members

- Protected Member Functions inherited from distortos::test::PrioritizedTestCase
bool finalize () const override
 Finalizes the test case. More...
 
bool initialize () const override
 Initializes the test case. More...
 
- Protected Member Functions inherited from distortos::test::TestCaseCommon
bool finalize () const override
 Finalizes the test case. More...
 
bool initialize () const override
 Initializes the test case. More...
 

Detailed Description

Tests priority scheduling of message queue (raw and non-raw).

Starts 8 small threads (in various order) with varying priorities which wait either for a message from the message queue or for free space in the message queue, asserting that they start and finish in the expected order, using exact number of context switches, that the data received from the message queue matches what was transferred and is delivered in order which respects the priority of individual messages and that no memory was leaked (in case of "dynamic" queue).

Constructor & Destructor Documentation

◆ MessageQueuePriorityTestCase()

constexpr distortos::test::MessageQueuePriorityTestCase::MessageQueuePriorityTestCase ( )
inline

MessageQueuePriorityTestCase's constructor.

Here is the call graph for this function:

Member Function Documentation

◆ run_()

bool distortos::test::MessageQueuePriorityTestCase::run_ ( ) const
overrideprivatevirtual

Runs the test case.

Returns
true if the test case succeeded, false otherwise

Implements distortos::test::TestCase.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ testCasePriority_

constexpr uint8_t distortos::test::MessageQueuePriorityTestCase::testCasePriority_ {1}
staticprivate

priority at which this test case should be executed


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