diff --git a/include/ylt/struct_pack/varint.hpp b/include/ylt/struct_pack/varint.hpp index 701a127d7..d5689cc60 100644 --- a/include/ylt/struct_pack/varint.hpp +++ b/include/ylt/struct_pack/varint.hpp @@ -19,6 +19,7 @@ #include #include +#include "endian_wrapper.hpp" #include "reflection.hpp" namespace struct_pack { diff --git a/src/struct_pack/tests/test_cross_platform.cpp b/src/struct_pack/tests/test_cross_platform.cpp index a320cdf8b..0e0df1fe9 100644 --- a/src/struct_pack/tests/test_cross_platform.cpp +++ b/src/struct_pack/tests/test_cross_platform.cpp @@ -44,36 +44,4 @@ TEST_CASE("testing deserialize other platform data without debug info") { REQUIRE(result.has_value()); auto object = create_complicated_object(); CHECK(result.value() == object); -} - -TEST_CASE("testing serialize other platform data") { - std::ifstream ifs("binary_data/test_cross_platform.dat"); - if (!ifs.is_open()) { - ifs.open("src/struct_pack/tests/binary_data/test_cross_platform.dat"); - } - REQUIRE(ifs.is_open()); - std::string content(std::istreambuf_iterator{ifs}, - std::istreambuf_iterator{}); - auto object = create_complicated_object(); - auto buffer = - struct_pack::serialize(object); - CHECK(buffer == content); -} - -TEST_CASE("testing serialize other platform data") { - std::ifstream ifs("binary_data/test_cross_platform_without_debug_info.dat"); - if (!ifs.is_open()) { - ifs.open( - "src/struct_pack/tests/binary_data/" - "test_cross_platform_without_debug_info.dat"); - } - REQUIRE(ifs.is_open()); - std::string content(std::istreambuf_iterator{ifs}, - std::istreambuf_iterator{}); - auto object = create_complicated_object(); - auto buffer = - struct_pack::serialize(object); - CHECK(buffer == content); } \ No newline at end of file