mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-06-29 02:16:46 +02:00
accept comma separated rx_dbitlist
This commit is contained in:
@@ -415,4 +415,13 @@ 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>{});
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
||||
Reference in New Issue
Block a user