switched to vector instead of std::array<ROI, 2>>, which prints extra [-1, -1] when theres only 1 udp interface
All checks were successful
Build on RHEL9 / build (push) Successful in 2m49s
Build on RHEL8 / build (push) Successful in 4m48s

This commit is contained in:
2025-06-24 09:39:28 +02:00
parent 686eebd69b
commit 28792ea7e7
11 changed files with 127 additions and 45 deletions

View File

@ -619,11 +619,11 @@ TEST_CASE("rx_roi", "[.cmdcall]") {
caller.call("rx_roi", {}, 0, GET, oss1));
// eiger returns 2 values for 2 ports per module
if (det_type == defs::EIGER) {
REQUIRE(oss1.str() == "rx_roi [[[" + stringMin + ", " + std::to_string(portSize.x - 1) + ", 20, 30], [" + std::to_string(portSize.x) + ", " + stringMax + ", 20, 30]]]\n");
REQUIRE(oss1.str() == "rx_roi [[" + stringMin + ", " + std::to_string(portSize.x - 1) + ", 20, 30], [" + std::to_string(portSize.x) + ", " + stringMax + ", 20, 30]]\n");
}
// others return only 1 roi per module (1 port per module)
else {
REQUIRE(oss1.str() == "rx_roi [[[" + stringMin + ", " + std::to_string(portSize.x - 1) + "20, 30]]]\n");
REQUIRE(oss1.str() == "rx_roi [[" + stringMin + ", " + std::to_string(portSize.x - 1) + "20, 30]]\n");
}
}
}
@ -655,11 +655,11 @@ TEST_CASE("rx_roi", "[.cmdcall]") {
caller.call("rx_roi", {}, 0, GET, oss1));
// non-eiger with 2 interfaces returns 2 values for 2 ports per module
if (numinterfaces == 2) {
REQUIRE(oss1.str() == "rx_roi [[[20, 30, " + stringMin + ", " + std::to_string(portSize.y - 1) + "], [20, 30, " + std::to_string(portSize.y) + ", " + stringMax + "]]]\n");
REQUIRE(oss1.str() == "rx_roi [[20, 30, " + stringMin + ", " + std::to_string(portSize.y - 1) + "], [20, 30, " + std::to_string(portSize.y) + ", " + stringMax + "]]\n");
}
// others return only 1 roi per module (1 port per module)
else {
REQUIRE(oss1.str() == "rx_roi [[[20, 30, " + stringMin + ", " + std::to_string(portSize.y - 1) + "], [-1, -1]]]\n");
REQUIRE(oss1.str() == "rx_roi [[20, 30, " + stringMin + ", " + std::to_string(portSize.y - 1) + "]]\n");
}
}
}