diff options
| author | Jeff Garzik <[email protected]> | 2014-08-20 15:15:16 -0400 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2015-06-04 09:16:05 +0200 |
| commit | 15982a8b69ec6ab3c3a6bf71fc6a9b681d3ff541 (patch) | |
| tree | 854a48a039d4199dbc1acf33ef94d06d007f1348 /src/test/sighash_tests.cpp | |
| parent | UniValue: export NullUniValue global constant (diff) | |
| download | discoin-15982a8b69ec6ab3c3a6bf71fc6a9b681d3ff541.tar.xz discoin-15982a8b69ec6ab3c3a6bf71fc6a9b681d3ff541.zip | |
Convert tree to using univalue. Eliminate all json_spirit uses.
Diffstat (limited to 'src/test/sighash_tests.cpp')
| -rw-r--r-- | src/test/sighash_tests.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp index 87be2217c..121644ddc 100644 --- a/src/test/sighash_tests.cpp +++ b/src/test/sighash_tests.cpp @@ -16,9 +16,7 @@ #include <iostream> #include <boost/test/unit_test.hpp> -#include "json/json_spirit_reader_template.h" -#include "json/json_spirit_utils.h" -#include "json/json_spirit_writer_template.h" +#include "json_spirit_wrapper.h" using namespace json_spirit; extern Array read_json(const std::string& jsondata); @@ -170,10 +168,9 @@ BOOST_AUTO_TEST_CASE(sighash_from_data) { Array tests = read_json(std::string(json_tests::sighash, json_tests::sighash + sizeof(json_tests::sighash))); - BOOST_FOREACH(Value& tv, tests) - { - Array test = tv.get_array(); - std::string strTest = write_string(tv, false); + for (unsigned int idx = 0; idx < tests.size(); idx++) { + Array test = tests[idx]; + std::string strTest = test.write(); if (test.size() < 1) // Allow for extra stuff (useful for comments) { BOOST_ERROR("Bad test: " << strTest); |