ChimeraTK-DeviceAccess  03.18.00
testSubdeviceBackend.cpp File Reference
#include "Device.h"
#include <thread>
#include <boost/test/unit_test.hpp>
+ Include dependency graph for testSubdeviceBackend.cpp:

Go to the source code of this file.

Macros

#define BOOST_TEST_DYN_LINK
 
#define BOOST_TEST_MODULE   SubdeviceBackendTest
 
#define BOOST_NO_EXCEPTIONS
 
#define CHECK_TIMEOUT(execPreCheck, condition, maxMilliseconds)
 

Functions

 BOOST_AUTO_TEST_CASE (testOpenClose)
 
 BOOST_AUTO_TEST_CASE (testMayReplaceOther)
 
 BOOST_AUTO_TEST_CASE (testWriteScalarRaw)
 
 BOOST_AUTO_TEST_CASE (testWriteScalarInAreaRaw)
 
 BOOST_AUTO_TEST_CASE (testWriteArrayRaw)
 
 BOOST_AUTO_TEST_CASE (testWriteScalarCooked)
 
 BOOST_AUTO_TEST_CASE (testWriteArrayCooked)
 
 BOOST_AUTO_TEST_CASE (testReadScalarRaw)
 
 BOOST_AUTO_TEST_CASE (testReadScalarInAreaRaw)
 
 BOOST_AUTO_TEST_CASE (testReadArrayRaw)
 
 BOOST_AUTO_TEST_CASE (testReadScalarCooked)
 
 BOOST_AUTO_TEST_CASE (testReadArrayCooked)
 
 BOOST_AUTO_TEST_CASE (test3regsScalar)
 
 BOOST_AUTO_TEST_CASE (test3regsArray)
 
 BOOST_AUTO_TEST_CASE (test3regsByteOffset1)
 
 BOOST_AUTO_TEST_CASE (testAreaHandshake1)
 
 BOOST_AUTO_TEST_CASE (test2regsScalar)
 
 BOOST_AUTO_TEST_CASE (testIsFunctional)
 

Macro Definition Documentation

◆ BOOST_NO_EXCEPTIONS

#define BOOST_NO_EXCEPTIONS

Definition at line 10 of file testSubdeviceBackend.cpp.

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK

Definition at line 8 of file testSubdeviceBackend.cpp.

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   SubdeviceBackendTest

Definition at line 9 of file testSubdeviceBackend.cpp.

◆ CHECK_TIMEOUT

#define CHECK_TIMEOUT (   execPreCheck,
  condition,
  maxMilliseconds 
)
Value:
{ \
std::chrono::steady_clock::time_point t0 = std::chrono::steady_clock::now(); \
execPreCheck while(!(condition)) { \
bool timeout_reached = (std::chrono::steady_clock::now() - t0) > std::chrono::milliseconds(maxMilliseconds); \
BOOST_CHECK(!timeout_reached); \
if(timeout_reached) break; \
usleep(1000); \
execPreCheck \
} \
}

Definition at line 17 of file testSubdeviceBackend.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/18]

BOOST_AUTO_TEST_CASE ( test2regsScalar  )

Definition at line 653 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/18]

BOOST_AUTO_TEST_CASE ( test3regsArray  )
Todo:
Make a proper test with a custom backend, to make sure all elements of the array are properly written

Definition at line 512 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/18]

BOOST_AUTO_TEST_CASE ( test3regsByteOffset1  )

Definition at line 553 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/18]

BOOST_AUTO_TEST_CASE ( test3regsScalar  )

Definition at line 464 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/18]

BOOST_AUTO_TEST_CASE ( testAreaHandshake1  )

Definition at line 593 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/18]

BOOST_AUTO_TEST_CASE ( testIsFunctional  )

Definition at line 686 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/18]

BOOST_AUTO_TEST_CASE ( testMayReplaceOther  )
Todo:
Test exception handling!

Definition at line 59 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [8/18]

BOOST_AUTO_TEST_CASE ( testOpenClose  )

Definition at line 33 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [9/18]

BOOST_AUTO_TEST_CASE ( testReadArrayCooked  )

Definition at line 438 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [10/18]

BOOST_AUTO_TEST_CASE ( testReadArrayRaw  )

Definition at line 367 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [11/18]

BOOST_AUTO_TEST_CASE ( testReadScalarCooked  )

Definition at line 393 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [12/18]

BOOST_AUTO_TEST_CASE ( testReadScalarInAreaRaw  )

Definition at line 328 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [13/18]

BOOST_AUTO_TEST_CASE ( testReadScalarRaw  )

Definition at line 289 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [14/18]

BOOST_AUTO_TEST_CASE ( testWriteArrayCooked  )

Definition at line 260 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [15/18]

BOOST_AUTO_TEST_CASE ( testWriteArrayRaw  )

Definition at line 188 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [16/18]

BOOST_AUTO_TEST_CASE ( testWriteScalarCooked  )

Definition at line 214 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [17/18]

BOOST_AUTO_TEST_CASE ( testWriteScalarInAreaRaw  )

Definition at line 149 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [18/18]

BOOST_AUTO_TEST_CASE ( testWriteScalarRaw  )

Definition at line 105 of file testSubdeviceBackend.cpp.

+ Here is the call graph for this function:
ChimeraTK::testable_rebot_sleep::now
boost::chrono::steady_clock::time_point now()
Definition: testableRebotSleep.cc:7