ChimeraTK-DeviceAccess  03.18.00
testDummyBackend.cpp File Reference
#include "BackendFactory.h"
#include "Device.h"
#include "DummyBackend.h"
#include "Exception.h"
#include "parserUtilities.h"
#include <boost/bind/bind.hpp>
#include <boost/function.hpp>
#include <boost/lambda/lambda.hpp>
#include <regex>
#include <boost/test/unit_test.hpp>
+ Include dependency graph for testDummyBackend.cpp:

Go to the source code of this file.

Classes

class  TestableDummyBackend
 The TestableDummybackend is derived from DummyBackend to get access to the protected members. More...
 
class  TestableDummyBackend::BackendRegisterer
 
class  Fixture_t
 

Namespaces

 ChimeraTK
 

Macros

#define BOOST_TEST_DYN_LINK
 
#define BOOST_TEST_MODULE   testDummyBackend
 
#define BOOST_NO_EXCEPTIONS
 
#define TEST_MAPPING_FILE   "mtcadummy_withoutModules.map"
 
#define FIRMWARE_REGISTER_STRING   "WORD_FIRMWARE"
 
#define STATUS_REGISTER_STRING   "WORD_STATUS"
 
#define USER_REGISTER_STRING   "WORD_USER"
 
#define CLOCK_MUX_REGISTER_STRING   "WORD_CLK_MUX"
 
#define CLOCK_RESET_REGISTER_STRING   "WORD_CLK_RST"
 
#define READ_ONLY_REGISTER_STRING   "WORD_READ_ONLY"
 
#define EXISTING_DEVICE   "(TestableDummy?map=" TEST_MAPPING_FILE ")"
 
#define NON_EXISTING_DEVICE   "DUMMY9"
 

Functions

 BOOST_AUTO_TEST_CASE (testCheckSizeIsMultipleOfWordSize)
 
 BOOST_AUTO_TEST_CASE (testReadWriteSingleWordRegister)
 
 BOOST_AUTO_TEST_CASE (testReadWriteMultiWordRegister)
 
 BOOST_AUTO_TEST_CASE (testReadOnly)
 
 BOOST_AUTO_TEST_CASE (testWriteCallbackFunctions)
 
 BOOST_AUTO_TEST_CASE (testWriteRegisterWithoutCallback)
 
 BOOST_AUTO_TEST_CASE (testWriteToReadOnlyRegister)
 
 BOOST_AUTO_TEST_CASE (testDummyInterruptCatalogue)
 
 BOOST_AUTO_TEST_CASE (testDummyInterrupt)
 
 BOOST_AUTO_TEST_CASE (testAddressRange)
 
 BOOST_AUTO_TEST_CASE (testIsWriteRangeOverlap)
 
 BOOST_AUTO_TEST_CASE (testFinalClosing)
 
 BOOST_AUTO_TEST_CASE (testOpenClose)
 
 BOOST_AUTO_TEST_CASE (testClose)
 
 BOOST_AUTO_TEST_CASE (testOpen)
 
 BOOST_AUTO_TEST_CASE (testCreateBackend)
 

Macro Definition Documentation

◆ BOOST_NO_EXCEPTIONS

#define BOOST_NO_EXCEPTIONS

Definition at line 20 of file testDummyBackend.cpp.

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK

Definition at line 4 of file testDummyBackend.cpp.

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   testDummyBackend

Definition at line 5 of file testDummyBackend.cpp.

◆ CLOCK_MUX_REGISTER_STRING

#define CLOCK_MUX_REGISTER_STRING   "WORD_CLK_MUX"

Definition at line 34 of file testDummyBackend.cpp.

◆ CLOCK_RESET_REGISTER_STRING

#define CLOCK_RESET_REGISTER_STRING   "WORD_CLK_RST"

Definition at line 35 of file testDummyBackend.cpp.

◆ EXISTING_DEVICE

#define EXISTING_DEVICE   "(TestableDummy?map=" TEST_MAPPING_FILE ")"

Definition at line 38 of file testDummyBackend.cpp.

◆ FIRMWARE_REGISTER_STRING

#define FIRMWARE_REGISTER_STRING   "WORD_FIRMWARE"

Definition at line 31 of file testDummyBackend.cpp.

◆ NON_EXISTING_DEVICE

#define NON_EXISTING_DEVICE   "DUMMY9"

Definition at line 39 of file testDummyBackend.cpp.

◆ READ_ONLY_REGISTER_STRING

#define READ_ONLY_REGISTER_STRING   "WORD_READ_ONLY"

Definition at line 36 of file testDummyBackend.cpp.

◆ STATUS_REGISTER_STRING

#define STATUS_REGISTER_STRING   "WORD_STATUS"

Definition at line 32 of file testDummyBackend.cpp.

◆ TEST_MAPPING_FILE

#define TEST_MAPPING_FILE   "mtcadummy_withoutModules.map"

Definition at line 30 of file testDummyBackend.cpp.

◆ USER_REGISTER_STRING

#define USER_REGISTER_STRING   "WORD_USER"

Definition at line 33 of file testDummyBackend.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/16]

BOOST_AUTO_TEST_CASE ( testAddressRange  )

Definition at line 532 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/16]

BOOST_AUTO_TEST_CASE ( testCheckSizeIsMultipleOfWordSize  )

Definition at line 112 of file testDummyBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/16]

BOOST_AUTO_TEST_CASE ( testClose  )

Try closing the backend

backend should not be open now

Definition at line 615 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [4/16]

BOOST_AUTO_TEST_CASE ( testCreateBackend  )

Only for testing purpose

Try creating a non existing backend

backend should not be in open state

check that the creation of different instances with the same map file

Definition at line 631 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [5/16]

BOOST_AUTO_TEST_CASE ( testDummyInterrupt  )

Definition at line 499 of file testDummyBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/16]

BOOST_AUTO_TEST_CASE ( testDummyInterruptCatalogue  )

Definition at line 468 of file testDummyBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/16]

BOOST_AUTO_TEST_CASE ( testFinalClosing  )

Definition at line 573 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [8/16]

BOOST_AUTO_TEST_CASE ( testIsWriteRangeOverlap  )

Definition at line 562 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [9/16]

BOOST_AUTO_TEST_CASE ( testOpen  )

Definition at line 624 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [10/16]

BOOST_AUTO_TEST_CASE ( testOpenClose  )

Definition at line 585 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [11/16]

BOOST_AUTO_TEST_CASE ( testReadOnly  )

Definition at line 231 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [12/16]

BOOST_AUTO_TEST_CASE ( testReadWriteMultiWordRegister  )

Definition at line 155 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [13/16]

BOOST_AUTO_TEST_CASE ( testReadWriteSingleWordRegister  )

Definition at line 125 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [14/16]

BOOST_AUTO_TEST_CASE ( testWriteCallbackFunctions  )

Definition at line 289 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [15/16]

BOOST_AUTO_TEST_CASE ( testWriteRegisterWithoutCallback  )

Definition at line 381 of file testDummyBackend.cpp.

◆ BOOST_AUTO_TEST_CASE() [16/16]

BOOST_AUTO_TEST_CASE ( testWriteToReadOnlyRegister  )

Definition at line 402 of file testDummyBackend.cpp.

+ Here is the call graph for this function: