diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-06 20:16:56 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-06 20:32:45 +0100 |
commit | 729ba317498bf644c62975dbde07da5ab9ef0043 (patch) | |
tree | 84076d547fd499ff98cffac6a9343bccfb451081 /src/test | |
parent | 3b95808428c16b2276cf1a6416d0c01ae515e81a (diff) | |
parent | 856e862f4a736fbdc38daae3b7f0fa34e1da317c (diff) |
Merge pull request #5513
856e862 namespace: drop most boost namespaces and a few header cleanups (Cory Fields)
9b1ab86 namespace: drop boost::assign altogether here (Cory Fields)
a324199 namespace: remove boost namespace pollution (Cory Fields)
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/bloom_tests.cpp | 1 | ||||
-rw-r--r-- | src/test/multisig_tests.cpp | 20 | ||||
-rw-r--r-- | src/test/script_tests.cpp | 7 | ||||
-rw-r--r-- | src/test/transaction_tests.cpp | 3 |
4 files changed, 9 insertions, 22 deletions
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp index f9cbcb0d9e..64d9909b98 100644 --- a/src/test/bloom_tests.cpp +++ b/src/test/bloom_tests.cpp @@ -20,7 +20,6 @@ #include <boost/tuple/tuple.hpp> using namespace std; -using namespace boost::tuples; BOOST_AUTO_TEST_SUITE(bloom_tests) diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp index 42a159cda2..69d8522188 100644 --- a/src/test/multisig_tests.cpp +++ b/src/test/multisig_tests.cpp @@ -15,12 +15,10 @@ #include "wallet_ismine.h" #endif -#include <boost/assign/std/vector.hpp> #include <boost/foreach.hpp> #include <boost/test/unit_test.hpp> using namespace std; -using namespace boost::assign; typedef vector<unsigned char> valtype; @@ -81,22 +79,21 @@ BOOST_AUTO_TEST_CASE(multisig_verify) CScript s; // Test a AND b: - keys.clear(); - keys += key[0],key[1]; // magic operator+= from boost.assign + keys.assign(1,key[0]); + keys.push_back(key[1]); s = sign_multisig(a_and_b, keys, txTo[0], 0); BOOST_CHECK(VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err)); BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err)); for (int i = 0; i < 4; i++) { - keys.clear(); - keys += key[i]; + keys.assign(1,key[i]); s = sign_multisig(a_and_b, keys, txTo[0], 0); BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err), strprintf("a&b 1: %d", i)); BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_INVALID_STACK_OPERATION, ScriptErrorString(err)); - keys.clear(); - keys += key[1],key[i]; + keys.assign(1,key[1]); + keys.push_back(key[i]); s = sign_multisig(a_and_b, keys, txTo[0], 0); BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err), strprintf("a&b 2: %d", i)); BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err)); @@ -105,8 +102,7 @@ BOOST_AUTO_TEST_CASE(multisig_verify) // Test a OR b: for (int i = 0; i < 4; i++) { - keys.clear(); - keys += key[i]; + keys.assign(1,key[i]); s = sign_multisig(a_or_b, keys, txTo[1], 0); if (i == 0 || i == 1) { @@ -132,8 +128,8 @@ BOOST_AUTO_TEST_CASE(multisig_verify) for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) { - keys.clear(); - keys += key[i],key[j]; + keys.assign(1,key[i]); + keys.push_back(key[j]); s = sign_multisig(escrow, keys, txTo[2], 0); if (i < j && i < 3 && j < 3) { diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 458b033131..9a7f40820a 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -23,12 +23,6 @@ #include <string> #include <vector> -#include <boost/algorithm/string/classification.hpp> -#include <boost/algorithm/string/predicate.hpp> -#include <boost/algorithm/string/replace.hpp> -#include <boost/algorithm/string/split.hpp> -#include <boost/filesystem/operations.hpp> -#include <boost/filesystem/path.hpp> #include <boost/foreach.hpp> #include <boost/test/unit_test.hpp> #include "json/json_spirit_reader_template.h" @@ -37,7 +31,6 @@ using namespace std; using namespace json_spirit; -using namespace boost::algorithm; // Uncomment if you want to output updated JSON tests. // #define UPDATE_JSON_TESTS diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index efa2af917e..bc32d504ec 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -24,7 +24,6 @@ using namespace std; using namespace json_spirit; -using namespace boost::algorithm; // In script_tests.cpp extern Array read_json(const std::string& jsondata); @@ -47,7 +46,7 @@ unsigned int ParseScriptFlags(string strFlags) } unsigned int flags = 0; vector<string> words; - split(words, strFlags, is_any_of(",")); + boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(",")); BOOST_FOREACH(string word, words) { |