distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
ConditionVariableOperationsTestCase.cpp File Reference

ConditionVariableOperationsTestCase class implementation. More...

Include dependency graph for ConditionVariableOperationsTestCase.cpp:

Namespaces

 distortos
 Top-level namespace of distortos project.
 
 distortos::test
 Functional tests of distortos project.
 

Functions

bool distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::testMutexAndUnlock (Mutex &mutex)
 Tests whether supplied mutex is properly locked and unlocks it. More...
 
bool distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::phase1 (Mutex &mutex)
 Phase 1 of test case. More...
 
bool distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::phase2 (Mutex &mutex)
 Phase 2 of test case. More...
 
bool distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::phase3 (Mutex &mutex)
 Phase 3 of test case. More...
 

Variables

constexpr auto distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::singleDuration = TickClock::duration{1}
 single duration used in tests More...
 
constexpr auto distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::longDuration = singleDuration * 10
 long duration used in tests More...
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::waitForNextTickContextSwitchCount {2}
 expected number of context switches in waitForNextTick(): main -> idle -> main More...
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::testMutexAndUnlockContextSwitchCount
 expected number of context switches in testMutexAndUnlock(): main -> idle -> main More...
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::phase1WaitForUntilContextSwitchCount {2}
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::phase2ThreadContextSwitchCount {5}
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{ConditionVariableOperationsTestCase.cpp}::phase3SoftwareTimerContextSwitchCount {2}
 

Detailed Description

ConditionVariableOperationsTestCase class implementation.

Author
Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.