diff --git a/src/struct_pack/tests/test_cross_platform.cpp b/src/struct_pack/tests/test_cross_platform.cpp index 3c679888a..d59760ee0 100644 --- a/src/struct_pack/tests/test_cross_platform.cpp +++ b/src/struct_pack/tests/test_cross_platform.cpp @@ -9,6 +9,9 @@ using namespace doctest; TEST_CASE("testing deserialize 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()); auto result = struct_pack::deserialize(ifs); REQUIRE(result.has_value()); @@ -18,6 +21,11 @@ TEST_CASE("testing deserialize other platform data") { TEST_CASE("testing deserialize other platform data without debug info") { 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()); auto result = struct_pack::deserialize(ifs); REQUIRE(result.has_value());