mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-10-15 11:20:26 +02:00
accept comma separated rx_dbitlist (#1463)
Build and Deploy on local RHEL9 / build (push) Successful in 2m0s
Build on RHEL9 docker image / build (push) Successful in 4m8s
Build on RHEL8 docker image / build (push) Successful in 5m10s
Build and Deploy on local RHEL8 / build (push) Successful in 5m1s
Run Simulator Tests on local RHEL9 / build (push) Successful in 20m40s
Run Simulator Tests on local RHEL8 / build (push) Successful in 24m3s
Build and Deploy on local RHEL9 / build (push) Successful in 2m0s
Build on RHEL9 docker image / build (push) Successful in 4m8s
Build on RHEL8 docker image / build (push) Successful in 5m10s
Build and Deploy on local RHEL8 / build (push) Successful in 5m1s
Run Simulator Tests on local RHEL9 / build (push) Successful in 20m40s
Run Simulator Tests on local RHEL8 / build (push) Successful in 24m3s
* accept comma separated rx_dbitlist * added counters * bumping workflow versions * bumping actions version and fixing conda-build * check brackets * updated help * updated trimen * handling thresholds --------- Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
This commit is contained in:
@@ -415,4 +415,24 @@ TEST_CASE("string to timingInfoDecoder") {
|
||||
defs::timingInfoDecoder::SHINE);
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("Convert string to vector of ints") {
|
||||
REQUIRE(StringTo<std::vector<int>>("1, 2, 3") == std::vector<int>{1, 2, 3});
|
||||
REQUIRE(StringTo<std::vector<int>>(" 4 ,5,6 ") == std::vector<int>{4, 5, 6});
|
||||
REQUIRE(StringTo<std::vector<int>>("[8]") == std::vector<int>{8});
|
||||
REQUIRE(StringTo<std::vector<int>>("9, ") == std::vector<int>{9});
|
||||
REQUIRE(StringTo<std::vector<int>>("") == std::vector<int>{});
|
||||
REQUIRE(StringTo<std::vector<int>>("[]") == std::vector<int>{});
|
||||
REQUIRE(StringTo<std::vector<int>>(" [ [1, 2] ] ") ==
|
||||
std::vector<int>{1, 2});
|
||||
}
|
||||
|
||||
TEST_CASE("Mismatched brackets in string to vector throws") {
|
||||
REQUIRE_THROWS(StringTo<std::vector<int>>("[1, 2"));
|
||||
REQUIRE_THROWS(StringTo<std::vector<int>>("1, 2]"));
|
||||
REQUIRE_THROWS(StringTo<std::vector<int>>("[[1, 2]"));
|
||||
REQUIRE_THROWS(StringTo<std::vector<int>>("1]2"));
|
||||
REQUIRE_THROWS(StringTo<std::vector<int>>("[1], [2]"));
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
||||
Reference in New Issue
Block a user