diff --git a/tests/src/unit-file_input.cpp b/tests/src/unit-file_input.cpp index eaa378aa8..c3e587e74 100644 --- a/tests/src/unit-file_input.cpp +++ b/tests/src/unit-file_input.cpp @@ -226,7 +226,7 @@ TEST_CASE("parsing from a FILE*") { const json j = {{"string", std::string(300, 'x')}, {"array", {1, 2, 3}}, {"number", 1.5}}; const std::vector cbor = json::to_cbor(j); - const file_ptr f = open_with(name, std::string(cbor.begin(), cbor.end())); + const file_ptr f = open_with(name, std::string(reinterpret_cast(cbor.data()), cbor.size())); REQUIRE(f != nullptr); CHECK(json::from_cbor(f.get()) == j); check_unlocked(f.get()); diff --git a/tests/src/unit-stream-bulk-scan.cpp b/tests/src/unit-stream-bulk-scan.cpp index f46c4351f..b5b6ded15 100644 --- a/tests/src/unit-stream-bulk-scan.cpp +++ b/tests/src/unit-stream-bulk-scan.cpp @@ -371,7 +371,7 @@ TEST_CASE("parsing from a std::istream scans the get area in bulk") { const json j = {{"string", std::string(300, 'x')}, {"array", {1, 2, 3}}, {"number", 1.5}}; const std::vector cbor = json::to_cbor(j); - const std::string bytes(cbor.begin(), cbor.end()); + const std::string bytes(reinterpret_cast(cbor.data()), cbor.size()); for (const std::size_t chunk_size : chunk_sizes()) { CAPTURE(chunk_size)