Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/accounting_tests.cpp
Show All 12 Lines | |||||
extern CWallet *pwalletMain; | extern CWallet *pwalletMain; | ||||
BOOST_FIXTURE_TEST_SUITE(accounting_tests, WalletTestingSetup) | BOOST_FIXTURE_TEST_SUITE(accounting_tests, WalletTestingSetup) | ||||
static void GetResults(std::map<Amount, CAccountingEntry> &results) { | static void GetResults(std::map<Amount, CAccountingEntry> &results) { | ||||
std::list<CAccountingEntry> aes; | std::list<CAccountingEntry> aes; | ||||
results.clear(); | results.clear(); | ||||
BOOST_CHECK(pwalletMain->ReorderTransactions() == DB_LOAD_OK); | BOOST_CHECK(pwalletMain->ReorderTransactions() == DBErrors::LOAD_OK); | ||||
pwalletMain->ListAccountCreditDebit("", aes); | pwalletMain->ListAccountCreditDebit("", aes); | ||||
for (CAccountingEntry &ae : aes) { | for (CAccountingEntry &ae : aes) { | ||||
results[ae.nOrderPos * SATOSHI] = ae; | results[ae.nOrderPos * SATOSHI] = ae; | ||||
} | } | ||||
} | } | ||||
BOOST_AUTO_TEST_CASE(acc_orderupgrade) { | BOOST_AUTO_TEST_CASE(acc_orderupgrade) { | ||||
std::vector<CWalletTx *> vpwtx; | std::vector<CWalletTx *> vpwtx; | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |