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

SemaphoreOperationsTestCase class implementation. More...

Include dependency graph for SemaphoreOperationsTestCase.cpp:

Namespaces

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

Functions

bool distortos::test::anonymous_namespace{SemaphoreOperationsTestCase.cpp}::testPost (Semaphore &semaphore)
 Tests Semaphore::post() - it must succeed immediately. More...
 
bool distortos::test::anonymous_namespace{SemaphoreOperationsTestCase.cpp}::testTryWaitWhenLocked (Semaphore &semaphore)
 Tests Semaphore::tryWait() when semaphore is locked - it must fail immediately and return EAGAIN. More...
 
bool distortos::test::anonymous_namespace{SemaphoreOperationsTestCase.cpp}::phase1 ()
 Phase 1 of test case. More...
 
bool distortos::test::anonymous_namespace{SemaphoreOperationsTestCase.cpp}::phase2 ()
 Phase 2 of test case. More...
 
bool distortos::test::anonymous_namespace{SemaphoreOperationsTestCase.cpp}::phase3 ()
 Phase 3 of test case. More...
 
bool distortos::test::anonymous_namespace{SemaphoreOperationsTestCase.cpp}::phase4 ()
 Phase 4 of test case. More...
 
bool distortos::test::anonymous_namespace{SemaphoreOperationsTestCase.cpp}::phase5 ()
 Phase 5 of test case. More...
 

Variables

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

Detailed Description

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