From dc287c98f8b33576f3c71db02a232106ef0e57d9 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 7 Sep 2018 08:20:26 -0400 Subject: Squashed 'src/univalue/' changes from 51d3ab34ba..7890db99d6 7890db99d6 Merge #11: Remove deprecated std pair wrappers 40e34852ac Merge #14: Cleaned up namespace imports to reduce symbol collisions 85052a4819 Remove deprecated std::pair wrappers d208f986dd Cleaned up namespace imports to reduce symbol collisions git-subtree-dir: src/univalue git-subtree-split: 7890db99d693572d27ade3e14268bd7236134529 --- test/unitester.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'test/unitester.cpp') diff --git a/test/unitester.cpp b/test/unitester.cpp index 2c37794a4b..75c0dc225a 100644 --- a/test/unitester.cpp +++ b/test/unitester.cpp @@ -17,8 +17,7 @@ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) #endif -using namespace std; -string srcdir(JSON_TEST_SRC); +std::string srcdir(JSON_TEST_SRC); static bool test_failed = false; #define d_assert(expr) { if (!(expr)) { test_failed = true; fprintf(stderr, "%s failed\n", filename.c_str()); } } @@ -30,9 +29,9 @@ static std::string rtrim(std::string s) return s; } -static void runtest(string filename, const string& jdata) +static void runtest(std::string filename, const std::string& jdata) { - string prefix = filename.substr(0, 4); + std::string prefix = filename.substr(0, 4); bool wantPass = (prefix == "pass") || (prefix == "roun"); bool wantFail = (prefix == "fail"); @@ -56,19 +55,19 @@ static void runtest(string filename, const string& jdata) static void runtest_file(const char *filename_) { - string basename(filename_); - string filename = srcdir + "/" + basename; + std::string basename(filename_); + std::string filename = srcdir + "/" + basename; FILE *f = fopen(filename.c_str(), "r"); assert(f != NULL); - string jdata; + std::string jdata; char buf[4096]; while (!feof(f)) { int bread = fread(buf, 1, sizeof(buf), f); assert(!ferror(f)); - string s(buf, bread); + std::string s(buf, bread); jdata += s; } -- cgit v1.2.3