Skip to content

Commit

Permalink
[Code Style] Remove std namespace in test file
Browse files Browse the repository at this point in the history
  • Loading branch information
Warrows committed May 27, 2019
1 parent 3355c86 commit c84e0e8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/test/addrman_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "hash.h"
#include "random.h"

using namespace std;

class CAddrManTest : public CAddrMan
{
uint64_t state;
Expand Down Expand Up @@ -378,7 +376,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
int octet1 = i % 256;
int octet2 = (i / 256) % 256;
int octet3 = (i / (256 * 2)) % 256;
string strAddr = boost::to_string(octet1) + "." + boost::to_string(octet2) + "." + boost::to_string(octet3) + ".23";
std::string strAddr = boost::to_string(octet1) + "." + boost::to_string(octet2) + "." + boost::to_string(octet3) + ".23";
CAddress addr = CAddress(CService(strAddr));

// Ensure that for all addrs in addrman, isTerrible == false.
Expand All @@ -387,7 +385,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
if (i % 8 == 0)
addrman.Good(addr);
}
vector<CAddress> vAddr = addrman.GetAddr();
std::vector<CAddress> vAddr = addrman.GetAddr();

size_t percent23 = (addrman.size() * 23) / 100;
BOOST_CHECK(vAddr.size() == percent23);
Expand Down Expand Up @@ -429,7 +427,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_tried_bucket)
BOOST_CHECK(info1.GetKey() != info2.GetKey());
BOOST_CHECK(info1.GetTriedBucket(nKey1) != info2.GetTriedBucket(nKey1));

set<int> buckets;
std::set<int> buckets;
for (int i = 0; i < 255; i++) {
CAddrInfo infoi = CAddrInfo(
CAddress(CService("250.1.1." + boost::to_string(i))),
Expand Down Expand Up @@ -482,7 +480,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket)
BOOST_CHECK(info1.GetKey() != info2.GetKey());
BOOST_CHECK(info1.GetNewBucket(nKey1) == info2.GetNewBucket(nKey1));

set<int> buckets;
std::set<int> buckets;
for (int i = 0; i < 255; i++) {
CAddrInfo infoi = CAddrInfo(
CAddress(CService("250.1.1." + boost::to_string(i))),
Expand Down

0 comments on commit c84e0e8

Please sign in to comment.