aboutsummaryrefslogtreecommitdiff
path: root/src/test/wallet_tests.cpp
diff options
context:
space:
mode:
authorBrandon Dahler <brandon.dahler@gmail.com>2013-04-13 00:13:08 -0500
committerBrandon Dahler <brandon.dahler@gmail.com>2013-11-10 09:36:28 -0600
commit51ed9ec971614aebdbfbd9527aba365dd0afd437 (patch)
treed2f910390e55aef857023812fbdaefdd66cd99ff /src/test/wallet_tests.cpp
parent7c4c207be8420d394a5abc4368d1bb69ad4f8067 (diff)
Cleanup code using forward declarations.
Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
Diffstat (limited to 'src/test/wallet_tests.cpp')
-rw-r--r--src/test/wallet_tests.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/test/wallet_tests.cpp b/src/test/wallet_tests.cpp
index 51f3b27c8b..0acd94ef36 100644
--- a/src/test/wallet_tests.cpp
+++ b/src/test/wallet_tests.cpp
@@ -1,8 +1,13 @@
-#include <boost/test/unit_test.hpp>
-
-#include "main.h"
#include "wallet.h"
+#include <set>
+#include <stdint.h>
+#include <utility>
+#include <vector>
+
+#include <boost/foreach.hpp>
+#include <boost/test/unit_test.hpp>
+
// how many times to run all the tests to have a chance to catch errors that only show up with particular random shuffles
#define RUN_TESTS 100
@@ -19,7 +24,7 @@ BOOST_AUTO_TEST_SUITE(wallet_tests)
static CWallet wallet;
static vector<COutput> vCoins;
-static void add_coin(int64 nValue, int nAge = 6*24, bool fIsFromMe = false, int nInput=0)
+static void add_coin(int64_t nValue, int nAge = 6*24, bool fIsFromMe = false, int nInput=0)
{
static int nextLockTime = 0;
CTransaction tx;
@@ -55,7 +60,7 @@ static bool equal_sets(CoinSet a, CoinSet b)
BOOST_AUTO_TEST_CASE(coin_selection_tests)
{
CoinSet setCoinsRet, setCoinsRet2;
- int64 nValueRet;
+ int64_t nValueRet;
// test multiple times to allow for differences in the shuffle order
for (int i = 0; i < RUN_TESTS; i++)