🚨 fix warnings

This commit is contained in:
Niels Lohmann 2021-12-24 14:36:40 +01:00
parent 4bf052a780
commit 6e6a82fd66
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 5 additions and 5 deletions

View File

@ -41,11 +41,11 @@ TEST_CASE("byte_container_with_subtype")
nlohmann::byte_container_with_subtype<std::vector<std::uint8_t>> container;
CHECK(!container.has_subtype());
CHECK(container.subtype() == subtype_type(-1));
CHECK(container.subtype() == static_cast<subtype_type>(-1));
container.clear_subtype();
CHECK(!container.has_subtype());
CHECK(container.subtype() == subtype_type(-1));
CHECK(container.subtype() == static_cast<subtype_type>(-1));
container.set_subtype(42);
CHECK(container.has_subtype());
@ -60,7 +60,7 @@ TEST_CASE("byte_container_with_subtype")
container.clear_subtype();
CHECK(!container.has_subtype());
CHECK(container.subtype() == subtype_type(-1));
CHECK(container.subtype() == static_cast<subtype_type>(-1));
}
SECTION("comparisons")

View File

@ -56,7 +56,7 @@ TEST_CASE("hash<nlohmann::json>")
// number
hashes.insert(std::hash<json> {}(json(0)));
hashes.insert(std::hash<json> {}(json(unsigned(0))));
hashes.insert(std::hash<json> {}(json(static_cast<unsigned>(0))));
hashes.insert(std::hash<json> {}(json(-1)));
hashes.insert(std::hash<json> {}(json(0.0)));
@ -105,7 +105,7 @@ TEST_CASE("hash<nlohmann::ordered_json>")
// number
hashes.insert(std::hash<ordered_json> {}(ordered_json(0)));
hashes.insert(std::hash<ordered_json> {}(ordered_json(unsigned(0))));
hashes.insert(std::hash<ordered_json> {}(ordered_json(static_cast<unsigned>(0))));
hashes.insert(std::hash<ordered_json> {}(ordered_json(-1)));
hashes.insert(std::hash<ordered_json> {}(ordered_json(0.0)));