diff --git a/tests/src/unit-bjdata.cpp b/tests/src/unit-bjdata.cpp index db0663d52..4a34125ba 100644 --- a/tests/src/unit-bjdata.cpp +++ b/tests/src/unit-bjdata.cpp @@ -4637,7 +4637,7 @@ TEST_CASE("BJData optimized container type marker is validated for count 0") {'[', '{' }) { - for (const std::uint8_t count : + for (const int count : { 0, 1 }) @@ -4645,7 +4645,7 @@ TEST_CASE("BJData optimized container type marker is validated for count 0") CAPTURE(marker) CAPTURE(open) CAPTURE(count) - const std::vector v = {static_cast(open), '$', static_cast(marker), '#', 'i', count}; + const std::vector v = {static_cast(open), '$', static_cast(marker), '#', 'i', static_cast(count)}; json _; CHECK_THROWS_AS(_ = json::from_bjdata(v), json::parse_error&); CHECK(json::from_bjdata(v, true, false).is_discarded()); diff --git a/tests/src/unit-ubjson.cpp b/tests/src/unit-ubjson.cpp index 8f6c42810..5c6378216 100644 --- a/tests/src/unit-ubjson.cpp +++ b/tests/src/unit-ubjson.cpp @@ -3362,7 +3362,7 @@ TEST_CASE("UBJSON optimized container type marker is validated for count 0") {'[', '{' }) { - for (const std::uint8_t count : + for (const int count : { 0, 1 }) @@ -3370,7 +3370,7 @@ TEST_CASE("UBJSON optimized container type marker is validated for count 0") CAPTURE(marker) CAPTURE(open) CAPTURE(count) - const std::vector v = {static_cast(open), '$', static_cast(marker), '#', 'i', count}; + const std::vector v = {static_cast(open), '$', static_cast(marker), '#', 'i', static_cast(count)}; json _; CHECK_THROWS_AS(_ = json::from_ubjson(v), json::parse_error&); CHECK(json::from_ubjson(v, true, false).is_discarded());