Formatted package
This commit is contained in:
Dhanya Thattil
2022-08-05 15:39:34 +02:00
committed by GitHub
parent 7173785b29
commit 6bf9dbf6d3
89 changed files with 1366 additions and 1210 deletions

View File

@ -465,7 +465,8 @@ TEST_CASE("rx_roi", "[.cmd]") {
REQUIRE(oss.str() == "rx_roi [10, 15]\n");
}
REQUIRE_THROWS(proxy.Call("rx_roi", {"-1", "-1"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("rx_roi", {"10", "15", "25", "30"}, -1, PUT));
REQUIRE_THROWS(
proxy.Call("rx_roi", {"10", "15", "25", "30"}, -1, PUT));
}
// 2d
else {
@ -481,10 +482,18 @@ TEST_CASE("rx_roi", "[.cmd]") {
}
{
std::ostringstream oss;
proxy.Call("rx_roi", {"1", std::to_string(detsize.x - 5), "1", std::to_string(detsize.y - 5)}, -1, PUT, oss);
REQUIRE(oss.str() == std::string("rx_roi [1, ") + std::to_string(detsize.x - 5) + std::string(", ") + std::to_string(detsize.y - 5) + std::string(", 1]\n"));
}
REQUIRE_THROWS(proxy.Call("rx_roi", {"-1", "-1", "-1", "-1"}, -1, PUT));
proxy.Call("rx_roi",
{"1", std::to_string(detsize.x - 5), "1",
std::to_string(detsize.y - 5)},
-1, PUT, oss);
REQUIRE(oss.str() == std::string("rx_roi [1, ") +
std::to_string(detsize.x - 5) +
std::string(", ") +
std::to_string(detsize.y - 5) +
std::string(", 1]\n"));
}
REQUIRE_THROWS(
proxy.Call("rx_roi", {"-1", "-1", "-1", "-1"}, -1, PUT));
}
for (int i = 0; i != det.size(); ++i) {
@ -574,7 +583,7 @@ TEST_CASE("fname", "[.cmd]") {
}
REQUIRE_THROWS(proxy.Call("fname", {"fdf/dfd"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("fname", {"fdf dfd"}, -1, PUT));
for (int i = 0; i != det.size(); ++i) {
det.setFileNamePrefix(prev_val[i], {i});
}