distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
distortos::test::PrioritizedTestCase Class Reference

PrioritizedTestCase class is a TestCase which runs at specific priority, restoring original priority of main test thread afterwards. More...

#include <PrioritizedTestCase.hpp>

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

Public Member Functions

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

Protected Member Functions

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

Private Attributes

const uint8_t priority_
 priority at which testCase_ will be executed More...
 

Detailed Description

PrioritizedTestCase class is a TestCase which runs at specific priority, restoring original priority of main test thread afterwards.

Constructor & Destructor Documentation

◆ PrioritizedTestCase()

constexpr distortos::test::PrioritizedTestCase::PrioritizedTestCase ( const uint8_t  priority)
inlineexplicit

PrioritizedTestCase's constructor.

Parameters
[in]priorityis the priority at which test case will be executed
Here is the call graph for this function:

Member Function Documentation

◆ finalize()

bool distortos::test::PrioritizedTestCase::finalize ( ) const
overrideprotectedvirtual

Finalizes the test case.

Restores original priority of main test thread.

Returns
true if finalization succeeded, false otherwise

Implements distortos::test::TestCase.

Reimplemented in distortos::test::SignalsTestCaseCommon.

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

◆ initialize()

bool distortos::test::PrioritizedTestCase::initialize ( ) const
overrideprotectedvirtual

Initializes the test case.

Sets configured priority.

Returns
true if initialization succeeded, false otherwise

Implements distortos::test::TestCase.

Reimplemented in distortos::test::SignalsTestCaseCommon.

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

Member Data Documentation

◆ priority_

const uint8_t distortos::test::PrioritizedTestCase::priority_
private

priority at which testCase_ will be executed


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