|
|
@ -19,7 +19,7 @@ BOOST_AUTO_TEST_CASE(base58_EncodeBase58) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Array test = tv.get_array(); |
|
|
|
Array test = tv.get_array(); |
|
|
|
std::string strTest = write_string(tv, false); |
|
|
|
std::string strTest = write_string(tv, raw_utf8); |
|
|
|
if (test.size() < 2) // Allow for extra stuff (useful for comments)
|
|
|
|
if (test.size() < 2) // Allow for extra stuff (useful for comments)
|
|
|
|
{ |
|
|
|
{ |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE(base58_DecodeBase58) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Array test = tv.get_array(); |
|
|
|
Array test = tv.get_array(); |
|
|
|
std::string strTest = write_string(tv, false); |
|
|
|
std::string strTest = write_string(tv, raw_utf8); |
|
|
|
if (test.size() < 2) // Allow for extra stuff (useful for comments)
|
|
|
|
if (test.size() < 2) // Allow for extra stuff (useful for comments)
|
|
|
|
{ |
|
|
|
{ |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Array test = tv.get_array(); |
|
|
|
Array test = tv.get_array(); |
|
|
|
std::string strTest = write_string(tv, false); |
|
|
|
std::string strTest = write_string(tv, raw_utf8); |
|
|
|
if (test.size() < 3) // Allow for extra stuff (useful for comments)
|
|
|
|
if (test.size() < 3) // Allow for extra stuff (useful for comments)
|
|
|
|
{ |
|
|
|
{ |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Array test = tv.get_array(); |
|
|
|
Array test = tv.get_array(); |
|
|
|
std::string strTest = write_string(tv, false); |
|
|
|
std::string strTest = write_string(tv, raw_utf8); |
|
|
|
if (test.size() < 3) // Allow for extra stuff (useful for comments)
|
|
|
|
if (test.size() < 3) // Allow for extra stuff (useful for comments)
|
|
|
|
{ |
|
|
|
{ |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
@ -240,7 +240,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_invalid) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
BOOST_FOREACH(Value& tv, tests) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Array test = tv.get_array(); |
|
|
|
Array test = tv.get_array(); |
|
|
|
std::string strTest = write_string(tv, false); |
|
|
|
std::string strTest = write_string(tv, raw_utf8); |
|
|
|
if (test.size() < 1) // Allow for extra stuff (useful for comments)
|
|
|
|
if (test.size() < 1) // Allow for extra stuff (useful for comments)
|
|
|
|
{ |
|
|
|
{ |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
|
BOOST_ERROR("Bad test: " << strTest); |
|
|
|