mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 01:27:59 +02:00
@ -539,4 +539,33 @@ TEST_CASE("filtercells", "[.cmd]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("sync", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
auto prev_val = det.getSynchronization().tsquash(
|
||||
"inconsistent synchronization to test");
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("sync", {"0"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "sync 0\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("sync", {"1"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "sync 1\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("sync", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "sync 1\n");
|
||||
}
|
||||
det.getSynchronization(prev_val);
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("sync", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("sync", {"0"}, -1, PUT));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
Reference in New Issue
Block a user