diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-05-13 21:29:19 +0200 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-06-04 09:16:06 +0200 |
commit | 3df0411ad9fd75fb27af53e44835d41f5480fe3f (patch) | |
tree | 99e1a50e6b36e69c4429129d87567890b5878b3c /src/test/transaction_tests.cpp | |
parent | 1f263c899ee0756ed9ed133f35bec18bdef20cdc (diff) |
remove JSON Spirit UniValue wrapper
Diffstat (limited to 'src/test/transaction_tests.cpp')
-rw-r--r-- | src/test/transaction_tests.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 0ddc48271b..afd2d74013 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -30,7 +30,7 @@ using namespace std; using namespace json_spirit; // In script_tests.cpp -extern Array read_json(const std::string& jsondata); +extern UniValue read_json(const std::string& jsondata); static std::map<string, unsigned int> mapFlagNames = boost::assign::map_list_of (string("NONE"), (unsigned int)SCRIPT_VERIFY_NONE) @@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(tx_valid) // ... where all scripts are stringified scripts. // // verifyFlags is a comma separated list of script verification flags to apply, or "NONE" - Array tests = read_json(std::string(json_tests::tx_valid, json_tests::tx_valid + sizeof(json_tests::tx_valid))); + UniValue tests = read_json(std::string(json_tests::tx_valid, json_tests::tx_valid + sizeof(json_tests::tx_valid))); <<<<<<< HEAD ScriptError err; @@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(tx_valid) if (test[0].type() == array_type) ======= for (unsigned int idx = 0; idx < tests.size(); idx++) { - Array test = tests[idx]; + UniValue test = tests[idx]; string strTest = test.write(); if (test[0].isArray()) >>>>>>> Convert tree to using univalue. Eliminate all json_spirit uses. @@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(tx_valid) } map<COutPoint, CScript> mapprevOutScriptPubKeys; - Array inputs = test[0].get_array(); + UniValue inputs = test[0].get_array(); bool fValid = true; for (unsigned int inpIdx = 0; inpIdx < inputs.size(); inpIdx++) { const Value& input = inputs[inpIdx]; @@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(tx_valid) fValid = false; break; } - Array vinput = input.get_array(); + UniValue vinput = input.get_array(); if (vinput.size() != 3) { fValid = false; @@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid) // ... where all scripts are stringified scripts. // // verifyFlags is a comma separated list of script verification flags to apply, or "NONE" - Array tests = read_json(std::string(json_tests::tx_invalid, json_tests::tx_invalid + sizeof(json_tests::tx_invalid))); + UniValue tests = read_json(std::string(json_tests::tx_invalid, json_tests::tx_invalid + sizeof(json_tests::tx_invalid))); <<<<<<< HEAD ScriptError err; @@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid) if (test[0].type() == array_type) ======= for (unsigned int idx = 0; idx < tests.size(); idx++) { - Array test = tests[idx]; + UniValue test = tests[idx]; string strTest = test.write(); if (test[0].isArray()) >>>>>>> Convert tree to using univalue. Eliminate all json_spirit uses. @@ -196,7 +196,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid) } map<COutPoint, CScript> mapprevOutScriptPubKeys; - Array inputs = test[0].get_array(); + UniValue inputs = test[0].get_array(); bool fValid = true; for (unsigned int inpIdx = 0; inpIdx < inputs.size(); inpIdx++) { const Value& input = inputs[inpIdx]; @@ -205,7 +205,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid) fValid = false; break; } - Array vinput = input.get_array(); + UniValue vinput = input.get_array(); if (vinput.size() != 3) { fValid = false; |