diff options
author | Zachary Michaels <mikezackles@gmail.com> | 2014-09-09 10:58:53 -0400 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-09-15 15:54:59 +0200 |
commit | d03308734b1487540af062ab50c94cc7bb3e668e (patch) | |
tree | 59b26c94f7449bb6e57a9c4c7a0ec3983c1d2feb /tests/unit_tests | |
parent | Add testnet seed nodes (diff) | |
download | monero-d03308734b1487540af062ab50c94cc7bb3e668e.tar.xz |
Separate testnet address prefix
Diffstat (limited to 'tests/unit_tests')
-rw-r--r-- | tests/unit_tests/base58.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit_tests/base58.cpp b/tests/unit_tests/base58.cpp index f61bb1b96..28fb27f25 100644 --- a/tests/unit_tests/base58.cpp +++ b/tests/unit_tests/base58.cpp @@ -473,14 +473,14 @@ TEST(get_account_address_as_str, works_correctly) { cryptonote::account_public_address addr; ASSERT_TRUE(serialization::parse_binary(test_serialized_keys, addr)); - std::string addr_str = cryptonote::get_account_address_as_str(addr); + std::string addr_str = cryptonote::get_account_address_as_str(false, addr); ASSERT_EQ(addr_str, test_keys_addr_str); } TEST(get_account_address_from_str, handles_valid_address) { cryptonote::account_public_address addr; - ASSERT_TRUE(cryptonote::get_account_address_from_str(addr, test_keys_addr_str)); + ASSERT_TRUE(cryptonote::get_account_address_from_str(addr, false, test_keys_addr_str)); std::string blob; ASSERT_TRUE(serialization::dump_binary(addr, blob)); @@ -493,7 +493,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_format) std::string addr_str = test_keys_addr_str; addr_str[0] = '0'; - ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, addr_str)); + ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, false, addr_str)); } TEST(get_account_address_from_str, fails_on_invalid_address_prefix) @@ -501,7 +501,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_prefix) std::string addr_str = base58::encode_addr(0, test_serialized_keys); cryptonote::account_public_address addr; - ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, addr_str)); + ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, false, addr_str)); } TEST(get_account_address_from_str, fails_on_invalid_address_content) @@ -509,7 +509,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_content) std::string addr_str = base58::encode_addr(config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX, test_serialized_keys.substr(1)); cryptonote::account_public_address addr; - ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, addr_str)); + ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, false, addr_str)); } TEST(get_account_address_from_str, fails_on_invalid_address_spend_key) @@ -519,7 +519,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_spend_key) std::string addr_str = base58::encode_addr(config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX, serialized_keys_copy); cryptonote::account_public_address addr; - ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, addr_str)); + ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, false, addr_str)); } TEST(get_account_address_from_str, fails_on_invalid_address_view_key) @@ -529,11 +529,11 @@ TEST(get_account_address_from_str, fails_on_invalid_address_view_key) std::string addr_str = base58::encode_addr(config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX, serialized_keys_copy); cryptonote::account_public_address addr; - ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, addr_str)); + ASSERT_FALSE(cryptonote::get_account_address_from_str(addr, false, addr_str)); } TEST(get_account_address_from_str, parses_old_address_format) { cryptonote::account_public_address addr; - ASSERT_TRUE(cryptonote::get_account_address_from_str(addr, "002391bbbb24dea6fd95232e97594a27769d0153d053d2102b789c498f57a2b00b69cd6f2f5c529c1660f2f4a2b50178d6640c20ce71fe26373041af97c5b10236fc")); + ASSERT_TRUE(cryptonote::get_account_address_from_str(addr, false, "002391bbbb24dea6fd95232e97594a27769d0153d053d2102b789c498f57a2b00b69cd6f2f5c529c1660f2f4a2b50178d6640c20ce71fe26373041af97c5b10236fc")); } |