mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
exposing receiver thread ids to client (#102)
* exposing receiver thread ids to client Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
This commit is contained in:
@ -232,9 +232,32 @@ TEST_CASE("Streaming of slsDetectorDefs::ROI") {
|
||||
REQUIRE(oss.str() == "[-10, 1]");
|
||||
}
|
||||
|
||||
TEST_CASE("std::array"){
|
||||
std::array<int, 3> arr{4,6,7};
|
||||
TEST_CASE("std::array") {
|
||||
std::array<int, 3> arr{4, 6, 7};
|
||||
REQUIRE(ToString(arr) == "[4, 6, 7]");
|
||||
}
|
||||
|
||||
TEST_CASE("string to dac index") {
|
||||
// test a few dacs
|
||||
REQUIRE(defs::VCAL == StringTo<defs::dacIndex>("vcal"));
|
||||
REQUIRE(defs::VIN_CM == StringTo<defs::dacIndex>("vin_cm"));
|
||||
REQUIRE(defs::VB_DS == StringTo<defs::dacIndex>("vb_ds"));
|
||||
}
|
||||
|
||||
TEST_CASE("dac index to string") {
|
||||
REQUIRE(ToString(defs::VCAL) == "vcal");
|
||||
REQUIRE(ToString(defs::VB_DS) == "vb_ds");
|
||||
}
|
||||
|
||||
TEST_CASE("convert vector of strings to dac index") {
|
||||
std::vector<std::string> dacs{"vcassh", "vth2", "vrshaper"};
|
||||
std::vector<defs::dacIndex> daci{defs::VCASSH, defs::VTH2, defs::VRSHAPER};
|
||||
auto r = StringTo<defs::dacIndex>(dacs);
|
||||
REQUIRE(r == daci);
|
||||
}
|
||||
|
||||
TEST_CASE("vector of dac index to string") {
|
||||
std::vector<defs::dacIndex> daci{defs::VCASSH, defs::VTH2, defs::VRSHAPER};
|
||||
auto r = ToString(daci);
|
||||
REQUIRE(r == "[vcassh, vth2, vrshaper]");
|
||||
}
|
Reference in New Issue
Block a user