mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
moved detParameters to sls_detector_defs
This commit is contained in:
@ -5,4 +5,5 @@ target_sources(tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-network_utils.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-string_utils.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-Timer.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-sls_detector_defs.cpp
|
||||
)
|
33
slsSupportLib/tests/test-sls_detector_defs.cpp
Normal file
33
slsSupportLib/tests/test-sls_detector_defs.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
#include "catch.hpp"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "slsDetector.h"
|
||||
|
||||
using dt = slsDetectorDefs::detectorType;
|
||||
|
||||
TEST_CASE("sls_detector_module default construction", "[support][new]") {
|
||||
sls_detector_module m;
|
||||
CHECK(m.serialnumber == 0);
|
||||
CHECK(m.nchan == 0);
|
||||
CHECK(m.nchip == 0);
|
||||
CHECK(m.ndac == 0);
|
||||
CHECK(m.reg == 0);
|
||||
CHECK(m.iodelay == 0);
|
||||
CHECK(m.tau == 0);
|
||||
CHECK(m.eV == 0);
|
||||
CHECK(m.dacs == nullptr);
|
||||
CHECK(m.chanregs == nullptr);
|
||||
}
|
||||
|
||||
TEST_CASE("sls_detector_module from type", "[support][new]") {
|
||||
sls_detector_module m(dt::EIGER);
|
||||
CHECK(m.serialnumber == 0);
|
||||
CHECK(m.nchan == 256*256*4);
|
||||
CHECK(m.nchip == 4);
|
||||
CHECK(m.ndac == 16);
|
||||
CHECK(m.reg == 0);
|
||||
CHECK(m.iodelay == 0);
|
||||
CHECK(m.tau == 0);
|
||||
CHECK(m.eV == 0);
|
||||
CHECK(m.dacs != nullptr);
|
||||
CHECK(m.chanregs != nullptr);
|
||||
}
|
Reference in New Issue
Block a user