lint and amalgamate

This commit is contained in:
Francois Chabot 2019-01-22 17:23:29 -05:00
parent fb86e6da29
commit 584252083a
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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");
}