ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
TestTimer.cpp File Reference

Unit tests for the Timer class. More...

#include "TestEvents.hpp"
#include <rad/Timer.hpp>
#include <rad/Dispatcher.hpp>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <gtest/gtest.h>
#include <time.h>
#include <memory>

Classes

class  TestTimer
 
class  TimeoutHandler
 

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

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.