mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +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));
|
||||
}
|
||||
}
|
||||
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]") {
|
||||
@ -1471,9 +1477,17 @@ TEST_CASE("resetdacs", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getSettings();
|
||||
|
||||
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, GET));
|
||||
REQUIRE_NOTHROW(proxy.Call("resetdacs", {}, -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 {
|
||||
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("resetdacs", {}, -1, PUT));
|
||||
|
Loading…
x
Reference in New Issue
Block a user