diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2014-12-19 16:49:00 -0500 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2015-01-02 15:12:03 -0500 |
commit | 9b1ab860ff00180142d9e514f3e1b6a91c86df7a (patch) | |
tree | 0969c46196f6a32d2577e921b0bbc1315e5f4cf0 /src/test | |
parent | a3241998e1e300e87e7c57d92c2478f67ec91db6 (diff) |
namespace: drop boost::assign altogether here
Standard functions are even simpler
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/multisig_tests.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
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) { |