Dash Core  0.12.2.1
P2P Digital Currency
wallet_tests.cpp File Reference
#include "wallet/wallet.h"
#include <set>
#include <stdint.h>
#include <utility>
#include <vector>
#include "test/test_dash.h"
#include <boost/foreach.hpp>
#include <boost/test/unit_test.hpp>

Go to the source code of this file.

Macros

#define RUN_TESTS   100
 
#define RANDOM_REPEATS   5
 

Typedefs

typedef set< pair< const CWalletTx *, unsigned int > > CoinSet
 

Functions

static void add_coin (const CAmount &nValue, int nAge=6 *24, bool fIsFromMe=false, int nInput=0)
 
static void empty_wallet (void)
 
static bool equal_sets (CoinSet a, CoinSet b)
 
 BOOST_AUTO_TEST_CASE (coin_selection_tests)
 
 BOOST_AUTO_TEST_CASE (ApproximateBestSubset)
 

Variables

static CWallet wallet
 
static vector< COutputvCoins
 

Macro Definition Documentation

◆ RANDOM_REPEATS

#define RANDOM_REPEATS   5

Definition at line 22 of file wallet_tests.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ RUN_TESTS

#define RUN_TESTS   100

Definition at line 18 of file wallet_tests.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

Typedef Documentation

◆ CoinSet

typedef set<pair<const CWalletTx*,unsigned int> > CoinSet

Definition at line 26 of file wallet_tests.cpp.

Function Documentation

◆ add_coin()

static void add_coin ( const CAmount nValue,
int  nAge = 6*24,
bool  fIsFromMe = false,
int  nInput = 0 
)
static

Definition at line 33 of file wallet_tests.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( coin_selection_tests  )

Definition at line 68 of file wallet_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( ApproximateBestSubset  )

Definition at line 331 of file wallet_tests.cpp.

◆ empty_wallet()

static void empty_wallet ( void  )
static

Definition at line 55 of file wallet_tests.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ equal_sets()

static bool equal_sets ( CoinSet  a,
CoinSet  b 
)
static

Definition at line 62 of file wallet_tests.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

Variable Documentation

◆ vCoins

◆ wallet

CWallet wallet
static

Definition at line 30 of file wallet_tests.cpp.