File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,11 @@ TEST_CASE("API Serialization and Deserialization") {
81
81
Serializer msgpack_serializer{dataset, 1 };
82
82
83
83
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 ()};
85
87
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 );
87
89
auto const json_result = json_document.dump (-1 );
88
90
CHECK (json_result == json_data);
89
91
}
You can’t perform that action at this time.
0 commit comments