diff options
| author | 0xFFFC0000 <0xFFFC0000@proton.me> | 2024-04-30 23:20:10 +0000 |
|---|---|---|
| committer | 0xFFFC0000 <0xFFFC0000@proton.me> | 2024-05-01 02:51:08 +0330 |
| commit | 755dddd2bc9a74fe7f2a61fc49af2a98ca4e82ee (patch) | |
| tree | a63795f5e8b55a70333d12649343adcb574a20a2 /tests/unit_tests | |
| parent | 81d4db08eb75ce5392c65ca6571e7b08e41b7c95 (diff) | |
| download | monzero-core-755dddd2bc9a74fe7f2a61fc49af2a98ca4e82ee.tar.gz monzero-core-755dddd2bc9a74fe7f2a61fc49af2a98ca4e82ee.tar.xz monzero-core-755dddd2bc9a74fe7f2a61fc49af2a98ca4e82ee.zip | |
common: support boost filesystem copy_options.
Co-authored-by: selsta <selsta@sent.at>
Diffstat (limited to 'tests/unit_tests')
| -rw-r--r-- | tests/unit_tests/wallet_storage.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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")); |
