ChimeraTK-DeviceAccess  03.18.00
PcieBackendTest Class Reference

Public Member Functions

 PcieBackendTest (std::string const &deviceFileName, unsigned int slot)
 
void testFailIfClosed ()
 Tests whether openig of the backend works, and that the exception is thrown correctly if the backend cannot be opened. More...
 
void testCreateBackend ()
 
void testOpen ()
 
void testClose ()
 
void testRead ()
 
void testWriteArea ()
 
void testReadRegister ()
 
void testWriteRegister ()
 
void testReadDMA ()
 
void testWriteDMA ()
 
void testReadDeviceInfo ()
 
void testFailIfBackendClosed ()
 Test that all functions throw an exception if the backend is not opened. More...
 

Static Public Member Functions

static void testConstructor ()
 A simple test which calls the default constructor and checks that the backend is closed. More...
 

Detailed Description

Definition at line 97 of file testPcieBackend.cpp.

Constructor & Destructor Documentation

◆ PcieBackendTest()

PcieBackendTest::PcieBackendTest ( std::string const &  deviceFileName,
unsigned int  slot 
)

Definition at line 242 of file testPcieBackend.cpp.

Member Function Documentation

◆ testClose()

void PcieBackendTest::testClose ( )

Definition at line 445 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testConstructor()

void PcieBackendTest::testConstructor ( )
static

A simple test which calls the default constructor and checks that the backend is closed.

We keep this separate because in principle constructors might throw, and this should explicitly be tested. But not within the instances of the test class, so it's a static function.

Definition at line 236 of file testPcieBackend.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testCreateBackend()

void PcieBackendTest::testCreateBackend ( )

Try creating a non existing backend

Try creating an existing backend

Backend should not be in open state

Definition at line 469 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testFailIfBackendClosed()

void PcieBackendTest::testFailIfBackendClosed ( )

Test that all functions throw an exception if the backend is not opened.

◆ testFailIfClosed()

void PcieBackendTest::testFailIfClosed ( )

Tests whether openig of the backend works, and that the exception is thrown correctly if the backend cannot be opened.

◆ testOpen()

void PcieBackendTest::testOpen ( )

Definition at line 458 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testRead()

void PcieBackendTest::testRead ( )

Definition at line 327 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testReadDeviceInfo()

void PcieBackendTest::testReadDeviceInfo ( )

Definition at line 270 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testReadDMA()

void PcieBackendTest::testReadDMA ( )

Definition at line 291 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testReadRegister()

void PcieBackendTest::testReadRegister ( )

There has to be an exception if the bar is wrong. 6 is definitely out of range.

Definition at line 403 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testWriteArea()

void PcieBackendTest::testWriteArea ( )

Definition at line 368 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testWriteDMA()

void PcieBackendTest::testWriteDMA ( )

Definition at line 321 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

◆ testWriteRegister()

void PcieBackendTest::testWriteRegister ( )

Definition at line 426 of file testPcieBackend.cpp.

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: