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:
Niels Lohmann committed 2026-10-16 09:05:09 +02:00
1 parent e5b8f453e5
commit a249c51b55
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -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});
}