Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Nov 23, 2023
1 parent 3d7e16a commit badc415
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/struct_pack/tests/test_serialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <variant>

#include "ylt/struct_pack/compatible.hpp"
#include "ylt/struct_pack/endian_wrapper.hpp"

#define private public
#include <ylt/struct_pack.hpp>
Expand Down Expand Up @@ -1330,9 +1331,9 @@ TEST_CASE("test width too big") {
using T = std::pair<std::string, struct_pack::compatible<int>>;
auto code = struct_pack::get_type_code<T>() + 1;
buffer.resize(4);
#ifndef TEST_IN_LITTLE_ENDIAN
code = struct_pack::detail::bswap64(code);
#endif
if constexpr (!struct_pack::detail::is_system_little_endian) {
code = struct_pack::detail::bswap64(code);
}
memcpy(buffer.data(), &code, sizeof(code));
buffer.push_back(0b11);
auto result = struct_pack::deserialize<
Expand Down

0 comments on commit badc415

Please sign in to comment.