mirror of
https://github.com/nlohmann/json.git
synced 2026-10-16 19:18:12 +00:00
Fix the tests for disabled implicit conversions and strict NUL handling
- unit-iterators1 (#5835) converted a json element to int implicitly, which does not compile with JSON_USE_IMPLICIT_CONVERSIONS=0. - unit-testsuites parses a number followed by a NUL byte, which JSON_STRICT_NUL_HANDLING rejects; leave the NUL out in strict mode. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -1661,7 +1661,7 @@ TEST_CASE_TEMPLATE("reverse iteration and member access", Json, nlohmann::json,
|
||||
seen.clear();
|
||||
for (auto r = j.crbegin(); r != j.crend(); ++r)
|
||||
{
|
||||
seen.push_back(*r);
|
||||
seen.push_back(r->template get<int>());
|
||||
}
|
||||
CHECK(seen == std::vector<int> {4, 3, 2, 1});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user