mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
fix tests for gottthard1
This commit is contained in:
parent
570a567a8c
commit
3a89c2a61e
@ -105,6 +105,10 @@ TEST_CASE("roi", "[.cmd]") {
|
|||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
|
|
||||||
if (det_type == defs::GOTTHARD) {
|
if (det_type == defs::GOTTHARD) {
|
||||||
|
if (det.size() > 1) {
|
||||||
|
REQUIRE_THROWS(proxy.Call("roi", {"0", "255"}, -1, PUT));
|
||||||
|
REQUIRE_NOTHROW(proxy.Call("roi", {}, -1, GET));
|
||||||
|
} else {
|
||||||
auto prev_val = det.getROI();
|
auto prev_val = det.getROI();
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@ -120,6 +124,7 @@ TEST_CASE("roi", "[.cmd]") {
|
|||||||
for (int i = 0; i != det.size(); ++i) {
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
det.setROI(prev_val[i], i);
|
det.setROI(prev_val[i], i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
REQUIRE_THROWS(proxy.Call("roi", {}, -1, GET));
|
REQUIRE_THROWS(proxy.Call("roi", {}, -1, GET));
|
||||||
}
|
}
|
||||||
@ -135,7 +140,7 @@ TEST_CASE("clearroi", "[.cmd]") {
|
|||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("clearroi", {}, -1, PUT, oss);
|
proxy.Call("clearroi", {}, -1, PUT, oss);
|
||||||
REQUIRE(oss.str() == "clearroi [-1, -1]\n");
|
REQUIRE(oss.str() == "clearroi successful\n");
|
||||||
}
|
}
|
||||||
for (int i = 0; i != det.size(); ++i) {
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
det.setROI(prev_val[i], i);
|
det.setROI(prev_val[i], i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user