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

SignalsWaitOperationsTestCase class implementation. More...

Include dependency graph for SignalsWaitOperationsTestCase.cpp:

Namespaces

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

Typedefs

using distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::SendSignal = int(Thread &, uint8_t, int)
 type of function used to send signal to selected thread More...
 
using distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::TestReceivedSignalInformation = bool(const SignalInformation &, uint8_t, int)
 type of function used to test received SignalInformation object More...
 
using distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::Stage = std::pair< const SendSignal &, const TestReceivedSignalInformation & >
 pair with functions for one stage More...
 

Functions

int distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::generateSignalWrapper (Thread &thread, const uint8_t signalNumber, int)
 Wrapper for Thread::generateSignal(). More...
 
int distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::queueSignalWrapper (Thread &thread, const uint8_t signalNumber, const int value)
 Wrapper for Thread::queueSignal(). More...
 
bool distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::testReceivedGeneratedSignal (const SignalInformation &signalInformation, const uint8_t signalNumber, int)
 Tests whether received SignalInformation object matches the signal that was generated. More...
 
bool distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::testReceivedQueuedSignal (const SignalInformation &signalInformation, const uint8_t signalNumber, const int value)
 Tests whether received SignalInformation object matches the signal that was queued. More...
 
bool distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::testSelfNoSignalsPending ()
 Tests whether no signals are pending for current thread. More...
 
bool distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::testSelfSendSignal (const SendSignal &sendSignal, const uint8_t signalNumber, const int value)
 Tests sending of signal to current thread. More...
 
void distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::tryWaitWrapper (const SignalSet &signalSet, int &sharedRet)
 Wrapper for ThisThread::Signals::tryWait() that can be used in phase3(). More...
 
void distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::tryWaitForWrapper (const SignalSet &signalSet, int &sharedRet)
 Wrapper for ThisThread::Signals::tryWaitFor() that can be used in phase3(). More...
 
void distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::tryWaitUntilWrapper (const SignalSet &signalSet, int &sharedRet)
 Wrapper for ThisThread::Signals::tryWaitUntil() that can be used in phase3(). More...
 
void distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::waitWrapper (const SignalSet &signalSet, int &sharedRet)
 Wrapper for ThisThread::Signals::wait() that can be used in phase3(). More...
 
bool distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::phase1 (const SendSignal &sendSignal, const TestReceivedSignalInformation &testReceivedSignalInformation)
 Phase 1 of test case. More...
 
bool distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::phase2 (const SendSignal &sendSignal, const TestReceivedSignalInformation &testReceivedSignalInformation)
 Phase 2 of test case. More...
 
bool distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::phase3 (const SendSignal &sendSignal, const TestReceivedSignalInformation &)
 Phase 3 of test case. More...
 
bool distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::phase4 (const SendSignal &sendSignal, const TestReceivedSignalInformation &)
 Phase 4 of test case. More...
 

Variables

constexpr size_t distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::testThreadStackSize {512}
 size of stack for test thread, bytes More...
 
constexpr auto distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::singleDuration = TickClock::duration{1}
 single duration used in tests More...
 
constexpr auto distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::longDuration = singleDuration * 10
 long duration used in tests More...
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::waitForNextTickContextSwitchCount {2}
 expected number of context switches in waitForNextTick(): main -> idle -> main More...
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::phase1TimedOutWaitContextSwitchCount {2}
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::phase2SoftwareTimerContextSwitchCount {2}
 
decltype(statistics::getContextSwitchCount()) constexpr distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::phase3ThreadContextSwitchCount {2}
 
constexpr size_t distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::stagesSize {2}
 size of stages array More...
 
const std::array< Stage, stagesSize > distortos::test::anonymous_namespace{SignalsWaitOperationsTestCase.cpp}::stages
 test stages More...
 

Detailed Description

SignalsWaitOperationsTestCase class implementation.

Author
Copyright (C) 2015-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/.