File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 15
15
#include < vector>
16
16
17
17
namespace power_grid_model_cpp {
18
-
19
18
namespace {
20
-
21
19
using namespace std ::string_literals;
22
20
23
21
constexpr char const * json_data =
@@ -83,7 +81,9 @@ TEST_CASE("API Serialization and Deserialization") {
83
81
SUBCASE (" Round trip" ) {
84
82
std::vector<std::byte> msgpack_data{};
85
83
msgpack_serializer.get_to_binary_buffer (0 , msgpack_data);
86
- auto const json_document = nlohmann::ordered_json::from_msgpack (msgpack_data);
84
+ auto const char_start = reinterpret_cast <unsigned char const *>(msgpack_data.data ());
85
+ auto const char_end = char_start + msgpack_data.size ();
86
+ auto const json_document = nlohmann::ordered_json::from_msgpack (char_start, char_end);
87
87
auto const json_result = json_document.dump (-1 );
88
88
CHECK (json_result == json_data);
89
89
}
You can’t perform that action at this time.
0 commit comments