lint and amalgamate
This commit is contained in:
parent
fb86e6da29
commit
584252083a
@ -399,7 +399,7 @@ class input_adapter
|
||||
/// input adapter for array
|
||||
template<class T, std::size_t N>
|
||||
input_adapter(T (&array)[N])
|
||||
: input_adapter(std::begin(array), (N > 0 && array[N - 1]) == 0 ? std::prev(std::end(array)) : std::end(array)) {}
|
||||
: input_adapter(std::begin(array), (N > 0 && array[N - 1] == 0) ? std::prev(std::end(array)) : std::end(array)) {}
|
||||
|
||||
/// input adapter for contiguous container
|
||||
template<class ContiguousContainer, typename
|
||||
|
||||
@ -2554,7 +2554,7 @@ class input_adapter
|
||||
/// input adapter for array
|
||||
template<class T, std::size_t N>
|
||||
input_adapter(T (&array)[N])
|
||||
: input_adapter(std::begin(array), (N > 0 && array[N - 1]) == 0 ? std::prev(std::end(array)) : std::end(array)) {}
|
||||
: input_adapter(std::begin(array), (N > 0 && array[N - 1] == 0) ? std::prev(std::end(array)) : std::end(array)) {}
|
||||
|
||||
/// input adapter for contiguous container
|
||||
template<class ContiguousContainer, typename
|
||||
|
||||
@ -1634,7 +1634,7 @@ TEST_CASE("parser class")
|
||||
CHECK(j == json(true));
|
||||
|
||||
CHECK_THROWS_WITH(json::parser(nlohmann::detail::input_adapter(std::begin(v), std::end(v))).parse(true, j),
|
||||
"[json.exception.parse_error.101] parse error at line 1, column 5: syntax error while parsing value - invalid literal; last read: 'true<U+0000>'; expected end of input");
|
||||
"[json.exception.parse_error.101] parse error at line 1, column 5: syntax error while parsing value - invalid literal; last read: 'true<U+0000>'; expected end of input");
|
||||
}
|
||||
|
||||
SECTION("from array")
|
||||
@ -1650,7 +1650,7 @@ TEST_CASE("parser class")
|
||||
uint8_t v[] = {};
|
||||
json j;
|
||||
CHECK_THROWS_WITH(json::parser(nlohmann::detail::input_adapter(v)).parse(true, j),
|
||||
"[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal");
|
||||
"[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user