formatting

This commit is contained in:
2023-11-07 14:52:14 +01:00
parent 397e846509
commit 01e4bcb47e
12 changed files with 81 additions and 84 deletions

View File

@ -692,7 +692,8 @@ TEST_CASE("confadc", "[.cmd]") {
const int ndet = det.size();
const int nchip = 10;
const int nadc = 32;
std::vector<std::vector<std::vector<int>>> prev_val(ndet, std::vector<std::vector<int>>(nchip, std::vector<int>(nadc)));
std::vector<std::vector<std::vector<int>>> prev_val(
ndet, std::vector<std::vector<int>>(nchip, std::vector<int>(nadc)));
for (int i = 0; i != ndet; ++i) {
for (int j = 0; j != nchip; ++j) {
for (int k = 0; k != nadc; ++k) {

View File

@ -19,17 +19,18 @@ using test::PUT;
/* dacs */
TEST_CASE("Setting and reading back moench dacs", "[.cmd][.dacs]") {
// vbp_colbuf, vipre, vin_cm, vb_sda, vcasc_sfp, vout_cm, vipre_cds, ibias_sfp
// vbp_colbuf, vipre, vin_cm, vb_sda, vcasc_sfp, vout_cm, vipre_cds,
// ibias_sfp
Detector det;
CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash();
if (det_type == defs::MOENCH) {
SECTION("vbp_colbuf") { test_dac(defs::VBP_COLBUF, "vbp_colbuf", 1300); }
SECTION("vbp_colbuf") {
test_dac(defs::VBP_COLBUF, "vbp_colbuf", 1300);
}
SECTION("vipre") { test_dac(defs::VIPRE, "vipre", 1000); }
SECTION("vin_cm") { test_dac(defs::VIN_CM, "vin_cm", 1400); }
SECTION("vb_sda") {
test_dac(defs::VB_SDA, "vb_sda", 680);
}
SECTION("vb_sda") { test_dac(defs::VB_SDA, "vb_sda", 680); }
SECTION("vcasc_sfp") { test_dac(defs::VCASC_SFP, "vcasc_sfp", 1428); }
SECTION("vout_cm") { test_dac(defs::VOUT_CM, "vout_cm", 1200); }
SECTION("vipre_cds") { test_dac(defs::VIPRE_CDS, "vipre_cds", 800); }
@ -105,5 +106,4 @@ TEST_CASE("Setting and reading back moench dacs", "[.cmd][.dacs]") {
}
}
} // namespace sls

View File

@ -196,24 +196,24 @@ TEST_CASE("String conversions") {
"[{one: 1}, {one: 1, three: 3, two: 2}, {one: 1}]");
}
TEST_CASE("Any element is equal"){
Result<int> r{1,2,3,4,5};
TEST_CASE("Any element is equal") {
Result<int> r{1, 2, 3, 4, 5};
REQUIRE(r.any(3));
REQUIRE_FALSE(r.any(9));
}
TEST_CASE("Result contains only the specified elements"){
Result<int> r{1,1,1};
TEST_CASE("Result contains only the specified elements") {
Result<int> r{1, 1, 1};
REQUIRE(r.contains_only(1));
REQUIRE(r.contains_only(1,1));
REQUIRE(r.contains_only(1, 1));
}
TEST_CASE("Only with multiple values"){
Result<int> r{1,1,2,1,2,1,1};
TEST_CASE("Only with multiple values") {
Result<int> r{1, 1, 2, 1, 2, 1, 1};
REQUIRE_FALSE(r.contains_only(1));
REQUIRE_FALSE(r.contains_only(2));
REQUIRE(r.contains_only(1,2));
REQUIRE(r.contains_only(2,1));
REQUIRE(r.contains_only(1, 2));
REQUIRE(r.contains_only(2, 1));
}
} // namespace sls