diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-03-21 16:17:03 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-03-21 16:17:03 +0300 |
commit | 2cce32995b840901ce656dd8ec3fcefefff706bf (patch) | |
tree | f390d59a773bd4e89fdc0d752cb334bcb4927ccb /tests | |
parent | fixed "undefined reference" for boost::system library (diff) | |
download | monero-2cce32995b840901ce656dd8ec3fcefefff706bf.tar.xz |
wallet2::store() implemented within wallet2::store_to
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libwallet_api_tests/main.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/libwallet_api_tests/main.cpp b/tests/libwallet_api_tests/main.cpp index 9701c300c..da2624387 100644 --- a/tests/libwallet_api_tests/main.cpp +++ b/tests/libwallet_api_tests/main.cpp @@ -165,6 +165,7 @@ TEST_F(WalletManagerTest, WalletManagerStoresWallet1) ASSERT_TRUE(wmgr->closeWallet(wallet2)); } + TEST_F(WalletManagerTest, WalletManagerStoresWallet2) { Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG); @@ -181,6 +182,7 @@ TEST_F(WalletManagerTest, WalletManagerStoresWallet2) ASSERT_TRUE(wmgr->closeWallet(wallet1)); } + TEST_F(WalletManagerTest, WalletManagerStoresWallet3) { Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG); @@ -204,6 +206,29 @@ TEST_F(WalletManagerTest, WalletManagerStoresWallet3) } +TEST_F(WalletManagerTest, WalletManagerStoresWallet4) +{ + Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG); + std::string seed1 = wallet1->seed(); + std::string address1 = wallet1->address(); + + ASSERT_TRUE(wallet1->store("")); + ASSERT_TRUE(wallet1->status() == Bitmonero::Wallet::Status_Ok); + + ASSERT_TRUE(wallet1->store("")); + ASSERT_TRUE(wallet1->status() == Bitmonero::Wallet::Status_Ok); + + ASSERT_TRUE(wmgr->closeWallet(wallet1)); + + wallet1 = wmgr->openWallet(WALLET_NAME, WALLET_PASS); + ASSERT_TRUE(wallet1->status() == Bitmonero::Wallet::Status_Ok); + ASSERT_TRUE(wallet1->seed() == seed1); + ASSERT_TRUE(wallet1->address() == address1); + ASSERT_TRUE(wmgr->closeWallet(wallet1)); + +} + + int main(int argc, char** argv) { //epee::debug::get_set_enable_assert(true, false); |