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.
This commit is contained in:
Brandon Dahler
2013-04-13 00:13:08 -05:00
parent 7c4c207be8
commit 51ed9ec971
177 changed files with 2084 additions and 1681 deletions

View File

@@ -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++)