rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
testTimer.cpp File Reference

Unit tests for the Timer class. More...

#include <scxml4cpp/Action.h>
#include <rad/logger.hpp>
#include <rad/smAdapter.hpp>
#include <rad/timer.hpp>
#include <gtest/gtest.h>
#include <boost/bind.hpp>
#include <chrono>
#include <fstream>

Classes

struct  TimerEventTrait
 
class  TimerAction
 
class  TimeoutHandler
 
class  TestTimer
 

Typedefs

using TimerEvent = rad::EventT< TimerEventTrait >
 

Functions

 TEST_F (TestTimer, TestCtorOk)
 
 TEST_F (TestTimer, TestCtorNok)
 
 TEST_F (TestTimer, TestInstall)
 
 TEST_F (TestTimer, TestCancel)
 
 TEST_F (TestTimer, TestLifeCycle1)
 
 TEST_F (TestTimer, TestLifeCycle2)
 
 TEST_F (TestTimer, TestLifeCycle3)
 
 TEST_F (TestTimer, TestLifeCycle4)
 
 TEST_F (TestTimer, TestLifeCycle5)
 

Detailed Description

Unit tests for the Timer class.

Author
landolfa

Typedef Documentation

Function Documentation

TEST_F ( TestTimer  ,
TestCtorOk   
)
TEST_F ( TestTimer  ,
TestCtorNok   
)
TEST_F ( TestTimer  ,
TestInstall   
)
TEST_F ( TestTimer  ,
TestCancel   
)
TEST_F ( TestTimer  ,
TestLifeCycle1   
)

Normal scenario: timer & callback are deleted after timer expires (i.e. after callback invocation).

TEST_F ( TestTimer  ,
TestLifeCycle2   
)

Normal scenario: timer is deleted/canceled before timer expires.

TEST_F ( TestTimer  ,
TestLifeCycle3   
)

Error scenario: timer and callback objs are deleted before timer expires.

TEST_F ( TestTimer  ,
TestLifeCycle4   
)

Error scenario: ios deleted before timer and callback.

TEST_F ( TestTimer  ,
TestLifeCycle5   
)

Error scenario: ios deleted before callback and timer.