🚨 fix warnings

This commit is contained in:
Niels Lohmann 2021-09-04 22:59:43 +02:00
parent f16465c614
commit 78e59f502b
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -214,7 +214,8 @@ TEST_CASE("BON8")
SECTION("-2147483649")
{
json j = -2147483649L;
// cannot use -2147483649 directly, see https://developercommunity.visualstudio.com/t/-2147483648-c4146-error/141813#T-N229960
json j = -2147483648 - 1;
std::vector<uint8_t> expected = {0x8D, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF};
const auto result = json::to_bon8(j);
CHECK(result == expected);
@ -225,7 +226,8 @@ TEST_CASE("BON8")
{
SECTION("-2147483648")
{
json j = -2147483648L;
// cannot use -2147483648 directly, see https://developercommunity.visualstudio.com/t/-2147483648-c4146-error/141813#T-N229960
json j = -2147483647 - 1;
std::vector<uint8_t> expected = {0x8C, 0x80, 0x00, 0x00, 0x00};
const auto result = json::to_bon8(j);
CHECK(result == expected);