distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
PrioritizedTestCase.hpp
Go to the documentation of this file.
1 
12 #ifndef TEST_PRIORITIZEDTESTCASE_HPP_
13 #define TEST_PRIORITIZEDTESTCASE_HPP_
14 
15 #include "TestCaseCommon.hpp"
16 
17 #include <cstdint>
18 
19 namespace distortos
20 {
21 
22 namespace test
23 {
24 
31 {
32 public:
33 
40  constexpr explicit PrioritizedTestCase(const uint8_t priority) :
41  priority_{priority}
42  {
43 
44  }
45 
46 protected:
47 
56  bool finalize() const override;
57 
66  bool initialize() const override;
67 
68 private:
69 
71  const uint8_t priority_;
72 };
73 
74 } // namespace test
75 
76 } // namespace distortos
77 
78 #endif // TEST_PRIORITIZEDTESTCASE_HPP_
bool finalize() const override
Finalizes the test case.
Definition: PrioritizedTestCase.cpp:26
TestCaseCommon class header.
bool initialize() const override
Initializes the test case.
Definition: PrioritizedTestCase.cpp:32
const uint8_t priority_
priority at which testCase_ will be executed
Definition: PrioritizedTestCase.hpp:71
TestCaseCommon class implements common parts of TestCase.
Definition: TestCaseCommon.hpp:24
Top-level namespace of distortos project.
constexpr PrioritizedTestCase(const uint8_t priority)
PrioritizedTestCase&#39;s constructor.
Definition: PrioritizedTestCase.hpp:40
PrioritizedTestCase class is a TestCase which runs at specific priority, restoring original priority ...
Definition: PrioritizedTestCase.hpp:30