diff --git a/test/src/unit-ubjson.cpp b/test/src/unit-ubjson.cpp index 7e1ffefc..b7daa1a1 100644 --- a/test/src/unit-ubjson.cpp +++ b/test/src/unit-ubjson.cpp @@ -88,7 +88,7 @@ TEST_CASE("UBJSON") SECTION("-9223372036854775808..-2147483649 (int64)") { std::vector numbers; - numbers.push_back(INT64_MIN); + numbers.push_back((std::numeric_limits::min)()); numbers.push_back(-1000000000000000000); numbers.push_back(-100000000000000000); numbers.push_back(-10000000000000000); @@ -128,14 +128,14 @@ TEST_CASE("UBJSON") // check individual bytes CHECK(result[0] == 'L'); - uint64_t restored = (static_cast(result[1]) << 070) + - (static_cast(result[2]) << 060) + - (static_cast(result[3]) << 050) + - (static_cast(result[4]) << 040) + - (static_cast(result[5]) << 030) + - (static_cast(result[6]) << 020) + - (static_cast(result[7]) << 010) + - static_cast(result[8]); + int64_t restored = (static_cast(result[1]) << 070) + + (static_cast(result[2]) << 060) + + (static_cast(result[3]) << 050) + + (static_cast(result[4]) << 040) + + (static_cast(result[5]) << 030) + + (static_cast(result[6]) << 020) + + (static_cast(result[7]) << 010) + + static_cast(result[8]); CHECK(restored == i); // roundtrip @@ -145,7 +145,7 @@ TEST_CASE("UBJSON") SECTION("-2147483648..-32769 (int32)") { - std::vector numbers; + std::vector numbers; numbers.push_back(-32769); numbers.push_back(-100000); numbers.push_back(-1000000);