Skip to content

Commit 0433f56

Browse files
committed
better fix
Signed-off-by: Santiago Figueroa Manrique <figueroa1395@gmail.com>
1 parent 3ad8265 commit 0433f56

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/native_api_tests/test_api_serialization.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ TEST_CASE("API Serialization and Deserialization") {
8181
Serializer msgpack_serializer{dataset, 1};
8282

8383
SUBCASE("Round trip") {
84-
std::vector<char> msgpack_data{};
84+
std::vector<std::byte> msgpack_data{};
85+
std::span<std::underlying_type_t<std::byte>> const msgpack_data_view{
86+
reinterpret_cast<std::underlying_type_t<std::byte>*>(msgpack_data.data()), msgpack_data.size()};
8587
msgpack_serializer.get_to_binary_buffer(0, msgpack_data);
86-
auto const json_document = nlohmann::ordered_json::from_msgpack(msgpack_data);
88+
auto const json_document = nlohmann::ordered_json::from_msgpack(msgpack_data_view);
8789
auto const json_result = json_document.dump(-1);
8890
CHECK(json_result == json_data);
8991
}

0 commit comments

Comments
 (0)