mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 10:30:41 +02:00
added test to check settings after resetdacs
This commit is contained in:
parent
9f11dae703
commit
3f08d6699c
@ -227,6 +227,12 @@ TEST_CASE("settings", "[.cmd]") {
|
|||||||
REQUIRE_THROWS(proxy.Call("settings", {it}, -1, PUT));
|
REQUIRE_THROWS(proxy.Call("settings", {it}, -1, PUT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
|
if (prev_val[i] != defs::UNDEFINED &&
|
||||||
|
prev_val[i] != defs::UNINITIALIZED) {
|
||||||
|
det.setSettings(prev_val[i], {i});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("threshold", "[.cmd]") {
|
TEST_CASE("threshold", "[.cmd]") {
|
||||||
@ -1471,9 +1477,17 @@ TEST_CASE("resetdacs", "[.cmd]") {
|
|||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type != defs::CHIPTESTBOARD) {
|
if (det_type != defs::CHIPTESTBOARD) {
|
||||||
|
auto prev_val = det.getSettings();
|
||||||
|
|
||||||
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, GET));
|
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, GET));
|
||||||
REQUIRE_NOTHROW(proxy.Call("resetdacs", {}, -1, PUT));
|
REQUIRE_NOTHROW(proxy.Call("resetdacs", {}, -1, PUT));
|
||||||
REQUIRE_NOTHROW(proxy.Call("resetdacs", {"hard"}, -1, PUT));
|
REQUIRE_NOTHROW(proxy.Call("resetdacs", {"hard"}, -1, PUT));
|
||||||
|
|
||||||
|
// settings should not change especially for jungfrau and m3
|
||||||
|
auto next_val = det.getSettings();
|
||||||
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
|
REQUIRE(prev_val[i] == next_val[i]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, GET));
|
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, GET));
|
||||||
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, PUT));
|
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, PUT));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user