diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-09-22 19:07:12 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-09-22 19:07:12 +0300 |
commit | 1f8a70c03a93c563c8063b3a8a7c05f47480290c (patch) | |
tree | 2a4bb16cc5c093fc5d40cbf0f5d8bc59e6e80438 /tests | |
parent | wallet2_api: getter and setter for "refresh interval" (diff) | |
download | monero-1f8a70c03a93c563c8063b3a8a7c05f47480290c.tar.xz |
libwallet_api: tests: changed testwallets path, uncommitted all tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libwallet_api_tests/main.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/libwallet_api_tests/main.cpp b/tests/libwallet_api_tests/main.cpp index fbca94e5b..5bf966877 100644 --- a/tests/libwallet_api_tests/main.cpp +++ b/tests/libwallet_api_tests/main.cpp @@ -65,9 +65,8 @@ const char * WALLET_PASS = "password"; const char * WALLET_PASS2 = "password22"; const char * WALLET_LANG = "English"; -// change this according your environment -const std::string WALLETS_ROOT_DIR = "/home/mbg033/dev/monero/testnet/"; +const std::string WALLETS_ROOT_DIR = "/var/monero/testnet_pvt/"; const std::string TESTNET_WALLET1_NAME = WALLETS_ROOT_DIR + "wallet_01.bin"; const std::string TESTNET_WALLET2_NAME = WALLETS_ROOT_DIR + "wallet_02.bin"; @@ -78,10 +77,11 @@ 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; -const std::string CURRENT_DST_WALLET = TESTNET_WALLET6_NAME; +const std::string CURRENT_SRC_WALLET = TESTNET_WALLET6_NAME; +const std::string CURRENT_DST_WALLET = TESTNET_WALLET1_NAME; const char * TESTNET_DAEMON_ADDRESS = "localhost:38081"; + const uint64_t AMOUNT_10XMR = 10000000000000L; const uint64_t AMOUNT_5XMR = 5000000000000L; const uint64_t AMOUNT_1XMR = 1000000000000L; @@ -181,11 +181,8 @@ struct WalletTest2 : public testing::Test wmgr = Bitmonero::WalletManagerFactory::getWalletManager(); } - }; - - TEST_F(WalletManagerTest, WalletManagerCreatesWallet) { @@ -223,6 +220,7 @@ TEST_F(WalletManagerTest, WalletMaxAmountAsString) } + TEST_F(WalletManagerTest, WalletAmountFromString) { uint64_t amount = Bitmonero::Wallet::amountFromString("18446740"); @@ -457,14 +455,14 @@ TEST_F(WalletManagerTest, WalletManagerFindsWallet) } -TEST_F(WalletManagerTest, WalletGeneratesPaymentId) +TEST_F(WalletTest1, WalletGeneratesPaymentId) { std::string payment_id = Bitmonero::Wallet::genPaymentId(); ASSERT_TRUE(payment_id.length() == 16); } -TEST_F(WalletManagerTest, WalletGeneratesIntegratedAddress) +TEST_F(WalletTest1, WalletGeneratesIntegratedAddress) { std::string payment_id = Bitmonero::Wallet::genPaymentId(); @@ -503,7 +501,6 @@ TEST_F(WalletTest1, WalletRefresh) ASSERT_TRUE(wmgr->closeWallet(wallet1)); } - TEST_F(WalletTest1, WalletConvertsToString) { std::string strAmount = Bitmonero::Wallet::displayAmount(AMOUNT_5XMR); @@ -518,6 +515,7 @@ TEST_F(WalletTest1, WalletConvertsToString) TEST_F(WalletTest1, WalletTransaction) + { Bitmonero::Wallet * wallet1 = wmgr->openWallet(CURRENT_SRC_WALLET, TESTNET_WALLET_PASS, true); // make sure testnet daemon is running @@ -544,6 +542,8 @@ TEST_F(WalletTest1, WalletTransaction) ASSERT_TRUE(wmgr->closeWallet(wallet1)); } + + TEST_F(WalletTest1, WalletTransactionWithMixin) { @@ -798,7 +798,8 @@ struct MyWalletListener : public Bitmonero::WalletListener }; -/* + + TEST_F(WalletTest2, WalletCallBackRefreshedSync) { @@ -812,7 +813,8 @@ TEST_F(WalletTest2, WalletCallBackRefreshedSync) wallet_src_listener->cv_refresh.wait_for(lock, wait_for); wmgr->closeWallet(wallet_src); } -*/ + + TEST_F(WalletTest2, WalletCallBackRefreshedAsync) |