mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Replace uses of boost::filesystem with fs
Step two in abstracting away boost::filesystem. To repeat this, simply run: ``` git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g' ```
This commit is contained in:
@@ -28,7 +28,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
|
||||
// Perform tests both obfuscated and non-obfuscated.
|
||||
for (int i = 0; i < 2; i++) {
|
||||
bool obfuscate = (bool)i;
|
||||
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
|
||||
fs::path ph = fs::temp_directory_path() / fs::unique_path();
|
||||
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
|
||||
char key = 'k';
|
||||
uint256 in = GetRandHash();
|
||||
@@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_batch)
|
||||
// Perform tests both obfuscated and non-obfuscated.
|
||||
for (int i = 0; i < 2; i++) {
|
||||
bool obfuscate = (bool)i;
|
||||
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
|
||||
fs::path ph = fs::temp_directory_path() / fs::unique_path();
|
||||
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
|
||||
|
||||
char key = 'i';
|
||||
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
|
||||
// Perform tests both obfuscated and non-obfuscated.
|
||||
for (int i = 0; i < 2; i++) {
|
||||
bool obfuscate = (bool)i;
|
||||
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
|
||||
fs::path ph = fs::temp_directory_path() / fs::unique_path();
|
||||
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
|
||||
|
||||
// The two keys are intentionally chosen for ordering
|
||||
@@ -125,8 +125,8 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
|
||||
// Test that we do not obfuscation if there is existing data.
|
||||
BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
|
||||
{
|
||||
// We're going to share this boost::filesystem::path between two wrappers
|
||||
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
|
||||
// We're going to share this fs::path between two wrappers
|
||||
fs::path ph = fs::temp_directory_path() / fs::unique_path();
|
||||
create_directories(ph);
|
||||
|
||||
// Set up a non-obfuscated wrapper to write some initial data.
|
||||
@@ -167,8 +167,8 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
|
||||
// Ensure that we start obfuscating during a reindex.
|
||||
BOOST_AUTO_TEST_CASE(existing_data_reindex)
|
||||
{
|
||||
// We're going to share this boost::filesystem::path between two wrappers
|
||||
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
|
||||
// We're going to share this fs::path between two wrappers
|
||||
fs::path ph = fs::temp_directory_path() / fs::unique_path();
|
||||
create_directories(ph);
|
||||
|
||||
// Set up a non-obfuscated wrapper to write some initial data.
|
||||
@@ -204,7 +204,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(iterator_ordering)
|
||||
{
|
||||
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
|
||||
fs::path ph = fs::temp_directory_path() / fs::unique_path();
|
||||
CDBWrapper dbw(ph, (1 << 20), true, false, false);
|
||||
for (int x=0x00; x<256; ++x) {
|
||||
uint8_t key = x;
|
||||
@@ -275,7 +275,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering)
|
||||
{
|
||||
char buf[10];
|
||||
|
||||
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
|
||||
fs::path ph = fs::temp_directory_path() / fs::unique_path();
|
||||
CDBWrapper dbw(ph, (1 << 20), true, false, false);
|
||||
for (int x=0x00; x<10; ++x) {
|
||||
for (int y = 0; y < 10; y++) {
|
||||
|
||||
Reference in New Issue
Block a user