accept comma separated rx_dbitlist

This commit is contained in:
Erik Frojdh
2026-05-20 16:08:39 +02:00
parent 83cd91b93c
commit ed8c885de0
3 changed files with 46 additions and 7 deletions
+9
View File
@@ -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