From 755dddd2bc9a74fe7f2a61fc49af2a98ca4e82ee Mon Sep 17 00:00:00 2001 From: 0xFFFC0000 <0xFFFC0000@proton.me> Date: Tue, 30 Apr 2024 23:20:10 +0000 Subject: common: support boost filesystem copy_options. Co-authored-by: selsta --- tests/unit_tests/wallet_storage.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/unit_tests/wallet_storage.cpp') diff --git a/tests/unit_tests/wallet_storage.cpp b/tests/unit_tests/wallet_storage.cpp index dacaff960..bf33936ed 100644 --- a/tests/unit_tests/wallet_storage.cpp +++ b/tests/unit_tests/wallet_storage.cpp @@ -31,6 +31,7 @@ #include "file_io_utils.h" #include "wallet/wallet2.h" +#include "common/util.h" using namespace boost::filesystem; using namespace epee::file_io_utils; @@ -47,8 +48,8 @@ TEST(wallet_storage, store_to_file2file) ASSERT_TRUE(is_file_exist(source_wallet_file.string())); ASSERT_TRUE(is_file_exist(source_wallet_file.string() + ".keys")); - copy_file(source_wallet_file, interm_wallet_file, copy_option::overwrite_if_exists); - copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys", copy_option::overwrite_if_exists); + tools::copy_file(source_wallet_file.string(), interm_wallet_file.string()); + tools::copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys"); ASSERT_TRUE(is_file_exist(interm_wallet_file.string())); ASSERT_TRUE(is_file_exist(interm_wallet_file.string() + ".keys")); @@ -138,8 +139,8 @@ TEST(wallet_storage, change_password_same_file) ASSERT_TRUE(is_file_exist(source_wallet_file.string())); ASSERT_TRUE(is_file_exist(source_wallet_file.string() + ".keys")); - copy_file(source_wallet_file, interm_wallet_file, copy_option::overwrite_if_exists); - copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys", copy_option::overwrite_if_exists); + tools::copy_file(source_wallet_file.string(), interm_wallet_file.string()); + tools::copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys"); ASSERT_TRUE(is_file_exist(interm_wallet_file.string())); ASSERT_TRUE(is_file_exist(interm_wallet_file.string() + ".keys")); @@ -177,8 +178,8 @@ TEST(wallet_storage, change_password_different_file) ASSERT_TRUE(is_file_exist(source_wallet_file.string())); ASSERT_TRUE(is_file_exist(source_wallet_file.string() + ".keys")); - copy_file(source_wallet_file, interm_wallet_file, copy_option::overwrite_if_exists); - copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys", copy_option::overwrite_if_exists); + tools::copy_file(source_wallet_file.string(), interm_wallet_file.string()); + tools::copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys"); ASSERT_TRUE(is_file_exist(interm_wallet_file.string())); ASSERT_TRUE(is_file_exist(interm_wallet_file.string() + ".keys")); -- cgit v1.2.3