ChimeraTK-DeviceAccess 03.20.00
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.
 
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.
 

Static Public Member Functions

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

Detailed Description

Definition at line 98 of file testPcieBackend.cpp.

Constructor & Destructor Documentation

◆ PcieBackendTest()

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

Definition at line 243 of file testPcieBackend.cpp.

Member Function Documentation

◆ testClose()

void PcieBackendTest::testClose ( )

Definition at line 446 of file testPcieBackend.cpp.

◆ 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 237 of file testPcieBackend.cpp.

◆ 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 470 of file testPcieBackend.cpp.

◆ 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 459 of file testPcieBackend.cpp.

◆ testRead()

void PcieBackendTest::testRead ( )

Definition at line 328 of file testPcieBackend.cpp.

◆ testReadDeviceInfo()

void PcieBackendTest::testReadDeviceInfo ( )

Definition at line 271 of file testPcieBackend.cpp.

◆ testReadDMA()

void PcieBackendTest::testReadDMA ( )

Definition at line 292 of file testPcieBackend.cpp.

◆ testReadRegister()

void PcieBackendTest::testReadRegister ( )

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

Definition at line 404 of file testPcieBackend.cpp.

◆ testWriteArea()

void PcieBackendTest::testWriteArea ( )

Definition at line 369 of file testPcieBackend.cpp.

◆ testWriteDMA()

void PcieBackendTest::testWriteDMA ( )

Definition at line 322 of file testPcieBackend.cpp.

◆ testWriteRegister()

void PcieBackendTest::testWriteRegister ( )

Definition at line 427 of file testPcieBackend.cpp.


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