🚨 fix warnings
This commit is contained in:
parent
a1e116f015
commit
b1e3165712
@ -2084,6 +2084,7 @@ class binary_writer
|
|||||||
case input_format_t::bson:
|
case input_format_t::bson:
|
||||||
case input_format_t::json:
|
case input_format_t::json:
|
||||||
case input_format_t::ubjson:
|
case input_format_t::ubjson:
|
||||||
|
case input_format_t::bjdata:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
// LCOV_EXCL_STOP
|
// LCOV_EXCL_STOP
|
||||||
|
|||||||
@ -303,7 +303,7 @@ TEST_CASE("BON8")
|
|||||||
SECTION("-2147483649")
|
SECTION("-2147483649")
|
||||||
{
|
{
|
||||||
// cannot use -2147483649 directly, see https://developercommunity.visualstudio.com/t/-2147483648-c4146-error/141813#T-N229960
|
// cannot use -2147483649 directly, see https://developercommunity.visualstudio.com/t/-2147483648-c4146-error/141813#T-N229960
|
||||||
json j = std::int64_t(-2147483647) - 2;
|
json j = static_cast<std::int64_t>(-2147483647) - 2;
|
||||||
std::vector<uint8_t> expected = {0x8D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF};
|
std::vector<uint8_t> expected = {0x8D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF};
|
||||||
const auto result = json::to_bon8(j);
|
const auto result = json::to_bon8(j);
|
||||||
CHECK(result == expected);
|
CHECK(result == expected);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user