add ignore_header setup option, add unit tests for parsing by header, add string_view to possible conversion values

This commit is contained in:
ado
2022-03-27 21:04:02 +02:00
parent 45d166f93d
commit a8fa5c753c
69 changed files with 4194 additions and 33 deletions

View File

@@ -146,7 +146,7 @@ TEST_CASE("extract test functions for boolean values") {
CHECK_EQ(v, b);
}
for (const std::string& s : {"2", "tru", "truee", "xxx", ""}) {
for (const std::string s : {"2", "tru", "truee", "xxx", ""}) {
bool v;
CHECK_FALSE(ss::extract(s.c_str(), s.c_str() + s.size(), v));
}
@@ -160,7 +160,7 @@ TEST_CASE("extract test functions for char values") {
CHECK_EQ(v, c);
}
for (const std::string& s : {"aa", "xxx", ""}) {
for (const std::string s : {"aa", "xxx", ""}) {
char v;
CHECK_FALSE(ss::extract(s.c_str(), s.c_str() + s.size(), v));
}
@@ -187,13 +187,13 @@ TEST_CASE("extract test functions for std::optional") {
CHECK_EQ(*v, c);
}
for (const std::string& s : {"aa", "xxx", ""}) {
for (const std::string s : {"aa", "xxx", ""}) {
std::optional<int> v;
REQUIRE(ss::extract(s.c_str(), s.c_str() + s.size(), v));
CHECK_FALSE(v.has_value());
}
for (const std::string& s : {"aa", "xxx", ""}) {
for (const std::string s : {"aa", "xxx", ""}) {
std::optional<char> v;
REQUIRE(ss::extract(s.c_str(), s.c_str() + s.size(), v));
CHECK_FALSE(v.has_value());