aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-06-23 16:23:09 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-06-23 16:23:09 +0300
commitab61ba0c9b9e39fb73a11e4d38dc5c37e453e6c7 (patch)
treea9bf9b3b2b00bb3bf9e0bd467cc55db24255d724 /tests
parentWalletManager::findWallets: searching by "keys" files instead of (diff)
parentPendingTransactionImpl: pointer->reference (diff)
downloadmonero-ab61ba0c9b9e39fb73a11e4d38dc5c37e453e6c7.tar.xz
Merge branch 'master' of https://github.com/mbg033/bitmonero
Diffstat (limited to 'tests')
-rw-r--r--tests/libwallet_api_tests/main.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/libwallet_api_tests/main.cpp b/tests/libwallet_api_tests/main.cpp
index 471427c0c..f6f1b0832 100644
--- a/tests/libwallet_api_tests/main.cpp
+++ b/tests/libwallet_api_tests/main.cpp
@@ -62,12 +62,6 @@ const char * WALLET_LANG = "English";
const std::string WALLETS_ROOT_DIR = "/home/mbg033/dev/monero/testnet/";
-//const char * TESTNET_WALLET1_NAME = "/home/mbg033/dev/monero/testnet/wallet_01.bin";
-//const char * TESTNET_WALLET2_NAME = "/home/mbg033/dev/monero/testnet/wallet_02.bin";
-//const char * TESTNET_WALLET3_NAME = "/home/mbg033/dev/monero/testnet/wallet_03.bin";
-//const char * TESTNET_WALLET4_NAME = "/home/mbg033/dev/monero/testnet/wallet_04.bin";
-//const char * TESTNET_WALLET5_NAME = "/home/mbg033/dev/monero/testnet/wallet_05.bin";
-
const std::string TESTNET_WALLET1_NAME = WALLETS_ROOT_DIR + "wallet_01.bin";
const std::string TESTNET_WALLET2_NAME = WALLETS_ROOT_DIR + "wallet_02.bin";
const std::string TESTNET_WALLET3_NAME = WALLETS_ROOT_DIR + "wallet_03.bin";
@@ -75,7 +69,6 @@ const std::string TESTNET_WALLET4_NAME = WALLETS_ROOT_DIR + "wallet_04.bin";
const std::string TESTNET_WALLET5_NAME = WALLETS_ROOT_DIR + "wallet_05.bin";
const std::string TESTNET_WALLET6_NAME = WALLETS_ROOT_DIR + "wallet_06.bin";
-
const char * TESTNET_WALLET_PASS = "";
const std::string CURRENT_SRC_WALLET = TESTNET_WALLET1_NAME;
@@ -250,7 +243,7 @@ TEST_F(WalletManagerTest, WalletManagerChangesPassword)
ASSERT_TRUE(wallet1->setPassword(WALLET_PASS2));
ASSERT_TRUE(wmgr->closeWallet(wallet1));
Bitmonero::Wallet * wallet2 = wmgr->openWallet(WALLET_NAME, WALLET_PASS2);
- ASSERT_TRUE(wallet2->status() == Bitmonero::Wallet::Status_Ok);
+ ASSERT_TRUE(wallet2->status() == Bitmonero::Wallet::Status_Ok);quint64
ASSERT_TRUE(wallet2->seed() == seed1);
ASSERT_TRUE(wmgr->closeWallet(wallet2));
Bitmonero::Wallet * wallet3 = wmgr->openWallet(WALLET_NAME, WALLET_PASS);
@@ -362,6 +355,7 @@ TEST_F(WalletManagerTest, WalletManagerFindsWallet)
}
}
+
TEST_F(WalletManagerTest, WalletGeneratesPaymentId)
{
std::string payment_id = Bitmonero::Wallet::genPaymentId();
@@ -379,8 +373,6 @@ TEST_F(WalletManagerTest, WalletGeneratesIntegratedAddress)
}
-
-
TEST_F(WalletTest1, WalletShowsBalance)
{
// TODO: temporary disabled;
@@ -459,8 +451,8 @@ TEST_F(WalletTest1, WalletTransactionWithMixin)
mixins.push_back(7); mixins.push_back(8); mixins.push_back(9); mixins.push_back(10); mixins.push_back(15);
mixins.push_back(20); mixins.push_back(25);
- std::string payment_id = "";
+ std::string payment_id = "";
Bitmonero::Wallet * wallet1 = wmgr->openWallet(CURRENT_SRC_WALLET, TESTNET_WALLET_PASS, true);
@@ -527,9 +519,11 @@ TEST_F(WalletTest1, WalletTransactionAndHistory)
std::string wallet4_addr = Utils::get_wallet_address(CURRENT_DST_WALLET, TESTNET_WALLET_PASS);
+
Bitmonero::PendingTransaction * tx = wallet_src->createTransaction(wallet4_addr,
PAYMENT_ID_EMPTY,
AMOUNT_10XMR * 5, 0);
+
ASSERT_TRUE(tx->status() == Bitmonero::PendingTransaction::Status_Ok);
ASSERT_TRUE(tx->commit());
history = wallet_src->history();
@@ -543,6 +537,7 @@ TEST_F(WalletTest1, WalletTransactionAndHistory)
}
}
+
TEST_F(WalletTest1, WalletTransactionWithPaymentId)
{