Skip to content

Commit 82f9088

Browse files
committed
Refactor: Remove using namespace <xxx> from /dbwrapper_tests
backports (partially) bitcoin/bitcoin@73f4119
1 parent 6db0b37 commit 82f9088

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/test/dbwrapper_tests.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
#include <boost/assert.hpp>
1212
#include <boost/test/unit_test.hpp>
1313

14-
using namespace std;
15-
using namespace boost::assign; // bring 'operator+=()' into scope
16-
using namespace boost::filesystem;
1714

1815
// Test if a string consists entirely of null characters
19-
bool is_null_key(const vector<unsigned char>& key) {
16+
bool is_null_key(const std::vector<unsigned char>& key) {
2017
bool isnull = true;
2118

2219
for (unsigned int i = 0; i < key.size(); i++)
@@ -30,7 +27,7 @@ BOOST_FIXTURE_TEST_SUITE(dbwrapper_tests, BasicTestingSetup)
3027
BOOST_AUTO_TEST_CASE(dbwrapper)
3128
{
3229
{
33-
path ph = temp_directory_path() / unique_path();
30+
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
3431
CDBWrapper dbw(ph, (1 << 20), true, false);
3532
char key = 'k';
3633
uint256 in = GetRandHash();
@@ -46,7 +43,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
4643
BOOST_AUTO_TEST_CASE(dbwrapper_batch)
4744
{
4845
{
49-
path ph = temp_directory_path() / unique_path();
46+
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
5047
CDBWrapper dbw(ph, (1 << 20), true, false);
5148

5249
char key = 'i';
@@ -81,7 +78,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_batch)
8178
BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
8279
{
8380
{
84-
path ph = temp_directory_path() / unique_path();
81+
boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
8582
CDBWrapper dbw(ph, (1 << 20), true, false);
8683

8784
// The two keys are intentionally chosen for ordering

0 commit comments

Comments
 (0)