Fix test lints that are red on develop (effc++, clang-tidy) (#5946)
- unit-bson: initialize the SAX recorder's member (-Weffc++) - unit-json_patch: build the reference document independently instead of copying it (performance-unnecessary-copy-initialization) - unit-json_view_builder: use node_kind::link instead of an out-of-range enum cast (clang-analyzer-optin.core.EnumCastOutOfRange) Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 parent
eb8f675bc9
commit
8617d9c94c
3 files changed
+11
-6
No files matched your search
@@ -592,7 +592,7 @@ TEST_CASE("json_view node integer bits")
|
||||
})
|
||||
{
|
||||
CAPTURE(v)
|
||||
n.kind = static_cast<nlohmann::detail::view::node_kind>(0x5A);
|
||||
n.kind = nlohmann::detail::view::node_kind::link;
|
||||
n.flags = 0xA5;
|
||||
n.extra = 0x1234;
|
||||
n.off = 0x89ABCDEFu;
|
||||
@@ -601,7 +601,7 @@ TEST_CASE("json_view node integer bits")
|
||||
CHECK(n.len == static_cast<std::uint32_t>(v));
|
||||
CHECK(n.next == static_cast<std::uint32_t>(v >> 32));
|
||||
// the other fields are untouched
|
||||
CHECK(static_cast<std::uint8_t>(n.kind) == 0x5A);
|
||||
CHECK(n.kind == nlohmann::detail::view::node_kind::link);
|
||||
CHECK(n.flags == 0xA5);
|
||||
CHECK(n.extra == 0x1234);
|
||||
CHECK(n.off == 0x89ABCDEFu);
|
||||
|
||||
Reference in new issue
Block a user