![]() |
ChimeraTK-DeviceAccess 03.20.00
|
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. | |
Definition at line 98 of file testPcieBackend.cpp.
PcieBackendTest::PcieBackendTest | ( | std::string const & | deviceFileName, |
unsigned int | slot | ||
) |
Definition at line 243 of file testPcieBackend.cpp.
void PcieBackendTest::testClose | ( | ) |
Definition at line 446 of file testPcieBackend.cpp.
|
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.
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.
void PcieBackendTest::testFailIfBackendClosed | ( | ) |
Test that all functions throw an exception if the backend is not opened.
void PcieBackendTest::testFailIfClosed | ( | ) |
Tests whether openig of the backend works, and that the exception is thrown correctly if the backend cannot be opened.
void PcieBackendTest::testOpen | ( | ) |
Definition at line 459 of file testPcieBackend.cpp.
void PcieBackendTest::testRead | ( | ) |
Definition at line 328 of file testPcieBackend.cpp.
void PcieBackendTest::testReadDeviceInfo | ( | ) |
Definition at line 271 of file testPcieBackend.cpp.
void PcieBackendTest::testReadDMA | ( | ) |
Definition at line 292 of file testPcieBackend.cpp.
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.
void PcieBackendTest::testWriteArea | ( | ) |
Definition at line 369 of file testPcieBackend.cpp.
void PcieBackendTest::testWriteDMA | ( | ) |
Definition at line 322 of file testPcieBackend.cpp.
void PcieBackendTest::testWriteRegister | ( | ) |
Definition at line 427 of file testPcieBackend.cpp.