From c84e0e83ba9ba556bd66ae50d6e4eb6a6b243bab Mon Sep 17 00:00:00 2001 From: warrows Date: Mon, 20 May 2019 16:47:23 +0200 Subject: [PATCH] [Code Style] Remove std namespace in test file --- src/test/addrman_tests.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 089c25df5b731..203887ad0eb4d 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -10,8 +10,6 @@ #include "hash.h" #include "random.h" -using namespace std; - class CAddrManTest : public CAddrMan { uint64_t state; @@ -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. @@ -387,7 +385,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr) if (i % 8 == 0) addrman.Good(addr); } - vector vAddr = addrman.GetAddr(); + std::vector vAddr = addrman.GetAddr(); size_t percent23 = (addrman.size() * 23) / 100; BOOST_CHECK(vAddr.size() == percent23); @@ -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 buckets; + std::set buckets; for (int i = 0; i < 255; i++) { CAddrInfo infoi = CAddrInfo( CAddress(CService("250.1.1." + boost::to_string(i))), @@ -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 buckets; + std::set buckets; for (int i = 0; i < 255; i++) { CAddrInfo infoi = CAddrInfo( CAddress(CService("250.1.1." + boost::to_string(i))),